ART network-based decision-making behavior modeling method, device and computer equipment
Through the decision-making behavior modeling method based on the ART network, the Fusion ART network is used to build a network of states, actions, and rules, which solves the problem of difficulty in balancing model accuracy and real-time performance in the existing technology, and generates an explainable decision-making behavior model that is suitable for for games or multi-robot systems.
Patent Information
- Application Number
- CN202210406183.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-18
- Publication Date
- 2024-10-18
- Estimated Expiration
- 2042-04-18
AI Technical Summary
Existing example learning methods are difficult to balance between model accuracy and real-time performance, resulting in insufficient performance of the generated behavioral models.
The decision-making behavior modeling method based on the ART network is adopted to construct the state network, action network and rule network by obtaining sample trajectory data. The Fusion ART network is used for data-driven decision-making behavior modeling to form a decision-making behavior model in the form of a behavior tree to simulate human beings. Learning and cognitive functions of the brain.
It realizes the learning and generation of interpretable decision-making behavior models based on example trajectory data, improves the accuracy and real-time performance of the model, and forms clear and concise decision-making behavior rules, which are suitable for decision-making behavior modeling in games or multi-robot systems.
Smart Images

Figure CN114723053B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of decision-making behavior modeling, and in particular to a decision-making behavior modeling method, device and computer equipment based on an ART network. Background Art
[0002] As the degree of informatization continues to improve, it is no longer difficult to obtain behavioral trajectory data, and using example learning to generate decision-making behavior models will become an important research direction. However, since the currently commonly used example learning methods require a trade-off between model accuracy and real-time performance, the generated behavior models are lacking in performance. Summary of the invention
[0003] Based on this, it is necessary to provide a decision-making behavior modeling method, device and computer equipment based on an ART network to address the above technical problems.
[0004] A decision behavior modeling method based on an ART network, the method comprising:
[0005] Obtaining example trajectory data of the object to be modeled; the example trajectory data is composed of a pair of state information and action information of the object to be modeled at each moment between an initial moment and an end time of the confrontation.
[0006] A decision behavior modeling model based on an ART network is constructed, wherein the decision behavior modeling model includes: a state network, an action network, and a rule network; the state network, the action network, and the rule network are all Fusion ART networks; and the Fusion ART network includes multiple input domains and one category domain.
[0007] The state information is pre-processed and then input into the state network to obtain a plurality of state nodes.
[0008] The action information is pre-processed and then input into the action network to obtain a plurality of action nodes.
[0009] Inputting the action node and the state node into the rule network to obtain a plurality of decision-making behavior rules;
[0010] According to a plurality of the decision behavior rules, a decision behavior tree structure is obtained.
[0011] A decision behavior modeling device based on an ART network, the device comprising:
[0012] The example trajectory data acquisition module is used to acquire example trajectory data of the object to be modeled; the example trajectory data consists of a pair of state information and action information of the object to be modeled at each moment between the initial moment and the end time of the confrontation.
[0013] The decision behavior modeling model construction module is used to construct a decision behavior modeling model based on an ART network, wherein the decision behavior modeling model includes: a state network, an action network and a rule network; the state network, the action network and the rule network are all Fusion ART networks; the Fusion ART network includes multiple input domains and 1 category domain.
[0014] The decision behavior tree structure determination module is used to pre-process the state information and input it into the state network to obtain a plurality of state nodes; pre-process the action information and input it into the action network to obtain a plurality of action nodes; input the action nodes and the state nodes into the rule network to obtain a plurality of decision behavior rules; and obtain a decision behavior tree structure according to the plurality of decision behavior rules.
[0015] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of any of the above methods when executing the computer program.
[0016] A computer-readable storage medium stores a computer program, which implements the steps of any of the above methods when executed by a processor.
[0017] The above-mentioned decision behavior modeling method, device and computer equipment based on the ART network, the method uses the ART model to transform the collected sample trajectory data, performs displayed decision behavior modeling, and enables the model to automatically learn decision behavior rules in a data-driven manner, and finally forms a decision behavior model in the form of a behavior tree. This method can simulate the learning and cognitive functions of the human brain, and learn to generate an interpretable decision behavior model based on the sample trajectory data. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Figure 1 A flowchart of a decision behavior modeling method based on an ART network in one embodiment;
[0019] Figure 2 A Fusion ART architecture in another embodiment;
[0020] Figure 3 A structural diagram of a decision behavior modeling model based on an ART network in another embodiment;
[0021] Figure 4 is a behavior tree structure corresponding to ART in another embodiment;
[0022] Figure 5 ART-Bev model is used for example learning flow chart in another embodiment
[0023] Figure 6 A schematic diagram of a single rule subtree in an embodiment
[0024] Figure 7 A rule subtree formed by converting four rules in a rule base in another embodiment, wherein (a), (b), (c), and (d) are rule subtrees formed by converting the 8th, 9th, 10th, and 13th rules respectively;
[0025] Figure 8 A behavior tree model generated based on single round trajectory data learning in another embodiment;
[0026] Fig. 9 A behavioral model for generating example trajectories for another embodiment;
[0027] Fig.10 is a structural block diagram of a decision behavior modeling device based on an ART network in one embodiment;
[0028] Fig.11 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0029] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0030] The decision-making behavior modeling network based on ART network is referred to as ART-Bev model.
[0031] The learning process of ART network generally includes four stages: search, identification, comparison, and learning. The model generally initializes the network through unsupervised learning, and then uses supervised learning to learn in the ART network. The ART network generally consists of two layers of networks, namely the F1 layer that receives input information and the F2 layer that stores memory nodes. The F1 layer receives external input information and inputs information from the bottom up in the network, similar to the human brain receiving external information through perceptual cells. The F2 layer generates expectations from top to bottom based on the existing memory nodes in the network. Through search, identification, and comparison, the input information is matched with a certain memory node. Once the match is successful, resonance will be induced. This resonance will synchronize, amplify, and prolong the activities of the key feature patterns inside the input information, support the conscious identification of the selected memory node, and trigger the learning of the adaptation weights in the top-down active path; if the match fails, it will induce a reset cycle search and learn new recognition categories. You can find approximately matching memory nodes through repeated search, identification, and comparison, supplement and modify them, or learn to generate new memory nodes in the F2 layer based on the input information, similar to the human brain's processing of external information.
[0032] The decision-making behavior modeling method based on ART network is used to model the decision-making behavior of game characters or robots in games or multi-robot systems.
[0033] In one embodiment, Figure 1 As shown, a decision behavior modeling method based on an ART network is provided, and the method comprises the following steps:
[0034] Step 100: Obtain sample trajectory data of the object to be modeled; the sample trajectory data consists of a pair of state information and action information of the object to be modeled at each moment between the initial moment and the end time of the confrontation.
[0035] Specifically, the object to be modeled may be a game character in a game, a moving device, or a robot in a multi-robot system.
[0036] The example trajectory data may be example trajectory data of a game character in a first-person shooter game, or example trajectory data of a robot in a multi-robot system. The example trajectory data may be obtained by simulation.
[0037] Step 102: construct a decision behavior modeling model based on the ART network, the decision behavior modeling model includes: a state network, an action network and a rule network; the state network, the action network and the rule network are all Fusion ART networks; the Fusion ART network includes multiple input domains and 1 category domain.
[0038] Specifically, the structure of the decision-making behavior modeling model based on the ART network is as follows: Figure 2 As shown in the figure. The decision behavior modeling model based on the ART network consists of two layers. The bottom layer of the model includes the state network and the action network, and the upper layer of the model includes the rule network. The state network and the action network are used to generalize the conditional state information and execution actions of the modeling object to obtain the state node and the action node. The rule network is used to generalize the state node and the action node to obtain the rule node.
[0039] Fusion ART is an extended version of the ART network with multiple channels and multiple modalities. The structures of the state network, action network, and rule network are as follows: Figure 3 As shown in the figure, multiple input domains constitute the F1 layer, and the category domain is the F2 layer. The structures of the state network, action network, and rule network are the same, except that the number of input domains is different. The number of input domains of the state network is related to the dimension of the conditional state information of the object to be modeled, the number of input domains of the action network is related to the dimension of the execution action information of the object to be modeled, and the number of input domains of the rule node is equal to the sum of the number of state nodes and action nodes output by the state network and action network.
[0040] It is worth noting that the two ART networks at the bottom use one-hot encoding when converting the learned state nodes and action nodes into input vectors and passing them upward. That is, when a certain input information matches a certain state memory node j, there is For j≠i, we have This encoding form helps to highlight the conditional states that play a decisive role in executing actions, which is convenient for network learning. If the conditional state input domain is divided based on all state information values, all conditional state values are used indiscriminately to form decision-making behavior rules, but the number of conditional state values that affect decision-making behavior is small, which will affect the network learning speed, making the generated model large in scale and including a large number of invalid or redundant subtrees. Therefore, the input channel of the state network is simplified. Specifically, according to the conditional state values that can affect the decision-making behavior, the input domains of five conditional states such as the model's own attributes, sound sensors, radar left front side information, radar front side information, and radar right front side information are re-divided, which greatly shortens the length of the input vector and ensures that the input information transmitted into the ART model is information that affects the decision-making behavior. This input method of conditional state information avoids the input of useless state information, which can not only speed up the learning speed of the model, but also learn to generate clearer and more concise decision-making behavior rules.
[0041] Step 104: pre-process the state information and input it into the state network to obtain a number of state nodes.
[0042] Specifically, the state network includes 9 input domains, and 9 input vectors of the state of the object to be modeled are respectively used as inputs of the 9 input domains.
[0043] For each example trajectory data, this method performs two steps in the loop of traversing the state node pairs at each moment of the trajectory data: first, establish all input vectors, and second, perform ART-style generalization learning on the current input information. First, construct the input vector based on 9 state information feature channels and 5 action information feature channels, then preprocess the input information and initialize the input vector, then complement encode the constructed input vector to form an activation vector, and then pass it into the ART-Bev model.
[0044] In order to learn the decision-making behavior rules contained in the current input information, ART-Bev learns according to the operation process of the ART model. The activation values of all existing state nodes in the model are calculated. The method repeatedly performs the two processes of node activation and template matching to verify whether the connection weight corresponding to a state node resonates with the current input information. If so, the connection weight of the state node is adjusted according to the input information to enhance its generalization representation ability for different input information; if no resonance can be generated by traversing all state nodes, a new node is created to specifically encode the current input information.
[0045] Step 106: pre-process the action information and input it into the action network to obtain a number of action nodes.
[0046] Specifically, the learning process of the action network is the same as that of the state network, and the corresponding action nodes are generated through generalized learning.
[0047] The action network includes 6 input fields, the input of the input field is the action input vector, and the 6 action input vectors include I m (n), I t (n), I ra (n), I sha (n), I rdc (n) and I f (n), where I m (n)=(no n ,mf n ,mb n ) represents the moving action of the object to be modeled, I t (n)=(no n ,tr n ,tl n ) represents the turning action of the object to be modeled, I ra (n)=(no n ,sa n ) represents the radar switch action of the object to be modeled, Isha (n)=(no n ,sha n ) indicates the shield switch action of the object to be modeled, I rdc (n)=(no n ,newdis n ) represents the action of setting the radar detection distance of the object to be modeled, I f (n)=(no n ,f n ) represents the firing action of the object to be modeled. The example action data preprocessing standard of the input vector of the action network is shown in Table 1.
[0048] It should be noted in Table 1 that the input vector I representing the object to be modeled executes “set radar detection distance” rdc It includes two feature attributes, and the relationship between the two is: when the object to be modeled performs the action, the rdc attribute takes the value of 1 and the newdis attribute takes the value of the detection distance divided by 14; when the object to be modeled does not perform the action, the two attributes of the vector take the value of 0.
[0049] Table 1 Example action data preprocessing standards
[0050]
[0051] Step 108: Input the action nodes and state nodes into the rule network to obtain a number of decision-making behavior rules.
[0052] Specifically, the number of input domains of the rule network is determined according to the number of state nodes and action nodes generated by learning the state network and the action network, and then the decision-making behavior rules are generated using the same process as the state network.
[0053] Step 110: Obtain a decision behavior tree structure according to a number of decision behavior rules.
[0054] In the above-mentioned decision behavior modeling method based on the ART network, the method uses the ART model to transform the collected sample trajectory data, performs displayed decision behavior modeling, and enables the model to automatically learn decision behavior rules in a data-driven manner, and finally forms a decision behavior model in the form of a behavior tree. This method can simulate the learning and cognitive functions of the human brain, and learn to generate an interpretable decision behavior model based on the sample trajectory data.
[0055] In one of the embodiments, before step 104, the method also includes: re-dividing the corresponding input domain according to the values of the object's own attribute data, sound sensor data, radar left front side information, radar front side information and radar right front side information.
[0056] Specifically, the attribute data of the input domain to be re-divided is as follows Figure 3 As shown in the black dotted box.
[0057] The basis for re-dividing the input domain of its own attribute data is the value nodes that affect the executable actions of the modeling object; the basis for re-dividing the input domain of sound sensor data, radar left front side information, radar front side information, and radar right front side information is whether enemy forces appear within the detection range of the modeling object.
[0058] In one embodiment, the state information includes the self-attribute data of the object to be modeled, obstacle data, projectile data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information; the self-attribute data of the object to be modeled includes the energy value, life value, number of projectiles, radar opening state, and shield opening state of the object to be modeled; step 104 includes: according to the preset state preprocessing rule, the self-attribute data of the object to be modeled, obstacle data, projectile data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information are encoded in one-hot encoding to obtain corresponding 9 state input vectors; the 9 state input vectors are input into the input domain of the corresponding state network, and the complement code is added to the state vector in each input domain to obtain an activation vector; all activation vectors are input into the category domain of the state network, and the activation value of each memory node in the category domain is calculated according to the activation vector; and the memory node T with the highest activation value is found. J ; If the memory node J satisfies both the highest activation value and the similarity between the weight vector and the input vector is greater than the alert parameter, it means that the current input information matches the memory node J successfully, that is, resonance occurs; refer to the input information to adaptively adjust the weight vector of the activation node J to enhance its generalization ability; if there is no node in the category domain of the state network that matches the current input information, a new memory node is created in the category domain of the state network, and its weight vector is set to the activation vector x k .
[0059] Specifically, the state network includes 9 state input vectors representing the state information of the object to be modeled. Table 2 shows an example of state data preprocessing standards.
[0060] Table 2 Example status data preprocessing criteria
[0061]
[0062]
[0063] The first state input vector Represents the attribute state data of the object to be modeled (self state), including the energy value, health value, number of shells, radar opening state and shield opening state of the object to be modeled. The state input vector I bs (n)=(f n ,r n ,b n ,l n ), I im (n)=(f n ,r n ,b n ,l n ), I rwave (n)=(f n ,r n ,b n ,l n ) represent the obstacles, shells, and radar wave sensor data (blocked sensor) of the object to be modeled, and the state input vector I sme (n)=(smdis n ) represents the smell sensor data of the object to be modeled (smell sensor), I sou (n)=(soudir n ) represents the sound sensor data (sound sensor) of the object to be modeled, I lfr (n)=(lf n ,lfr n ) represents the data information detected by the radar sensor of the object to be modeled on the left front side (left-forward-radar) of the object to be modeled, I fr (n)=(fr n ) represents the data information detected by the radar sensor of the object to be modeled in front of the object to be modeled (forward-radar), I rfr (n)=(rf n ,rfr n ) represents the data information detected by the radar sensor of the object to be modeled on the right front side (right-forward-radar) of the object to be modeled.
[0064] Table 2 It should be noted that in the input vector I representing the attribute data itself ssIn (n), the energy value is divided into four values according to its influence on the decision-making behavior of the object to be modeled. When 0 < energy < 14, the object to be modeled cannot turn on the radar and shield; when 14 ≤ energy < 20, the object to be modeled cannot turn on the shield, but when the radar detection range is set to 7, the object to be modeled can turn on the radar; when 20 ≤ energy < 28, the object to be modeled can turn on the shield and can turn on the radar when the radar detection range is set to 7; when 28 < energy < 1000, the object to be modeled can not only turn on the shield but also turn on the radar when the radar detection range is set to 7 or 14.
[0065] This model uses two underlying ART networks to learn the conditional states and execution actions of the object to be modeled respectively, and aggregates to generate state node and action node input vectors in the form of one-hot encoding, which can not only speed up the learning decision-making behavior of the upper-layer ART network but also obtain more concise and clear decision-making behavior rules.
[0066] In one embodiment, all activation vectors are input into the category domain of the state network, and the activation values of each memory node in the category domain are calculated according to the activation vectors. The calculation expression of the activation value in the step is:
[0067]
[0068] where, T j is the activation value of each memory node j, x k is the k-th activation vector, α k is the selection parameter, γ k is the contribution parameter, ∧ is the AND operator, |·| is the norm, and n is the number of input domains in the state network.
[0069] In one embodiment, the formula for adaptively adjusting the weight vector of the activation node J is:
[0070]
[0071] where, is the weight vector associated with the k-th input domain adjusted by the memory node j according to the newly input activation vector x k . is the weight vector associated with the k-th input domain adjusted by the memory node j according to the activation vectors input in the previous k - 1 times.
[0072] In one embodiment, find the memory node T J with the highest activation value. In the step, the memory node T J with the highest activation value is:
[0073] TJ =max{T j ; j=1,2,...,n} (3)
[0074] If the largest T j If there is only one, then the memory node is directly selected; if the largest T j If it is not unique, the memory node with the smallest index is selected first; at time t = 0, the initial value of each component is set to 1, and at other times, the memory node T in the category domain of the state network is set J The activation vector of is set to 1 and the other activation vectors are set to 0.
[0075] Specifically, Figure 2 The Fusion ART network shown in the figure has a F1 layer with multiple input fields and a category field. Network parameter description:
[0076] Input vector: represents the input vector of k channels, I=(I 1 ,I 2 ,...,I n ) represents the concatenation of the input vectors of all input domains, where n represents the number of input vectors of the F1 layer,
[0077] Input fields: Represents the kth input domain of the F1 layer. Indicates that the kth input domain receives the input vector I k If the input vector is not preprocessed, there is x k =I k Depending on the specific situation, the input vector can choose whether to add complement to prevent node explosion, as shown in Example 4.1.
[0078] Category domain: mainly used to store knowledge learned based on external input information, represented in the model in the form of memory nodes. p ) is the activation vector of F2, where p is the number of memory node categories currently learned.
[0079] Weight vector: used to connect the input domain and the category domain, record is the jth memory node in F2 and the kth input domain in F1 The associated weight vector.
[0080] Parameters: Each input field in F1 The learning process between the category domain is affected by the following sets of parameters: k , learning rate β k , contribution parameter γ k, beware of parameter ρ k .
[0081] Choosing the parameter α k The value range of is [0, +∞), which is used to prevent the denominator in the formula from being zero when calculating the activation value. k The value range of is [0,1]. This parameter is used to adaptively adjust the weight vector of the memory node according to the new input vector. If the learning rate is set too high, the weight vector will change too much with the new input information, which is not conducive to network stability; if the learning rate is set too low, the weight vector will not be able to make appropriate adjustments according to the new input information, thus affecting the generalization representation ability of the model. Contribution parameter γ k The value range of is [0,1]. This parameter is used to calculate the activation value of each cognitive node in the model based on the activation vector. k The value range of is [0,1]. This parameter is used to determine whether the input information matches the existing cognitive nodes successfully. On this basis, it determines whether to adjust the original nodes or generate new cognitive nodes, thereby controlling the number of rules generated by the model. If the vigilance parameter is set too high, although the rules generated by the model can be more specific, it will inevitably lead to too many rules, resulting in an incompact rule base. If the vigilance parameter is set too low, it will cause a memory node to include the input information of most state-action pairs, resulting in the aggregation of inputs that should not be generalized and learned to form a class of rules.
[0082] The specific workflow within the Fusion ART network is:
[0083] Step 1: In order to enhance the representation ability of the network, the input vector I is k = c adds the complement to form the activation vector x k , expressed as
[0084] Step 2: The network is based on the activation vector x k Calculate the activation value T of each memory node j in F2 j , the activation formula is shown in formula (1), by selecting parameter α k and the contribution parameter γ k Control: Activation value T j The calculation formula is shown in formula (1), where the AND operator ∧ is expressed as Norm
[0085] Find the one with the highest activation value T j The node of F2 is subscripted as J. According to the principle of "winner takes all", the activation vector of F2 is recorded as y J =1, for all j≠J, there is y j =0.
[0086] In formula (3), at time t=0, the initial value of each component is 1, which is called 'uncommited code', that is, "unactivated node".
[0087] If the largest T j If there is only one, then select that node directly; if the largest T j If not unique, the node with the smallest index is selected first.
[0088] Step 3: The activated memory node will change its weight vector It is sent to the F1 layer for template matching, that is, to detect whether the current input pattern resonates with node J, that is, to use the vigilance parameter to check the similarity between the weight vector and the input vector. The similarity calculation formula between the weight vector and the input vector is as follows:
[0089]
[0090] Step 4: If a node J satisfies both the second and third steps, it means that the current input information matches the node J successfully, that is, resonance occurs. To activate the node J, the weight vector needs to be adaptively adjusted based on the input information to enhance its generalization ability. The weight vector adaptive adjustment formula (2) is shown.
[0091] If there is no node in the F2 layer that matches the current input information, it means that the current F2 lacks the appropriate classification of the current input information. Then a new memory node is created in the F2 layer and its weight vector is set to the activation vector x k .
[0092] After completing the above steps, the ART model learns the next input information. As external information is continuously input, the ART model can simulate the cognition and learning mechanism of the human brain according to the above process and continuously learn external information.
[0093] For example, suppose a memory node has a weight vector of (0.2, 0.8) for a certain input channel, where 0.8 is the complement. If the input vector passed into the network at the current moment is (0.1, 0.9), the node adaptively adjusts the weight vector at a learning rate of 0.1 according to formula 4.4, and the updated weight vector is (0.19, 0.8). Therefore, the representation range of the node for the input channel is extended to the area between (0.19, 0.2). Since Fusion ART learns a specific area rather than a single point based on the input information, it can learn fewer and more aggregated cognitive rules compared to other networks, while solving the problem of node explosion.
[0094] In one embodiment, step 110 includes: representing a single decision behavior rule as a rule node in the form of if-then, each rule node in the form of if-then is a rule subtree; the rule subtree has a behavior tree structure whose root node is a sequence node and includes condition nodes and action nodes; according to the semantic relationship of the rule base composed of decision behavior rules, all rule subtrees are combined into a decision behavior tree structure; the decision behavior tree structure is a behavior tree structure whose root node is a selection node and includes multiple rule subtrees.
[0095] The state network of the ART-Bev model receives attribute information related to the conditional state of the object to be modeled from the outside, and generates several cognitive nodes in its category domain after learning and generalization (called "state nodes" in the state network). The action network receives attribute information related to the execution action of the object to be modeled from the outside, and generates several cognitive nodes in its category domain after learning and generalization (called "action nodes" in the action network). In addition to learning and generalizing the external conditional state and execution action input information, the state network and the action network also need to pass the generated cognitive nodes as input to the rule network. The rule network receives state nodes and action nodes, learns the corresponding relationship between state nodes and action nodes based on example data, and forms several cognitive nodes in the category domain (called "rule nodes" in the rule network). Among them, the rule node can be represented as an if-then rule that executes the corresponding action node based on a specific condition node, and the several rule nodes generated by model learning can be represented as a rule base containing several if-then rules.
[0096] On the one hand, from the perspective of the ART-Bev model structure, the structure is very similar to the behavior tree structure whose root node is a sequence node and whose subtrees include condition nodes and action nodes. From the perspective of the semantics of a single rule node, a rule node expressed in the form of if-then can be regarded as a behavior tree structure whose root node is a sequence node and whose subtrees include condition nodes and action nodes, called a rule subtree. From the perspective of the semantics of the rule base generated by the model, the rule base can be regarded as a behavior tree structure whose root node is a selection node and whose subtrees include multiple rule subtrees, such as Figure 4 shown.
[0097] On the other hand, the idea of using the ART-Bev model to learn and generate behavior models based on example trajectories is as follows Figure 5 As shown in the figure. Based on the collected expert example trajectories, the constructed ART-Bev model is first used to generalize the data information. The model can extract the implicit decision-making behavior rules from the state-action pairs arranged in chronological order, and automatically ignore the useless states; the decision-making behavior rules generated by learning can be expressed in the form of if-then rules, and then the rules are converted into a behavior tree structure according to the corresponding conversion structure mentioned above.
[0098] Based on the collected example trajectory data, ART-Bev can generalize the learning decision-making behavior rules based on the input information representing different state actions and establish a compact and understandable rule base.
[0099] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0100] In a verification simulation embodiment, it is shown in this simulation embodiment that during the learning process, the number of rule nodes will tend to be stable after the model receives a small amount of input information, but the connection weights of the nodes are still adjusted with subsequent input information.
[0101] (1) Collect sample trajectory data.
[0102] In this experiment, we use the manually written behavior tree script simple on the TankSim experimental platform to conduct confrontation with the object to be modeled and generate sample trajectories. The sample trajectory data consists of the state-action pair of the object to be modeled at each time from the initial time 0 to the end time t of the confrontation τ=((s1,a1),(s2,a2),……,(s t ,a t ))composition
[0103] (2) Experimental parameter setting.
[0104] The parameters in the ART-Bev model include the selection parameter α k , learning rate β k , contribution parameter γ k , alert parameter ρ k ,The values of the parameters will affect the learning effect of the model. Through preliminary experiments, we determined the values of different parameters of the ART-Bev model.
[0105] 1) Set the selection parameters, learning rate, contribution parameters, and vigilance parameters of the state network to:
[0106] α state_net=[0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001,0.0001],
[0107] β state_net =[0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3,0.3],
[0108] γ state_net =[0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1,0.1],
[0109] ρ state_net =[0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8,0.8].
[0110] 2) Set the action network selection parameters, learning rate, contribution parameters, and vigilance parameters to:
[0111] α action_net =[0.0001,0.0001,0.0001,0.0001,0.0001,0.0001],
[0112] β action_net =[0.3,0.3,0.3,0.3,0.3,0.3],
[0113] γ action_net =[0.1,0.1,0.1,0.1,0.1,0.1],
[0114] ρ action_net =[0.8,0.8,0.8,0.8,0.8,0.8].
[0115] 3) Set the selection parameters, learning rate, contribution parameters, and vigilance parameters of the rule network to:
[0116] α rule_net =[0.0001,0.0001],β rule_net =[0.3,0.3],
[0117] γ rule_net =[0.1,0.1],ρ rule_net =[1,1].
[0118] (3) Analysis of specific rules
[0119] Based on the determined experimental parameters and the sample data including the number of tank trajectories of the red and blue teams, the rule base generated by model learning includes 31 rules. We select one rule for specific analysis, as shown in Table 3.
[0120] Based on the numerical analysis in Table 3, the decision behavior information implied by the rule is expressed as the tank moving forward when the sound sensor senses that there are other objects to be modeled in front and the obstacle sensor senses that there are no obstacles in front.
[0121] Table 3 Rule parsing example
[0122]
[0123]
[0124] The rule can be converted into a behavior tree structure with a sequence node as the root node and multiple condition nodes and action nodes under it, such as Figure 6 The decision-making behavior represented by this behavior tree is that when the shell sensor does not sense the incoming shells, the radar sensor does not detect the enemy tank, there is no obstacle in front, and the sound sensor detects that there is a tank in front that has moved at the last moment, the tank moves forward.
[0125] (4) Behavior Tree Conversion
[0126] The rule base generated by the ART-Bev model is analyzed and converted into a behavior tree. The rule base includes 31 behavior rules, of which 5 are composed of unenabled nodes. Unenabled nodes refer to nodes that are defined by default by ART-Bev before initialization and correspond to all input domains that are all set to 1. Such rules are formed because the ART model indiscriminately uses unenabled nodes to generate rules when learning to build rules. In addition, the rule base includes 3 rules without action nodes. We checked the input trajectory sample data and found that at certain moments when the tank radar was turned off, the collected state-action pairs only had states without actions. Analysis found that in the simulation environment, when a tank passes through an energy station or a maintenance station in the map, it will stop at the corresponding location to replenish energy or repair. Replenishing energy and repairing are the underlying operations of the platform. At this time, the tank stops in place and does not perform any actions. Therefore, the collected sample data only has states without actions. "No action" is also learned and generalized into a special type of empty action node, and the rule base generated based on this also includes rules without actions. The above two types of rules cannot provide references for tank decision-making behavior, but they are easy to distinguish and can be easily cleared when converted to form a behavior tree.
[0127] In addition, the rule base also includes 3 rules with logical errors. The possible reason is that there is too much state information of the tank, which introduces a certain ambiguity to the generalization of model learning. The first wrong rule is that when the obstacle sensor senses an obstacle on the left and the sound sensor detects other tanks that have moved on the left at the last moment, the tank still performs the "turn left" action. The reason for the analysis of the error is that the sound sensor detects other tanks on the left, and the tank still turns left directly to try to get close to the target tank. The second wrong rule is that the sound sensor detects that there may be a tank that has moved in front, but there is an obstacle directly in front of the tank, and the tank still performs the "move forward" action. The third wrong rule is that when the radar is turned on and there is no obstacle in front, the tank will perform the actions of "turning on the radar" and "moving forward". This rule will not cause errors in execution, but its judgment of the tank's own state is incorrect.
[0128] After deleting the invalid rules above, analyze the specific rules and convert them into a behavior tree structure. Figure 7 The figure shows the rule subtrees formed by the transformation of four rules in the rule base, where (a), (b), (c), and (d) are the rule subtrees formed by the transformation of the 8th, 9th, 10th, and 13th rules respectively.
[0129] (5) Qualitative comparison of models
[0130] Because the sample trajectory is generated by the simple behavior tree script, we compare the generated behavior tree model with simple to find out whether there is a behavior tree module in simple that is similar to the generated rule subtree. Simple includes four modules: attack, retreat, follow, and reconnaissance. Different modules need to meet corresponding situation conditions.
[0131] Figure 6 The rule subtree corresponding to the rule in is identical in semantics and functionality to the subtree corresponding to the ConChaseMove conditional node in the simple follow module. Figure 6 The conditional state in the behavior subtree indicates that the tank shell sensor does not detect incoming shells, the radar sensor does not detect enemy tanks, the obstacle sensor senses that there is no obstacle in front, and the sound sensor detects a tank that moved in the previous moment in front. When the tank meets the above four conditions, the behavior subtree can perform the corresponding "move forward" action. ConChaseMove judges the two conditions that the tank's sound sensor detects the tank that moved in the previous moment and there is no obstacle in front of the tank. When the tank meets the above conditions, the tank performs the "move forward" action.
[0132] Figure 7The rule subtree corresponding to the 10th rule in the simple script is the same as the behavior subtree corresponding to the ConAttackFire node under the attack module in the simple script in terms of semantics and function. This node is used to determine whether the radar sensor detects an enemy tank in front of it and the number of tank shells is greater than 0 at the current moment. If so, CGF executes the "fire" action. Figure 7 The rule subtree corresponding to the 10th rule in achieves the same function. Similarly, all rule subtrees generated by the ART-Bev model can find similar behavior subtree modules in the simple script.
[0133] Based on the example trajectory data of a confrontation round, the rule base learned by the model can be summarized into 9 behavior subtree modules, which form the following Figure 8 The behavior tree model except the red box is shown. The first three rule subtree modules implement some functions of the simple script attack module, the fourth and fifth subtrees implement some functions of the simple script follow module, and the last four subtrees implement some functions of the simple script roaming module. Based on the example trajectory data of two adversarial rounds, the rule base learned by the model can be summarized into 10 behavior subtree modules, which are further formed as follows Figure 8 The behavior tree model including the red box is shown. This model can realize some functions of the attack, retreat, follow, and roam modules of the simple script.
[0134] The behavior model (simple behavior tree) that generates the example trajectory is as follows Fig. 9 As shown, it includes four behavior modules: Attack, Retreat, Chase, and Wander, which respectively realize the functions of attack, retreat, chase, and roaming.
[0135] The interpretable decision-making behavior model generated by the ART-Bev model under the drive of example trajectory data has certain similarities with the behavior model that generates example trajectories in terms of semantics and structure.
[0136] In one embodiment, Fig.10 As shown, a decision behavior modeling device based on an ART network is provided, comprising: an example trajectory data acquisition module, a decision behavior modeling model construction module and a decision behavior tree structure determination module, wherein:
[0137] The sample trajectory data acquisition module is used to acquire sample trajectory data of the object to be modeled; the sample trajectory data consists of a pair of state information and action information of the object to be modeled at each moment from the initial moment to the end time of the confrontation.
[0138] The decision behavior modeling model building module is used to build a decision behavior modeling model based on the ART network. The decision behavior modeling model includes: a state network, an action network and a rule network; the state network, the action network and the rule network are all Fusion ART networks; the Fusion ART network includes multiple input domains and 1 category domain.
[0139] The decision behavior tree structure determination module is used to input the state information into the state network after preprocessing to obtain a number of state nodes; input the action information into the action network after preprocessing to obtain a number of action nodes; input the action nodes and the state nodes into the rule network to obtain a number of decision behavior rules; and obtain the decision behavior tree structure according to the number of decision behavior rules.
[0140] In one of the embodiments, the decision behavior tree structure determination module also includes an input domain re-dividing module, which is used to re-divide the corresponding input domain according to the values of the object's own attribute data, sound sensor data, radar left front side information, radar front side information, and radar right front side information.
[0141] In one embodiment, the state information includes the self-attribute data of the object to be modeled, obstacle data, shell data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information; the self-attribute data of the object to be modeled includes the energy value, life value, number of shells, radar opening state, and shield opening state of the object to be modeled; the decision behavior tree structure determination module is also used to encode the self-attribute data of the object to be modeled, obstacle data, shell data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information in the form of one-hot encoding according to a preset state preprocessing rule to obtain corresponding 9 state input vectors; input the 9 state input vectors into the input domain of the corresponding state network, add complement to the state vector in each input domain to obtain an activation vector; input all activation vectors into the category domain of the state network, and calculate the activation value of each memory node in the category domain according to the activation vector; find the memory node T with the highest activation value J ; If the memory node J satisfies both the highest activation value and the similarity between the weight vector and the input vector is greater than the alert parameter, it means that the current input information matches the memory node J successfully, that is, resonance occurs; refer to the input information to adaptively adjust the weight vector of the activation node J to enhance its generalization ability; if there is no node in the category domain of the state network that matches the current input information, a new memory node is created in the category domain of the state network, and its weight vector is set to the activation vector x k .
[0142] In one embodiment, the calculation expression of the activation value in the decision behavior tree structure determination module is as shown in formula (1).
[0143] In one embodiment, the adaptive adjustment formula of the weight vector of the activated node J in the decision behavior tree structure determination module is as shown in formula (2).
[0144] In one embodiment, the decision behavior tree structure determines the memory node T with the highest activation value in the module. J Determined according to formula (3).
[0145] If the largest T j If there is only one, then the memory node is directly selected; if the largest T j If it is not unique, the memory node with the smallest index is selected first; at time t = 0, the initial value of each component is set to 1, and at other times, the memory node T in the category domain of the state network is set J The activation vector of is set to 1 and the other activation vectors are set to 0.
[0146] In one of the embodiments, the decision behavior tree structure determination module is further used to represent a single decision behavior rule as a rule node in the form of if-then, each rule node in the form of if-then is a rule subtree; the rule subtree has a behavior tree structure whose root node is a sequence node and includes condition nodes and action nodes; according to the semantic relationship of the rule base composed of decision behavior rules, all rule subtrees are combined into a decision behavior tree structure; the decision behavior tree structure is a behavior tree structure whose root node is a selection node and includes multiple rule subtrees.
[0147] For the specific limitations of the decision-making behavior modeling device based on the ART network, please refer to the limitations of the decision-making behavior modeling method based on the ART network above, which will not be repeated here. Each module in the above-mentioned decision-making behavior modeling device based on the ART network can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0148] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Fig.11As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a decision behavior modeling method based on an ART network is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a button, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0149] Those skilled in the art will understand that Fig.11 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0150] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method embodiment when executing the computer program.
[0151] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0152] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0153] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0154] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A decision behavior modeling method based on ART network, characterized in that: The method comprises: Obtaining example trajectory data of the object to be modeled; the example trajectory data is composed of a pair of state information and action information of the object to be modeled at each moment between the initial moment and the end time of the confrontation; the object to be modeled is a game character in a game, a movable device, or a robot in a multi-robot system; the state information includes the object to be modeled's own attribute data, obstacle data, shell data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information; the object to be modeled's own attribute data includes the object to be modeled's energy value, life value, number of shells, radar on state, and shield on state; A decision behavior modeling model based on an ART network is constructed, wherein the decision behavior modeling model includes: a state network, an action network, and a rule network; the state network, the action network, and the rule network are all Fusion ART networks; the Fusion ART network includes multiple input domains and one category domain; Re-dividing the corresponding input domain according to the values of the self-attribute data of the object to be modeled, the sound sensor data, the radar left front side information, the radar front side information and the radar right front side information; The state information is pre-processed and then input into the state network to obtain a plurality of state nodes; Preprocessing the action information and inputting it into the action network to obtain a plurality of action nodes; Inputting the action node and the state node into the rule network to obtain a plurality of decision-making behavior rules; According to a plurality of said decision behavior rules, a decision behavior tree structure is obtained; The state information is pre-processed and then input into the state network to obtain several state nodes, including: According to the preset state preprocessing rules, the self-attribute data of the object to be modeled, obstacle data, projectile data, radar wave sensor data, smell sensor data, sound sensor data, radar left front side information, radar front information and radar right front side detection information are encoded in one-hot encoding to obtain corresponding 9 state input vectors; Inputting 9 state input vectors into the corresponding input domain of the state network, adding complements to the state vectors in each input domain to obtain activation vectors; All activation vectors are input into the category domain of the state network, and the activation value of each memory node in the category domain is calculated according to the activation vector; the calculation expression of the activation value is: Among them, T j is the activation value of each memory node j, x k is the kth activation vector, α k To select the parameters, γ k is the contribution parameter, ∧ is the AND operator, |·| is the norm, and n is the number of input domains in the state network; Find the memory node T with the highest activation value J ; If the memory node J satisfies the highest activation value and the similarity between the weight vector and the input vector is greater than the alert parameter, it means that the current input information matches the memory node J successfully, that is, resonance occurs; the weight vector of the activation node J is adaptively adjusted with reference to the input information to enhance its generalization ability; the adaptive adjustment formula of the weight vector of the activation node J is: in, Memory node j is activated according to the new input vector x k Adjust the weight vector associated with the k-th input field; The weight vector associated with the kth input domain is obtained by adjusting the activation vector of the previous k-1 inputs for the memory node j; If there is no node in the category domain of the state network that matches the current input information, a new memory node is created in the category domain of the state network, and its weight vector is set to the activation vector x k .
2. The method according to claim 1, characterized in that Find the memory node T with the highest activation value J , the memory node T with the highest activation value in step J for: T J =max{T j ;j=1,2,...,n}. If the largest T j If there is only one, then the memory node is directly selected; if the largest T j If it is not unique, the memory node with the smallest index is selected first; At t = 0, the initial value of each component is set to 1, and at other times, the memory node T in the category domain of the state network is set J The activation vector of is set to 1 and the other activation vectors are set to 0.
3. The method according to claim 1, characterized in that According to the plurality of decision behavior rules, a decision behavior tree structure is obtained, including: A single decision behavior rule is represented as a rule node in the form of if-then, and each rule node in the form of if-then is a rule subtree; the rule subtree has a behavior tree structure whose root node is a sequence node and which includes condition nodes and action nodes; According to the semantic relationship of the rule base composed of the decision behavior rules, all rule subtrees are combined into a decision behavior tree structure; the decision behavior tree structure is a behavior tree structure with a root node as a selection node and including multiple rule subtrees.
4. A decision behavior modeling device based on ART network, characterized in that: The device comprises: An example trajectory data acquisition module is used to acquire example trajectory data of an object to be modeled; the example trajectory data is composed of a pair of state information and action information of the object to be modeled at each moment between the initial moment and the end time of the confrontation; the object to be modeled is a game character in a game, a movable device, or a robot in a multi-robot system; the state information includes the object's own attribute data, obstacle data, shell data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information, and radar right front side detection information; the object's own attribute data includes the object's energy value, life value, number of shells, radar on state, and shield on state; A decision behavior modeling model building module is used to build a decision behavior modeling model based on an ART network, wherein the decision behavior modeling model includes: a state network, an action network, and a rule network; the state network, the action network, and the rule network are all Fusion ART networks; the Fusion ART network includes multiple input domains and one category domain; A decision behavior tree structure determination module is used to re-divide the corresponding input domain according to the values of the self-attribute data of the object to be modeled, the sound sensor data, the radar left front side information, the radar front side information and the radar right front side information; pre-process the state information and input it into the state network to obtain a plurality of state nodes; pre-process the action information and input it into the action network to obtain a plurality of action nodes; input the action nodes and the state nodes into the rule network to obtain a plurality of decision behavior rules; and obtain a decision behavior tree structure according to the plurality of decision behavior rules; Among them, the decision behavior tree structure determination module is also used to encode the self attribute data, obstacle data, projectile data, radar wave sensor data, odor sensor data, sound sensor data, radar left front side information, radar front information and radar right front side detection information of the object to be modeled in one-hot encoding according to the preset state preprocessing rules to obtain corresponding 9 state input vectors; input the 9 state input vectors into the corresponding input domain of the state network, add complement to the state vector in each input domain to obtain an activation vector; input all activation vectors into the category domain of the state network, and calculate the activation value of each memory node in the category domain according to the activation vector; the calculation expression of the activation value is: Among them, T j is the activation value of each memory node j, x k is the kth activation vector, α k To select the parameters, γ k is the contribution parameter, ∧ is the AND operator, |·| is the norm, and n is the number of input domains in the state network; Find the memory node T with the highest activation value J ; If the memory node J satisfies the highest activation value and the similarity between the weight vector and the input vector is greater than the alert parameter, it means that the current input information matches the memory node J successfully, that is, resonance occurs; the weight vector of the activation node J is adaptively adjusted with reference to the input information to enhance its generalization ability; the adaptive adjustment formula of the weight vector of the activation node J is: in, Memory node j is activated according to the new input vector x k Adjust the weight vector associated with the k-th input field; The weight vector associated with the kth input domain is obtained by adjusting the activation vector of the previous k-1 inputs for the memory node j; If there is no node in the category domain of the state network that matches the current input information, a new memory node is created in the category domain of the state network, and its weight vector is set to the activation vector x k .
5. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Intelligent combat equipment decision-making platform
CN112287521A
Reasoning algorithm of human-like behavior decision model
CN113112021A
