CGF behavior modeling method and system supporting multi-programming language behavior tree engine

Through the behavior tree engine that supports multi-programming languages, the problems of low efficiency and poor reusability of behavior tree editing in the prior art are solved, and efficient behavior tree modeling and code reuse are achieved.

CN119250169BActive Publication Date: 2025-03-04NAT UNIV OF DEFENSE TECH
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411765662.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-12-04
Publication Date
2025-03-04
Estimated Expiration
2044-12-04

AI Technical Summary

Technical Problem

In the prior art, behavior trees are usually manually edited, resulting in inefficient production, difficult to reuse and transplant, and lack of visual editing tools and multi-programming language support.

Method used

It provides a CGF behavior modeling method and system that supports multi-programming language behavior tree engines. By modeling the CGF decision behavior tree according to the task concept, it generates the corresponding behavior tree framework, including the behavior tree description file, the behavior tree engine and code block, completes the business logic encoding of the condition node and the action node, obtains the executable behavior tree dynamic library, and completes the CGF behavior control through the behavior tree engine to load and drive the behavior tree.

Benefits of technology

It improves the efficiency of behavior tree modeling, reduces the workload of manual coding, improves the reusability and flexibility of the code, and makes the behavioral model more easily reusable and portable to different application scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119250169B_ABST
    Figure CN119250169B_ABST
Patent Text Reader

Abstract

The present invention relates to a CGF behavior modeling method and system supporting a multi-programming language behavior tree engine. The method comprises: constructing a CGF decision behavior tree, and generating a CGF behavior tree framework corresponding to the CGF decision behavior tree according to a programming language selected by a user; the CGF behavior tree framework comprises a behavior tree description file, a behavior tree engine and a code block; the code block comprises a condition node code block and an action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the business logic encoding of the condition node and the action node is completed according to the code block to obtain an executable behavior tree dynamic library; the behavior tree description file and the executable behavior tree dynamic library are loaded through the behavior tree engine, and the CGF decision behavior tree is driven according to a preset time interval to complete the CGF behavior control. The method can improve the efficiency of CGF behavior modeling and the reusability and flexibility of the behavior model.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of simulation technology, and in particular to a CGF behavior modeling method and system supporting a multi-programming language behavior tree engine. Background Art

[0002] Computer-generated forces (CGF) simulate human behavior through computer technology virtual agents and respond to events in the simulation environment. By introducing CGF in the simulation training environment, it can effectively reduce the consumption of manpower and material resources in training, reduce training costs, and improve training quality.

[0003] In the field of CGF artificial intelligence, behavior trees are widely used to describe CGF behaviors and drive CGF models to complete training plans and goals. A behavior tree is a tree structure that contains control nodes, action nodes, condition nodes, and decoration nodes. Whenever a behavior needs to be triggered, it will be triggered from the root node of the behavior tree, traversing each node to find a behavior that meets the current conditions.

[0004] Behavior trees are usually manually edited and created, which is inefficient and difficult to reuse and migrate. Therefore, it is necessary to provide a visual behavior tree editing tool to generate behavior tree frameworks in multiple programming languages ​​to improve the modeling efficiency and reusability of behavior trees. Summary of the invention

[0005] Based on this, it is necessary to provide a CGF behavior modeling method and system that supports multiple programming language behavior tree engines to address the above technical issues.

[0006] A CGF behavior modeling method supporting a multi-programming language behavior tree engine, the method comprising:

[0007] Model the CGF behavior according to the mission assumption and obtain the CGF decision behavior tree;

[0008] Generate a CGF behavior tree framework corresponding to the CGF decision behavior tree according to the programming language selected by the user; the CGF behavior tree framework includes a behavior tree description file, a behavior tree engine and a code block; the code block includes a condition node code block and an action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the behavior tree description file includes the node information of the CGF decision behavior tree;

[0009] Complete the business logic coding of the conditional nodes and the action nodes according to the code blocks to obtain an executable behavior tree dynamic library;

[0010] The behavior tree description file and the executable behavior tree dynamic library are loaded through the behavior tree engine, and the CGF decision behavior tree is driven according to a preset time interval to complete the CGF behavior control.

[0011] In one of the embodiments, the method further includes: during the first update, the behavior tree engine traverses the control node and the decoration node from top to bottom, and checks in turn whether the child nodes meet the execution conditions; if the currently traversed action node is being executed and has not yet been completed, the action node returns RUNNING, and the control node and the decoration node mark the current action node as an inline child node, and during the next update, the inline child node is directly called until the inline child node is canceled when the execution is completed.

[0012] In one embodiment, the method further includes: parsing the task assumptions to obtain the execution conditions and execution actions of each task, editing the behavior tree according to the execution conditions and execution actions, and obtaining the CGF decision behavior tree.

[0013] In one of the embodiments, during simulation runtime, the behavior tree description file and the executable behavior tree dynamic library are dynamically adjusted according to demand.

[0014] In one embodiment, the conditional node code block is used to complete the conditional judgment logic, and the action node code block is used to complete the action execution logic.

[0015] In one embodiment, the mission scenario includes a maneuvering mission, an attack mission, and a reconnaissance mission; the CGF decision behavior tree includes a root node and a subtree; the root node is a sequential node; and the subtree includes a maneuvering subtree, an attack subtree, and a reconnaissance subtree.

[0016] In one of the embodiments, the method further includes: selecting a corresponding behavior tree engine according to a programming language selected by a user.

[0017] A CGF behavior modeling system supporting multiple programming language behavior tree engines, the system comprising:

[0018] The behavior modeling module is used to model the CGF behavior according to the task assumptions and obtain the CGF decision behavior tree;

[0019] A behavior model generation module, used to generate a CGF behavior tree framework corresponding to the CGF decision behavior tree according to a programming language selected by a user; the CGF behavior tree framework includes a behavior tree description file, a behavior tree engine and a code block; the code block includes a condition node code block and an action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the behavior tree description file includes the node information of the CGF decision behavior tree;

[0020] A behavior model encoding module, used to complete the business logic encoding of the condition nodes and action nodes according to the code blocks to obtain an executable behavior tree dynamic library;

[0021] The behavior model execution module is used to load the behavior tree description file and the executable behavior tree dynamic library through the behavior tree engine, and drive the CGF decision behavior tree to complete the CGF behavior control according to the preset time interval.

[0022] The CGF behavior modeling method and system supporting multiple programming language behavior tree engines decomposes complex CGF behaviors into manageable nodes through the behavior tree structure, which helps to quickly understand and modify the behavior logic. The CGF decision behavior tree obtained by modeling is used to generate a CGF behavior tree framework supporting multiple programming languages, which reduces the workload of manual coding and improves efficiency. The business logic coding of condition nodes and action nodes is completed according to the code blocks in the CGF behavior tree framework to obtain an executable behavior tree dynamic library. The generated executable behavior tree dynamic library can be shared in different projects to avoid repeated development and improve the reusability of the code. The framework design separates the behavior tree dynamic library from the behavior tree description file, thereby realizing the decoupling of logic and data, which is not only convenient for independent optimization of logic without affecting the overall architecture, but also improves the maintenance and update efficiency of the behavior tree. During simulation, the behavior tree description file and the executable behavior tree dynamic library are loaded through the behavior tree engine to drive the CGF decision behavior tree to complete the CGF behavior control. The embodiment of the present invention can improve the efficiency of CGF behavior modeling, provide developers with greater flexibility, and enable the behavior model to be more easily reused and transplanted to different application scenarios. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] Figure 1 A schematic diagram of a flow chart of a CGF behavior modeling method supporting a multi-programming language behavior tree engine in one embodiment;

[0024] Figure 2 A schematic diagram of the structure of a CGF decision behavior tree in an embodiment;

[0025] Figure 3 A schematic diagram of the structure of a CGF behavior tree framework in one embodiment;

[0026] Figure 4 FIG. 1 is a schematic diagram of the structure of a CGF behavior modeling system that supports multiple programming language behavior tree engines in another embodiment. DETAILED DESCRIPTION

[0027] In order to make the purpose, technical solution and advantages of the present invention more clearly understood, the present invention 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 invention and are not intended to limit the present invention.

[0028] In one embodiment, Figure 1 As shown, a CGF behavior modeling method supporting a multi-programming language behavior tree engine is provided, comprising the following steps:

[0029] Step 102, modeling the CGF behavior according to the task assumption to obtain a CGF decision behavior tree.

[0030] CGF behavior modeling is to model CGF behavior according to the mission assumptions and obtain a CGF decision behavior tree. For example, the assumption tasks are classified into maneuver tasks, attack tasks, and reconnaissance tasks, and a CGF decision behavior tree is constructed, such as Figure 2 As shown, the root node of the CGF decision behavior tree is a sequential node, and its subtrees are maneuver subtree, attack subtree and reconnaissance subtree. The behavior tree completes corresponding actions according to different tasks.

[0031] Step 104: Generate a CGF behavior tree framework corresponding to the CGF decision behavior tree according to the programming language selected by the user.

[0032] like Figure 3 The structure diagram of the CGF behavior tree framework is shown in the figure. The CGF behavior tree framework includes a behavior tree description file, a behavior tree engine, and code blocks. The code blocks include conditional node code blocks and action node code blocks. The behavior tree code blocks are used to describe the specific execution logic of each node. The execution logic of the control node and the decoration node has been encapsulated in the behavior tree engine. Users need to complete the business logic of the conditional node and the action node. The behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node. The behavior tree description file includes the node information of the CGF decision behavior tree. The formats of the behavior tree description file include xml, json, and txt. The CGF behavior tree framework supports multiple programming languages, such as Python, C++, and Java. The behavior tree engine can load the behavior tree description file and dynamic library to drive the behavior tree execution, realize CGF behavior control, and support users to select different engine versions according to the programming language.

[0033] Step 106, complete the business logic coding of the condition node and the action node according to the code block to obtain an executable behavior tree dynamic library.

[0034] It can be understood that the CGF behavior tree framework is designed to separate the dynamic library and description file, thereby decoupling logic and data, making maintenance and updates easier, and the behavior logic can be optimized independently without affecting the overall architecture. At runtime, the behavior tree description file or dynamic library can be modified as needed to achieve dynamic adjustment of the behavior, support real-time strategy changes or adapt to new environmental conditions.

[0035] Step 108, loading the behavior tree description file and the executable behavior tree dynamic library through the behavior tree engine, and driving the CGF decision behavior tree according to the preset time interval to complete the CGF behavior control.

[0036] It can be understood that driving according to a preset time interval can ensure that the behavior control of the CGF remains consistent and smooth in a real-time environment, making it responsive and adaptable to dynamically changing scenarios.

[0037] In the CGF behavior modeling method supporting multiple programming language behavior tree engines, the behavior tree structure is used to decompose complex CGF behaviors into manageable nodes, which helps to quickly understand and modify behavior logic. The CGF decision behavior tree obtained by modeling is used to generate a CGF behavior tree framework supporting multiple programming languages, which reduces the workload of manual coding and improves efficiency. The business logic coding of condition nodes and action nodes is completed according to the code blocks in the CGF behavior tree framework to obtain an executable behavior tree dynamic library. The generated executable behavior tree dynamic library can be shared in different projects to avoid repeated development and improve the reusability of the code. The framework design separates the behavior tree dynamic library from the behavior tree description file, thereby realizing the decoupling of logic and data, which is not only convenient for independent optimization of logic without affecting the overall architecture, but also improves the maintenance and update efficiency of the behavior tree. During simulation, the behavior tree description file and the executable behavior tree dynamic library are loaded through the behavior tree engine to drive the CGF decision behavior tree to complete the CGF behavior control. The embodiment of the present invention can improve the efficiency of CGF behavior modeling, provide developers with greater flexibility, and enable the behavior model to be more easily reused and transplanted to different application scenarios.

[0038] In one embodiment, modeling CGF behavior according to task assumptions to obtain a CGF decision behavior tree includes: parsing the task assumptions to obtain execution conditions and execution actions for each task, editing a behavior tree according to the execution conditions and execution actions to obtain a CGF decision behavior tree.

[0039] In this embodiment, the CGF behavior modeling step includes task parsing, CGF behavior tree editing and CGF behavior tree proofreading. Task parsing refers to extracting the execution conditions and execution actions of each task in the task. CGF behavior tree editing is to establish a CGF decision behavior tree based on the task parsing results. CGF behavior tree proofreading performs legality verification on the edited behavior tree. CGF behavior tree node editing is performed through a visual behavior tree editing tool, specifically including editing action nodes, condition nodes, control nodes and decoration nodes according to the task parsing results, connecting the edited behavior tree nodes according to the corresponding decision logic, obtaining a CGF decision behavior tree, and performing syntax detection on the user-edited behavior tree.

[0040] In one embodiment, the method further includes: dynamically adjusting the behavior tree description file and the executable behavior tree dynamic library according to demand during simulation operation.

[0041] In one embodiment, the conditional node code block is used to complete the conditional judgment logic, and the action node code block is used to complete the action execution logic.

[0042] In this embodiment, the developer needs to process according to the specific business logic of the condition node, and the developer needs to process according to the specific business logic of the action node.

[0043] In one embodiment, the mission scenarios include a maneuver mission, an attack mission, and a reconnaissance mission.

[0044] In one embodiment, the CGF decision behavior tree includes a root node and subtrees; the root node is a sequential node; the subtrees include a maneuver subtree, an attack subtree, and a reconnaissance subtree.

[0045] In one embodiment, the method further includes: selecting a corresponding behavior tree engine according to a programming language selected by a user.

[0046] In one embodiment, the method further includes: during the first update, the behavior tree engine traverses the control node and the decoration node from top to bottom, and checks in turn whether the child nodes meet the execution conditions; if the currently traversed action node is being executed and has not yet been completed, the action node returns RUNNING, and the control node and the decoration node mark the current action node as an inline child node, and during the next update, the inline child node is directly called until the inline child node is canceled when the execution is completed.

[0047] In this embodiment, the behavior tree is updated according to the original logic when it is updated for the first time. When the action node cannot be completed immediately and returns RUNNING, the action node will inline its parent node from bottom to top. When the behavior tree is updated again, the control node and the decoration node will no longer iterate, and the inline child node will be directly called to improve the operation efficiency of the behavior tree. The control node and the decoration node maintain an inline child node. When the behavior tree encounters an action node that cannot be completed immediately during operation, it will return RUNNING. The parent node will inline the child node according to the RUNNING status of the child node. When the behavior tree runs next time, the control node and the decoration node will determine whether there is an inline child node. If so, the inline child node will be run directly until the inline child node is completed, and the parent node will be notified to cancel the inline.

[0048] Specifically, the behavior tree engine will drive the update of the behavior tree based on the set time interval (for example, every frame or every timed update). When the behavior tree engine updates for the first time, it will traverse the behavior tree from the root node to the bottom according to the original logic. The control node will check the execution condition of each child node and decide whether to continue execution based on its return value. If the current child node is an action node and the action node has not yet completed, it will return RUNNING, indicating that the action node is executing. The decoration node will modify or wrap the return value of the node based on the execution status of the child node, for example, return SUCCESS or FAILURE, or change the status of the child node to RUNNING based on certain conditions. When the behavior tree engine finds that an action node returns RUNNING, it marks the action node as an inline child node in the control node and decoration node. When the control node and decoration node are executed, they will check the status of each child node. If the state of a child node is RUNNING, they will mark the child node as an inline child node and associate the execution state of the inline child node with the execution flow of the parent node. The next time the behavior tree is updated, the behavior tree engine will no longer traverse the control node and the decoration node, but directly execute the inline child node and update the state of the parent node according to the node's state (SUCCESS, FAILURE, RUNNING). This avoids re-traversing the tree structure and improves efficiency.

[0049] In the CGF behavior tree framework, when an action node returns RUNNING, the code block in the dynamic library will be called and kept executing until the node is completed or fails. At each update, the behavior tree engine will get the current execution status from the node code in the dynamic library. Control nodes and decoration nodes will rely on inline child nodes to execute, directly calling the code block of the inline child nodes instead of executing the node judgment logic.

[0050] 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.

[0051] In one embodiment, Figure 4 As shown, a CGF behavior modeling system supporting a multi-programming language behavior tree engine is provided, including:

[0052] The behavior modeling module is used to model the CGF behavior according to the task assumptions and obtain the CGF decision behavior tree;

[0053] The behavior model generation module is used to generate the CGF behavior tree framework corresponding to the CGF decision behavior tree according to the programming language selected by the user; the CGF behavior tree framework includes the behavior tree description file, the behavior tree engine and the code block; the code block includes the condition node code block and the action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the behavior tree description file includes the node information of the CGF decision behavior tree;

[0054] The behavior model encoding module is used to complete the business logic encoding of the condition nodes and action nodes according to the code blocks to obtain an executable behavior tree dynamic library;

[0055] The behavior model execution module is used to load the behavior tree description file and the executable behavior tree dynamic library through the behavior tree engine, and drive the CGF decision behavior tree according to the preset time interval to complete the CGF behavior control.

[0056] In this embodiment, if Figure 4 As shown in the figure, the behavior model modeling module is a visual behavior tree editing tool. Users can edit behavior trees according to task assumptions. The visual behavior tree editing tool includes behavior tree node editing, behavior tree node connection and behavior tree detection. The behavior tree node editing includes action nodes, condition nodes, control nodes and decoration nodes, which are used to describe CGF behavior actions. The behavior tree node connection is to install certain decision logic to connect the edited behavior tree nodes to get the decision behavior tree of CGF. The behavior tree detection is to perform syntax detection on the behavior tree edited by the user. The behavior tree edited by the user must have the basic characteristics of the tree. The behavior model encoding module has edited other contents of each node for the user. You only need to complete the business logic encoding to generate an executable behavior tree dynamic library. The behavior model debugging module provides a visual behavior tree execution process, which is convenient for users to debug their own behavior trees.

[0057] In one of the embodiments, during the first update, the behavior tree engine traverses the control node and the decoration node from top to bottom, and checks in turn whether the child nodes meet the execution conditions; if the currently traversed action node is being executed and has not yet been completed, the action node returns RUNNING, and the control node and the decoration node mark the current action node as an inline child node. During the next update, the inline child node is directly called until the inline child node is canceled when the execution is completed.

[0058] In one embodiment, it is also used to parse the task assumptions, obtain the execution conditions and execution actions of each task, edit the behavior tree according to the execution conditions and execution actions, and obtain the CGF decision behavior tree.

[0059] In one embodiment, it is also used to dynamically adjust the behavior tree description file and the executable behavior tree dynamic library according to demand during simulation operation.

[0060] In one embodiment, the conditional node code block is used to complete the conditional judgment logic, and the action node code block is used to complete the action execution logic.

[0061] In one embodiment, the mission scenario includes a maneuvering mission, an attack mission, and a reconnaissance mission; the CGF decision behavior tree includes a root node and a subtree; the root node is a sequential node; and the subtree includes a maneuvering subtree, an attack subtree, and a reconnaissance subtree.

[0062] In one embodiment, it is further used to select a corresponding behavior tree engine according to a programming language selected by a user.

[0063] In one embodiment, the behavior tree modeling module includes a visual behavior tree editing tool for parsing task scenarios, obtaining execution conditions and execution actions of each task, and editing the behavior tree according to the execution conditions and execution actions to obtain a CGF decision behavior tree.

[0064] In one embodiment, the system further includes a behavior model debugging module, which includes a visual behavior tree debugging tool for displaying the behavior tree execution status, which includes the current execution node, node execution status, and node information.

[0065] The specific definition of the CGF behavior modeling system supporting multiple programming language behavior tree engines can be found in the above definition of the CGF behavior modeling method supporting multiple programming language behavior tree engines, which will not be repeated here. Each module in the above CGF behavior modeling system supporting multiple programming language behavior tree engines can be implemented in whole or in part by software, hardware, and a combination thereof. The above 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 in the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.

[0066] 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.

[0067] The above-mentioned embodiments only express several implementation modes of the present invention, and the description thereof is relatively specific and detailed, but it cannot be understood as limiting the scope of the invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present invention, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the attached claims.

Claims

1. A CGF behavior modeling method supporting multiple programming language behavior tree engines, characterized in that: The method comprises: Model the CGF behavior according to the mission assumption and obtain the CGF decision behavior tree; Generate a CGF behavior tree framework corresponding to the CGF decision behavior tree according to the programming language selected by the user; the CGF behavior tree framework includes a behavior tree description file, a behavior tree engine and a code block; the code block includes a condition node code block and an action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the behavior tree description file includes the node information of the CGF decision behavior tree; Complete the business logic coding of the conditional nodes and the action nodes according to the code blocks to obtain an executable behavior tree dynamic library; Loading the behavior tree description file and the executable behavior tree dynamic library through the behavior tree engine, and driving the CGF decision behavior tree to complete the CGF behavior control according to the preset time interval; During the first update, the behavior tree engine traverses the control nodes and decoration nodes from top to bottom, checking whether the child nodes meet the execution conditions in turn; If the currently traversed action node is being executed and has not yet been completed, the action node returns RUNNING, and the control node and the decoration node mark the current action node as an inline child node. During the next update, the inline child node is directly called until the inline child node is executed and the inline is canceled; The CGF behavior is modeled according to the mission scenario, and the CGF decision behavior tree includes: Analyze the task assumptions, obtain the execution conditions and execution actions of each task, edit the behavior tree according to the execution conditions and execution actions, and obtain the CGF decision behavior tree.

2. The method according to claim 1, characterized in that The method further comprises: When the simulation is running, the behavior tree description file and the executable behavior tree dynamic library are dynamically adjusted according to the needs.

3. The method according to claim 1, characterized in that: The condition node code block is used to complete the condition judgment logic, and the action node code block is used to complete the action execution logic.

4. The method according to claim 1, characterized in that: The mission scenarios include maneuver missions, attack missions, and reconnaissance missions; The CGF decision behavior tree includes a root node and subtrees; the root node is a sequential node; the subtrees include a maneuver subtree, an attack subtree and a reconnaissance subtree.

5. The method according to claim 1, characterized in that The method further comprises: Select the corresponding behavior tree engine based on the programming language selected by the user.

6. A CGF behavior modeling system supporting multiple programming language behavior tree engines, characterized in that: The system comprises: The behavior modeling module is used to model the CGF behavior according to the task assumptions and obtain the CGF decision behavior tree; A behavior model generation module, used to generate a CGF behavior tree framework corresponding to the CGF decision behavior tree according to a programming language selected by a user; the CGF behavior tree framework includes a behavior tree description file, a behavior tree engine and a code block; the code block includes a condition node code block and an action node code block; the behavior tree engine is used to encapsulate the execution logic of the control node and the decoration node; the behavior tree description file includes the node information of the CGF decision behavior tree; A behavior model encoding module, used to complete the business logic encoding of the condition nodes and action nodes according to the code blocks to obtain an executable behavior tree dynamic library; A behavior model execution module is used to load the behavior tree description file and the executable behavior tree dynamic library through the behavior tree engine, and drive the CGF decision behavior tree to complete the CGF behavior control according to a preset time interval; The behavior tree modeling module includes a visual behavior tree editing tool for parsing task assumptions, obtaining execution conditions and execution actions for each task, and editing the behavior tree according to the execution conditions and execution actions to obtain a CGF decision behavior tree; The system further includes: during the first update, the behavior tree engine traverses the control node and the decoration node from top to bottom, and checks in turn whether the child nodes meet the execution conditions; if the currently traversed action node is being executed and has not yet been completed, the action node returns RUNNING, and the control node and the decoration node mark the current action node as an inline child node, and during the next update, directly call the inline child node until the inline child node is canceled when the execution is completed.

7. The system according to claim 6, characterized in that The system further includes a behavior model debugging module, which includes a visual behavior tree debugging tool for displaying a behavior tree execution state, wherein the behavior tree execution state includes a current execution node, a node execution state, and node information.

Citation Information

Patent Citations

  • Decision control device and behavior control method for computer-generated military strength

    CN117131706A

  • CGF task planning simulation method, device and equipment based on customized behavior tree

    CN118446034A