Summary of the invention
Technology of the present invention is dealt with problems: overcome the deficiencies in the prior art, provide a kind of based on the virtual surroundings population object behavior evolution method of layer drink figure tissue with conversion, the regrouping process of organizing in this method has the advantage of initiative, controllability.
Technical solution of the present invention: a kind of virtual surroundings population object behavior evolution method based on gradation picture organization and conversion, its characteristics are that step is as follows:
(1) given actual application problem, texture's task image;
(2) according to organization task figure, structure is based on the organize models of the virtual objects colony of hierarchy chart;
(3) based on the organize models of virtual objects colony, the figure conversion system that the group behavior of structure description virtual objects is developed;
(4) according to the adaptive system structure of described figure conversion system construction based on the virtual objects colony of hierarchy chart conversion.
The method of texture's task image is as follows in the described step (1): by the practical application area problem, by the decomposition and the merging of task, according to task the father-sub-component relationship forms the directed acyclic graph about task, thereby the formative tissue task image.
Social structure Rolegraph, role that the organize models of the virtual objects colony in the described step (2) is divided into tissue from bottom to top specify Connection Graph and virtual objects behavior to coordinate three dimensions of Agentgraph, wherein social structure has defined the relation between the role and role in the tissue, for example between the role based on the dependence of task; The role specifies ConnectionGraph to define the matching relationship between the virtual objects and its role who bears in the tissue; The capable Agentgraph of virtual objects is for coordinating to have defined by after role's appointment, behavior rapport between the virtual objects that is formed by the social structure relation between the role and the coupling between virtual objects and the role has represented that virtual objects carries out the interactive object that behavior is coordinated; When having the dependence of task between two roles, then bear the rapport of the task of setting up between this two roles' the virtual objects respectively.Concrete method for building up is as follows:
(a) according to the task image that forms, structure can realize organizing the subtask set of root node task, with the corresponding task node of a role, thus the social structure of formative tissue, i.e. role relation structure;
(b) according to the task status of virtual objects individuality and the resource status that has, by concentrating role's allocation scheme organization task is carried out role's appointment between the virtual objects individuality, form role's specified relationship structure and rapport structure, thus the formative tissue structure example.
In the method for the figure conversion system that the structure description virtual objects group behavior of described step (3) is developed, the figure conversion system that the group behavior of structure description virtual objects is developed, the key element that comprises three aspects, be respectively the set of set, rule map and the set of rule map application conditions of figure object of the tissue of virtual objects, concrete building method is as follows:
(1) according to the social structure set of the tissue of virtual objects, generates possible role's particular cases of virtual objects, thereby generate the figure object set of structural state;
(2) rule of the operation on the possible node of graph of definition figure object and limit, for example interpolation on node or limit, deletion is combined into the figure Object Operations regular collection of tissue by the rule map of three dimensions of the tissue of virtual objects;
(3) the application conditions set of definition rule map, the rule map of the figure state transfer system of the tissue of structure realization virtual objects is used the searching algorithm in path, can adopt width or the breadth first search's mode of figure.
The structure of described step (4) is divided into three levels from top to bottom based on the adaptive system of the virtual objects colony of hierarchy chart conversion: observe layer: comprise two modules of monitoring Monitoring and self-adaptation adjusting Self-adaptive Mediator, detect the meta-model example state of the tissue of virtual objects when monitoring module realization system moves; Adaptive adjustment module is used to manage and implement the behavior evolutionary process of the tissue of virtual objects, and this model has comprised the figure conversion system of the tissue of virtual objects; The meta-model layer: the meta-model layer the is abstract element of system layer, and provide the interface of management to observing layer; System layer: the environment of realizing virtual objects and system's operation is provided.
Principle of the present invention is as follows: the behavior of virtual surroundings population object of the present invention is developed and is had characteristics such as initiative, controllability.The present invention based on the Agent method for organizing, analyzes the Agent individual behavior evolution that a class has the Agent system of explicit hierarchical structure from macroscopic perspective, thereby is used for describing the evolutionary process of autonomous object group behavior in the virtual environment.For finishing the purpose of invention, the present invention has proposed the single node level graph model that a kind of social structure, role's appointment and Agent that describes institutional framework coordinates three dimensions from the institutional framework angle, is used for describing the organize models of virtual objects; Provided the formal definition based on the hierarchy chart conversion of Agent organization restructuring process, comprise institutional framework state and expansion double-pushout algebraically figure conversion rule with hierarchy chart model portrayal regrouping process, the formal definition regrouping process is used for describing the process that virtual autonomous object group behavior is developed; And provided the adaptive system structure that the Agent system of autonomous object group behavior is described in based on hierarchy chart conversion.
In order to realize the present invention, concrete technical scheme comprises two aspects: model and the corresponding figure conversion system model of analyzing and provided three dimensions of the institutional framework with explicit hierarchical structure on the one hand from conceptual model; Realize angle from software on the other hand, provided the meta-model structure of three dimensions that realize institutional framework and based on the Adaptive Architecture that the virtual surroundings population object behavior of figure conversion system develops, in technical scheme, be divided into three steps particularly and realize aspect above-mentioned two.
The present invention's advantage compared with prior art is: the application system development of virtual objects in the auxiliary virtual environment of the present invention, developing for the group behavior of virtual objects in the application system provides a kind of realization approach, provided the formal description that mechanism is developed in groups' behavior that a class has the virtual autonomous object of explicit hierarchical structure from macroscopic perspective based on method for organizing, in based on method for organizing, organization task has been stipulated the function that autonomous object colonial need is finished, simultaneously in the evolutionary process of tissue, organization task can redesign, therefore from organizing angle to realize that the behavior of autonomous object colony has controllability and initiative characteristics, realize the autonomy of behavior under tissue bound of autonomous individual subject simultaneously, improved the adaptivity of the application system of virtual objects for external environment condition.
Embodiment
The present invention is described in more detail below in conjunction with accompanying drawing.
As shown in Figure 1, concrete implementation step of the present invention is as follows:
1. given actual application problem, texture's task image
At given actual application problem, the task image of texture.For example, problem of pursuit between based on predator under the two dimensional surface grid environment and prey.Under the two dimensional surface grid environment, when four predators when the different four direction of prey is contained, prey is just calculated and is intercepted.In each simulation cycles, prey can be moved lattice by peritropous four direction.Social structure among Fig. 2 has shown when the organization task illustrated example that exists under the prey situation.In the social structure of Fig. 2, corresponding one of them task of each role, and role r1 serves as the root node of this task image, thereby the tissue the role relation structure under this design with the organization task isomorphism of graph, the method of concrete texture task image is: by the practical application area problem, by the decomposition and the merging of task, according to the father of task-sub-component relationship forms the directed acyclic graph about task, thus the formative tissue task image.
2. structure is based on the organize models of the virtual objects colony of hierarchy chart
For virtual objects colony being managed effectively and according to the characteristics of practical application, the present invention adopts the tissue with explicit hierarchical structure that virtual objects colony is carried out modeling, and Fig. 2 has shown the institutional framework example based on predator's virtual objects in the problem of pursuit between predator under the two dimensional surface grid environment and the prey that step 1 provides.Social structure Rolegraph, role that the organize models of virtual objects is divided into tissue specify Connection Graph and virtual objects behavior to coordinate three dimensions of Agentgraph.The behavior of virtual objects is by its role who bears decision, and the behavior constraint between the virtual objects is by the decision of the relation between the predetermined role.In organize models, social structure is made up of role who organizes interior virtual objects to bear and the dependence between the role, defined and participated in position, task and the resource constraint of the virtual objects of tissue at organization internal, the role relation design of tissue depends on the decomposition and the merging of organization task.In the tissue of explicit hierarchical structure, the dependence between the role has embodied the task level between the corresponding role; The role specifies and has defined the given virtual objects and the specified relationship of organizational roles; The virtual objects behavior has been coordinated to define object and has been born after the specific role task delegation and cooperative relationship based on role's task.
Three dimensions of the institutional framework of the virtual objects that Fig. 2 provides can adopt drawing method to portray respectively, also promptly the social structure of tissue can be expressed as the directed acyclic graph with a root node, the corresponding role of node, the task father-sub-dependence between the corresponding role in the limit between the node; The role specifies can be expressed as the bipartite graph of being made up of virtual objects node and role node, and role node is pointed to by the virtual objects node in limit wherein, the role taking relation of expression virtual objects; The virtual objects behavior is coordinated to be expressed as a directed acyclic graph, specifies by the role, and the task dependence example between the role changes into task delegation and the cooperative relationship between the virtual objects, constitutes the limit of this directed acyclic graph.In real application systems, realize angle from software, the meta-model structure of organizing of the virtual autonomous object that this organization structural model of virtual objects can be provided by Fig. 3 realizes.Organizing in the meta-model structure of Fig. 3, structural element is divided into three levels: the bottom is that the role schemes layer (Rolegraph Level): the dependence between definition role, the role and mutual; The middle layer is connection layout layer (ConnectionGraph Level): definition Agent and role's appointment; The superiors are Agent figure layers (Agentgraph Level): utilize Agent to realize virtual objects, definition Agent object and mutual rapport.The social structure of the institutional framework of virtual environment object, three concept of dimensions models that the role specifies and Agent coordinates have been realized respectively at the graph structure of three levels of Fig. 3.
Specified and the hierarchy chart of the tissue that the graph structure of three dimensions can the composite construction virtual objects is coordinated in behavior by the social structure of virtual objects, role, the flow process of texture's model and institutional framework example is as follows particularly:
(1) requires by the practical application area problem and obtain the task image structure of organizational goal,, form directed acyclic graph about task according to the father-sub-component relationship of task by the decomposition and the merging of task.
(2) according to the task image that forms, structure can realize organizing the subtask set of root node task, with the corresponding task node of a role, thus the social structure of formative tissue, i.e. role relation structure;
(3) according to the task status of virtual objects individuality and the resource status that has, specify by concentrating role's allocation scheme dynamic character in the process that organization task is carried out, form role's specified relationship structure and rapport structure, thus the formative tissue structure example.
Above-mentioned flow process is the model realization flow of three dimensions of the institutional framework of virtual objects, and from the software angle, the meta-model structure construction process of institutional framework correspondence will realize the part explanation in the adaptive system structure.
3. the figure conversion system that develops of virtual objects group behavior
Figure conversion method is used to describe the behavior evolution of virtual objects.Fig. 3 organizes the meta-model structure as the figure object in this figure conversion method, also the object of the figure of i.e. figure conversion system need expand to the figure state of three dimensions of tissue that comprise virtual objects, and corresponding figure conversion rule need expand to the object transformation rule of the figure of three dimensions.Fig. 4 has shown between based on predator under the two dimensional surface grid environment and prey in the problem of pursuit that predator's virtual objects is born given role's rule map and left role's rule map that tissue is abandoned bearing.Each rule map comprises Agent rule map (Agentgraph Rule), connection layout rule (Connection graph Rule) and role's rule map (Rolegraph Rule) respectively in the given rule map example, respectively to the figure object of figure conversion system, be that virtual objects behavior coordination, role's specified structure and social structure in the structural state of virtual objects carried out graphic operation, the for example interpolation of virtual objects node or deletion, the limit of role's appointment, the interpolation of node or deletion.In addition, three rule maps adopt two algebraically figure conversion regular fashions of deriving (double-pushout) in the rule map of the tissue of virtual objects, and its left side figure and the right figure are directed acyclic graphs.In addition, the left side figure of role's rule map and the right figure have a root node, specify rule map and Agent to leave shown in the Rolegraph rule of rule map correspondence of tissue as role among Fig. 4.
In figure conversion system, the rule map of the tissue of virtual objects is operated the figure object of tissue, thereby the Obj State of the variation of the figure object of realization tissue or tissue moves, and also promptly shows the behavior evolutionary process of virtual objects from macro-level.The figure object of the tissue of virtual objects and the migration between the figure object constitute the figure state transfer system of the tissue of virtual objects.The figure state transfer system has write down the historical process that given virtual objects initially organizes the rule map of configuration state undertissue to use, and comprises institutional framework state and rule map.The behavior evolutionary process of the tissue of virtual objects that is to say the reachable path between the given original state and dbjective state in the figure state transfer system.The figure conversion system that the group behavior of structure description virtual objects is developed comprises the key element of three aspects, is respectively set, rule map set and the set of rule map application conditions of figure object of the tissue of virtual objects, and concrete building method is as follows:
(1) according to the social structure set of the tissue of virtual objects, generates possible role's particular cases of virtual objects, thereby generate the figure object set of structural state;
(2) rule of the operation on the possible node of graph of definition figure object and limit, for example interpolation on node or limit, deletion is combined into the figure Object Operations regular collection of tissue by the rule map of three dimensions of the tissue of virtual objects;
(3) the application conditions set of definition rule map, the rule map of the figure state transfer system of the tissue of structure realization virtual objects is used the searching algorithm in path, can adopt width or the breadth first search's mode of figure.
The behavior evolution flow process of the tissue of virtual autonomous object is specific as follows:
(1) according to the goal task of virtual objects colony, task is decomposed and merged according to father-subrelation, form the graph structure of task, this figure is the directed acyclic graph with single root node, and root node is the general assignment of object colony, generally has chronicity;
(2) according to the task image that forms, the social structure of constructing virtual object tissue, the corresponding task node of general single role, the limit between the task node has determined the dependence edge between the corresponding role;
(3) virtual objects is carried out role's appointment, and form the dbjective state of the tissue of virtual objects;
(4) according to the state transfer system of the figure of the original state of the tissue of virtual objects and tissue, search for a rule map from the original state to the dbjective state and use the path;
(5), implement the figure Object Operations of the tissue of virtual objects, thereby realize the state transition of virtual objects tissue based on the application path of rule map;
(6) execution status of task of monitoring current organization, if task is carried out failure, then the role that virtual objects is born reassigns, and specifies if can not generate the role more excellent than the state of current organization, then the tissue with virtual objects redesigns, and turns back to step (2).
4. based on the adaptive system structure of the virtual objects colony of hierarchy chart conversion
The figure conversion system integration of developing for the group behavior that will describe virtual objects is in the application system of virtual objects, and Fig. 5 has provided the adaptive system structure of the virtual autonomous object colony based on the figure conversion of the present invention, is divided into three levels from top to bottom:
Observe layer: comprise two modules of monitoring Monitoring and self-adaptation adjusting Self-adaptive Mediator, monitoring module is realized the meta-model example state of the tissue of the system's virtual objects time of running; The behavior evolutionary process of the tissue of adaptive adjustment module management and enforcement virtual objects, this model has comprised the figure conversion system of the tissue of virtual objects;
The meta-model layer: the meta-model layer the is abstract element of system layer, and provide the interface of management to observing layer;
System layer: the environment of realizing virtual objects and system's operation is provided.
The flow process of the adaptive system structure of the Agent system of the autonomous object of constructing virtual colony is as follows particularly:
(1) infrastructure of tectonic system operation, for example internal environment, external environment condition and the interface of the operation of communication infrastructure environment and system;
(2) structure is realized the data structure of groups' model of virtual autonomous object, and the meta-model of institutional framework as shown in Figure 3 is as institutional framework example state in the group behavior evolutionary process of autonomous object;
(3) structure is observed the monitoring module of layer, is used to detect the institutional framework example state of autonomous object;
(4) structure is observed the adaptive adjustment module of layer, is used to realize the hierarchy chart transformation system of the institutional framework of virtual autonomous object, and the present invention adopts centralized system to realize groups' evolutionary process of autonomous object.
As shown in Figure 6, the process of monitoring module realization is as follows:
(1) obtains the environment task status of current time, the meta-model state and the individual task status of carrying out of Agent of institutional framework;
(2) judge whether organization task is finished,, otherwise change step (3) over to if finish then stop;
(3) judge whether organization task changes and can individual carrying out of the task of Agent be finished, and sends judged result to adaptive adjustment module, and enters the continuation monitor state.
As shown in Figure 7, the implementation procedure of adaptive adjustment module is as follows:
(1) obtains current time organization task state from monitoring module;
(2) determine the dbjective state of the social structure of institutional framework according to controlled condition in current organization task status and the figure conversion system;
(3) utilize centralized system that Agent role is reassigned, determine the dbjective state of institutional framework;
(4), determine figure conversion rule application path from the current state of institutional framework to dbjective state by the figure state transfer system of figure conversion system correspondence according to given search strategy;
(5) revise the meta-model state of tissue and feed back to the Agent individuality of system's firing floor.
As shown in Figure 8, the implementation procedure of meta-model layer is as follows:
(1), realizes the key element of three dimensions of institutional framework by analysis to three dimension models of organization task and institutional framework;
(2), upgrade the figure Obj State of meta-model by the dbjective state of the institutional framework of adaptive adjustment module output.
As shown in Figure 9, the implementation procedure of system layer is as follows:
(1) the Agent individuality of constructing system firing floor, communication environment and organization task generation module;
(2) receive adaptive adjustment module output result and to the individual update notifications result of Agent, the Agent individuality is by the executing state of communication environment to monitoring module feedback current task, the task that the task generation module changes and to monitoring module feedback job change state.