A behavior tree diagnosis and repair method and system for agent control
Patent Information
- Application Number
- CN202610989022.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-07-03
- Publication Date
- 2026-10-02
AI Technical Summary
[0005]本发明的发明目的在于:针对上述存在的全部或部分问题,提供一种面向智能体控制的行为树诊断与修复方法及系统,以更为高效、准确地解决智能体行为树执行异常难以诊断、失败根因难以定位以及行为树结构难以自动修复的问题
本发明构建了一种面向智能体控制的行为树诊断与修复方法,用于对行为树任务过程中产生的执行异常进行自动诊断与结构化修复。该方法在任务失败或执行异常发生后,对执行路径进行回溯并提取异常执行子序列。通过将异常执行子序列与行为树结构信息结合,构建节点、状态变量及任务结果之间的因果关系模型,据此计算各节点及状态变量对任务失败的因果贡献度,并生成与根因相对应的修复策略。总体而言,本发明能够提高行为树执行异常的定位准确性,明确任务失败的主要影响因素,提高修复后行为树在相同或相似异常场景下的执行稳定性。
Smart Images

Figure CN122860946A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent agent control and behavior tree optimization technology, and particularly relates to a method and system for behavior tree diagnosis and repair for intelligent agent control. Background Technology
[0002] With the rapid development of artificial intelligence and autonomous agent technology, behavior trees, as a task modeling and control structure widely used in robot control, game AI, and autonomous decision-making systems, are used to describe the behavioral logic and execution flow of intelligent agents in complex dynamic environments. However, in practical applications, due to factors such as environmental uncertainty, state perception errors, and incomplete execution strategies, behavior trees are prone to abnormal problems such as execution failure, path deviation, or structural failure during operation, leading to a decrease in task execution success rate.
[0003] Traditional behavior tree optimization methods mainly rely on manual debugging, rule modification, or experience-based structural adjustments, lacking the ability to systematically analyze the behavior tree execution process and making it difficult to accurately pinpoint the key factors leading to task failure. Furthermore, most existing methods fail to fully utilize the state and control flow information in the execution trajectory data, lacking a root cause analysis mechanism for behavior tree execution failures, resulting in strong locality and uncertainty in the repair strategies.
[0004] The main challenges faced in behavior tree diagnosis and repair are as follows: (1) In the process of behavior tree diagnosis and repair, since the execution trajectory is composed of multi-source heterogeneous data such as node execution sequence, state variables, action output and task results, different data have temporal dependence and structural coupling characteristics. How to effectively utilize this information and accurately identify the key execution branches and abnormal execution subsequences that lead to task failure faces significant challenges. Different types of data have different effects on failure results at different execution stages, and the influence relationship is difficult to directly describe. (2) In the process of behavior tree diagnosis and repair, accurately quantifying the impact of nodes and state variables on task failure and effectively handling their uncertainty poses a significant challenge. There may be complex causal dependencies between different nodes and state variables, and they may influence each other during the propagation of time. Summary of the Invention
[0005] The purpose of this invention is to provide a method and system for diagnosing and repairing behavior trees for intelligent agent control, addressing all or part of the aforementioned problems, so as to solve more efficiently and accurately the problems of difficulty in diagnosing abnormal behavior tree execution, difficulty in locating the root cause of failure, and difficulty in automatically repairing the behavior tree structure.
[0006] The technical solution adopted in this invention is as follows: A behavior tree diagnosis and repair method for agent control, comprising: S1. Collect the node execution sequence, state variables, action outputs, and task results during the execution of the behavior tree; S2. Identify failed branches and extract abnormal execution sub-sequences based on the execution trajectory; S3. Construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables. S4. Calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and determine the root cause set; S5. Generate a behavior tree repair strategy based on the root cause set; S6. Update the behavior tree based on the optimal repair strategy.
[0007] Furthermore, S1 includes: S1.1 Collect node execution sequence data, node return state data, and state variable data during the process of the agent executing the behavior tree task. The node execution sequence is used to characterize the execution order and execution state of the behavior tree nodes. A unified representation of the behavior tree structure and its execution process is provided, and the behavior tree is... Defined as: in Represents a set of behavior tree nodes. This represents the set of parent-child connections between nodes. This represents the root node of the behavior tree. This indicates that the node returns a set of states. This represents the scheduling function for a behavior tree node. Represents node functions.
[0008] S1.2 Collect the action output data and task result data generated by the intelligent agent during the behavior tree control process. The task result data includes task success or failure indicators.
[0009] Furthermore, S2 includes: S2.1. Based on the task result data, perform anomaly detection on the behavior tree execution process to determine whether the task has failed to execute or an execution anomaly has occurred. S2.2. Based on the node execution sequence, perform backtracking analysis on the behavior tree execution path to locate the target failure branch that caused the task failure and extract the corresponding abnormal execution sub-sequence. The abnormal execution sub-sequence can be represented as: in, Indicates the abnormal execution of a subsequence. This represents the behavior tree node executed at time t. Indicates the node's return status. This represents the vector of state variables of the agent. Indicates the action output. Indicates the task result identifier.
[0010] Furthermore, S3 includes: S3.1 Extract the behavior tree nodes, state variables and task results related to task failure based on the abnormal execution subsequence to form a set of causal modeling variables; S3.2 Determine the control flow dependency between the behavior tree nodes based on the behavior tree structure information, and use the control flow dependency as a structural constraint of the causal relationship model; S3.3. Based on the changing relationships of state variables in the abnormal execution subsequence, determine the state transition dependencies between state variables and behavior tree nodes; S3.4. Based on the execution order and temporal sequence of nodes, constrain the control flow dependency and state transition dependency to construct a causal relationship model characterizing the causal dependencies between nodes, state variables, and task results. The causal relationship model can be expressed as: Where 𝐺 represents the causal relationship model, 𝑉 represents the set of causal variables consisting of behavior tree nodes, state variables, and task results, 𝐸 represents the set of causal edges, and 𝑊 represents the set of causal edge weights. For any two causal variables... and The causal edge weights between the two It can be represented as: in Indicates control flow constraints. This represents a state-dependent constraint, where α, β, and γ represent weight adjustment coefficients. This represents the decay term based on the time interval.
[0011] Furthermore, S4 includes: S4.1 Based on the aforementioned causal relationship model, intervention analysis is performed on the nodes and state variables in the abnormal execution sub-sequence to obtain the task failure impact value corresponding to each node and state variable. Task failure impact value It can be represented as: in, Representing variables The corresponding impact value of task failure, For observation and value taking, The causal intervention operation is represented as the processed value. ;
[0012] S4.2 Calculate the causal contribution of each node and state variable based on the impact value of the task failure, and sort them according to the magnitude of the causal contribution. The variables... causal contribution It can be represented as: in, Representing variables The corresponding impact value of task failure, ε represents the set of causal variables, and ε represents the smoothing coefficient used to prevent the denominator from being zero; S4.3. Nodes and state variables whose causal contribution meets the preset threshold condition are identified as the root cause set.
[0013] Furthermore, S5 includes: S5.1 Determine the object to be repaired based on the root cause set, wherein the object to be repaired includes behavior tree nodes, node parameters, conditional branches or subtree structures; S5.2. Generate candidate repair strategies based on the object to be repaired. These candidate repair strategies include node correction strategies, condition adjustment strategies, or subtree structure reconstruction strategies. When evaluating the candidate repair strategies and selecting the optimal repair strategy, the following objective function is used: in, This represents the optimal repair strategy. Represents the set of candidate repair strategies. Indicates the first One candidate repair strategy, Indicates the loss due to mission failure. Indicates the cost of execution. Indicates loss of safety constraints. This represents the loss due to changes in the behavior tree structure. , , , This represents the weighting coefficient of the corresponding loss term.
[0014] Furthermore, S6 includes: S6.1 Perform a consistency check on the optimal repair strategy to determine whether it satisfies the behavior tree structure constraints; S6.2 Apply the validated optimal repair strategy to the original behavior tree structure to update the behavior tree.
[0015] This invention also provides a behavior tree diagnosis and repair system for intelligent agent control, comprising: The system includes a data acquisition module, a failed branch identification module, a causal relationship modeling module, a causal contribution calculation module, a repair strategy generation module, and a behavior tree update module. The execution data acquisition module is used to collect the node execution sequence, state variables, action outputs and task results during the execution of the behavior tree. The failed branch identification module is used to identify failed branches based on the execution trajectory collected by the execution data acquisition module, and to extract abnormal execution sub-sequences; The causal relationship modeling module is used to construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables. The causal contribution calculation module is used to calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and to determine the root cause set. The repair strategy generation module is used to generate a behavior tree repair strategy based on the root cause set, and to evaluate and filter the behavior tree repair strategy to obtain the optimal repair strategy. The behavior tree update module is used to update the original behavior tree structure based on the optimal repair strategy.
[0016] The beneficial effects of this invention are: This invention constructs a behavior tree diagnosis and repair method for intelligent agent control, used for automatic diagnosis and structured repair of execution anomalies generated during behavior tree tasks. After task failure or execution anomaly, the method backtracks the execution path and extracts the abnormal execution subsequence. By combining the abnormal execution subsequence with behavior tree structure information, a causal relationship model is constructed between nodes, state variables, and task results. Based on this, the causal contribution of each node and state variable to task failure is calculated, and repair strategies corresponding to the root causes are generated. Overall, this invention can improve the accuracy of behavior tree execution anomaly localization, clarify the main influencing factors of task failure, and improve the execution stability of the repaired behavior tree under the same or similar anomaly scenarios.
[0017] This invention differs from traditional behavior tree debugging and repair methods. Traditional methods typically rely on manual experience or fixed rules to make local adjustments to the behavior tree, lacking a systematic analysis of the correlation between execution trajectory, state variables, and task results, making it difficult to accurately identify the root causes of task failure in complex dynamic environments. In contrast, this invention quantifies the influence of behavior tree nodes and state variables through a causal relationship model, and generates node correction strategies, condition adjustment strategies, or subtree structure reconstruction strategies based on the root cause set. Then, it updates the original behavior tree structure based on the optimal repair strategy, making it applicable to different types of behavior tree anomaly scenarios. Attached Figure Description
[0018] Figure 1 This is a flowchart illustrating the behavior tree diagnosis and repair method for intelligent agent control disclosed in this invention. Figure 2 This is a structural diagram of the behavior tree diagnosis and repair system for intelligent agent control disclosed in this invention. Detailed Implementation
[0019] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention are described clearly and completely below. Obviously, the described embodiments are only some embodiments of this invention, not all embodiments. Based on the embodiments of this invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this invention. Example
[0020] Figure 1 As shown in the figure, this embodiment provides a behavior tree diagnosis and repair method for intelligent agent control, and the specific steps are as follows: S1. Collect the node execution sequence, state variables, action outputs, and task results during the execution of the behavior tree.
[0021] In this embodiment, the intelligent agent is a warehouse mobile robot, which performs the task of moving from a starting position to a target shelf and retrieving goods. The warehouse mobile robot uses a behavior tree for task control, which includes a root node, condition nodes, and action nodes.
[0022] To facilitate the explanation of the behavior tree structure in this embodiment, some node configuration information of the behavior tree is shown in Table 1.
[0023] Table 1 Behavior Tree Node Information Table N0 Root root node Start the behavior tree task N1 CheckBattery Condition Node Determine if the battery level meets the task requirements. N2 PlanPath Action Node Generate a path to the target shelf N3 MoveToShelf Action Node Control the robot to move to the target shelf N4 CheckObstacle Condition Node Determine if there are obstacles ahead of the path. N5 PickItem Action Node Execute pickup action N6 ReturnBase Action Node Return to initial position S1 specifically includes the following steps: S1.1 Collect node execution sequence data, node return state data, and state variable data during the process of the agent executing the behavior tree task. The node execution sequence is used to characterize the execution order and execution state of the behavior tree nodes.
[0024] A unified representation of the behavior tree structure and its execution process is provided, and the behavior tree is... Defined as: in Represents a set of behavior tree nodes. This represents the set of parent-child connections between nodes. This represents the root node of the behavior tree. Represents the set of values returned by a node. This represents the scheduling function for a behavior tree node. Represents node functions.
[0025] S1.2 Collect the action output data and task result data generated by the intelligent agent during the behavior tree control process. The action output data includes path planning results, robot moving speed, stop moving command, and picking action command, etc.; the task result data includes task success or failure indicators.
[0026] The system records the return status, corresponding status variables, action outputs and task stage results of each node according to the execution order. Some of the collected execution trajectory data are shown in Table 2.
[0027] Table 2 Behavior Tree Execution Trajectory and Action Output Data Table t1 CheckBattery Success 78 12.5 3.2 Allow execution of tasks normal t2 PlanPath Success 78 12.5 3.2 Generate path A normal t3 MoveToShelf Running 76 8.1 2.5 Speed 0.6 m / s In progress t4 CheckObstacle Success 75 6.4 1.8 Continue moving normal t5 MoveToShelf Running 73 4.2 0.7 Speed 0.5m / s In progress t6 CheckObstacle Failure 72 4.1 0.3 Stop moving Obstacle detection failed t7 PickItem Not executed 72 4.1 0.3 No output Mission failed S2. Identify failed branches and extract abnormal execution sub-sequences based on execution trajectory.
[0028] S2 specifically includes the following steps: S2.1. Based on the task result data, perform anomaly detection on the behavior tree execution process to determine whether the task has failed or an execution anomaly has occurred. When the task result data is marked as a failure, or when the behavior tree node returns a Failure status, the system marks the execution trajectory as a failed execution trajectory.
[0029] S2.2. Based on the node execution sequence, the system performs backtracking analysis on the behavior tree execution path to locate the target failure branch that caused the task failure and extract the corresponding abnormal execution sub-sequence. The system backtracks from the moment of task failure to find the nodes directly related to the failure result and their predecessor nodes.
[0030] The abnormal execution subsequence can be represented as: in, Indicates the abnormal execution of a subsequence. This represents the behavior tree node executed at time t. Indicates the node's return status. This represents the vector of state variables of the agent. Indicates the action output. The result identifier indicates the task outcome. The extracted abnormal execution subsequence results are shown in Table 3.
[0031] Table 3. List of Exception Execution Subsequences S3. Construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables.
[0032] S3 specifically includes the following steps: S3.1 Extract the behavior tree nodes, state variables, and task results related to task failure based on the abnormal execution subsequence to form a causal modeling variable set. As shown in Table 4, the causal modeling variable set includes behavior tree node variables, state variables, and task result variables;
[0033] Table 4. Set of Variables for Causal Modeling S3.2 Determine the control flow dependency between the behavior tree nodes based on the behavior tree structure information, and use the control flow dependency as a structural constraint of the causal relationship model;
[0034] S3.3. Based on the changing relationships of state variables in the abnormal execution subsequence, determine the state transition dependencies between state variables and behavior tree nodes;
[0035] S3.4. Based on the execution order and temporal sequence of nodes, constrain the control flow dependency and state transition dependency to construct a causal relationship model representing the causal dependencies between nodes, state variables, and task results. This causal relationship model, used to represent the causal dependencies between behavior tree nodes, state variables, and task results, can be expressed as:
[0036] Where 𝐺 represents the causal relationship model, 𝑉 represents the set of causal variables consisting of behavior tree nodes, state variables, and task results, 𝐸 represents the set of causal edges, and 𝑊 represents the set of causal edge weights. For any two causal variables... and The causal edge weights between the two It can be represented as: in Indicates control flow constraints. Represents state dependency constraints. and Representing variables respectively and variables The moment of occurrence, This indicates that the importance coefficient of the control flow constraint is set to 0.4. This indicates that the importance coefficient for the state dependency constraint is set to 0.4. The importance coefficient for the time interval decay term is set to 0.2. This represents the decay term based on the time interval.
[0037] The causal relationship model includes at least the causal dependencies obtained from control flow dependencies and state transition dependencies, as shown in Table 5.
[0038] Table 5 Causal Dependency Table S4. Calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and determine the root cause set.
[0039] S4 specifically includes the following steps: S4.1 Based on the aforementioned causal relationship model, intervention analysis is performed on the nodes and state variables in the abnormal execution sub-sequence to obtain the task failure impact value corresponding to each node and state variable. The variables... Task failure impact value It can be represented as: in, Representing variables The corresponding impact value of task failure, For observation and value taking, The causal intervention operation is represented as the processed value. ;
[0040] S4.2 Calculate the causal contribution of each node and state variable based on the impact value of the task failure, and sort them according to the size of the causal contribution.
[0041] The contribution of each node and state variable is calculated using a causal relationship model. causal contribution The formula can be expressed as:
[0042] The number of nodes and state variables involved in the contribution calculation is m=5. The impact values of each task failure are 0.42, 0.31, 0.23, 0.16 and 0.08, respectively. The corresponding causal contribution values are shown in Table 6.
[0043] S4.3. Nodes and state variables whose causal contribution meets the preset threshold condition are identified as the root cause set. The preset contribution threshold is 0.20. As shown in Table 6, the causal contribution of ObstacleDistance is 0.35, and the causal contribution of CheckObstacle is 0.26, both greater than 0.20. Therefore, ObstacleDistance and CheckObstacle are identified as the root cause set.
[0044] Table 6. Results of Causal Contribution Calculation S5. Generate a behavior tree repair strategy based on the root cause set.
[0045] S5 specifically includes the following steps: S5.1 Determine the objects to be repaired based on the root cause set. The objects to be repaired include behavior tree nodes, node parameters, conditional branches, or subtree structures. The root cause set includes ObstacleDistance and CheckObstacle, therefore the objects to be repaired include CheckObstacle conditional nodes, obstacle distance judgment thresholds, and path replanning triggering conditions related to MoveToShelf nodes.
[0046] S5.2. Generate candidate repair strategies based on the object to be repaired. The candidate repair strategies include node correction strategies, condition adjustment strategies, or subtree structure reconstruction strategies.
[0047] Multiple candidate repair strategies are used to predict the repair of the behavior tree. The comprehensive loss value of each candidate repair strategy is calculated, and the candidate repair strategy with the smallest comprehensive loss value is selected as the optimal repair strategy. The formula is shown below: The number of candidate repair strategies is 4, i.e., P={P1, P2, P3, P4}; the weight coefficients are λ1=0.40, λ2=0.20, λ3=0.25, and λ4=0.15; the value of each loss term is in the range of [0, 1], and the smaller the value, the lower the corresponding loss. The candidate repair strategies and their evaluation results are shown in Table 7.
[0048] As shown in Table 7, the overall loss value of strategy P3 is 0.110, which is the smallest among the four candidate repair strategies. Therefore, P3 is determined to be the optimal repair strategy.
[0049] Table 7 Candidate Repair Strategies and Evaluation Table S6. Update the behavior tree based on the optimal repair strategy.
[0050] S6 specifically includes the following steps: S6.1 Perform a consistency check on the optimal repair strategy to determine whether it satisfies the behavior tree structure constraints. Determine whether the behavior tree still satisfies control flow integrity, node connection legality, conditional branch consistency, and action node executableness after the node is inserted. S6.2 Apply the validated optimal repair strategy to the original behavior tree structure to update the behavior tree. Example
[0051] like Figure 2 As shown, this embodiment provides a behavior tree diagnosis and repair system for intelligent agent control, including an execution data acquisition module, a failed branch identification module, a causal relationship modeling module, a causal contribution calculation module, a repair strategy generation module, and a behavior tree update module; The execution data acquisition module is used to collect the node execution sequence, state variables, action outputs and task results during the execution of the behavior tree. The failed branch identification module is used to identify failed branches based on the execution trajectory collected by the execution data acquisition module, and to extract abnormal execution sub-sequences; The causal relationship modeling module is used to construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables. The causal contribution calculation module is used to calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and to determine the root cause set. The repair strategy generation module is used to generate a behavior tree repair strategy based on the root cause set, and to evaluate and filter the behavior tree repair strategy to obtain the optimal repair strategy. The behavior tree update module is used to update the original behavior tree structure based on the optimal repair strategy.
[0052] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for behavior tree diagnosis and repair for intelligent agent control, characterized in that, Includes the following steps: S1. Collect the node execution sequence, state variables, action outputs, and task results during the execution of the behavior tree; S2. Identify failed branches and extract abnormal execution sub-sequences based on the execution trajectory; S3. Construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables. S4. Calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and determine the root cause set; S5. Generate a behavior tree repair strategy based on the root cause set; S6. Update the behavior tree based on the optimal repair strategy.
2. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S1 includes: S1.1 Collect node execution sequence data, node return state data, and state variable data during the process of the agent executing the behavior tree task. The node execution sequence is used to characterize the execution order and execution state of the behavior tree nodes. S1.2 Collect the action output data and task result data generated by the intelligent agent during the behavior tree control process. The task result data includes task success or failure indicators.
3. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S2 includes: S2.
1. Based on the task result data, perform anomaly detection on the behavior tree execution process to determine whether the task has failed to execute or an execution anomaly has occurred. S2.
2. Based on the node execution sequence, perform backtracking analysis on the behavior tree execution path to locate the target failure branch that caused the task to fail and extract the corresponding abnormal execution subsequence.
4. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S3 includes: S3.1 Extract the behavior tree nodes, state variables and task results related to task failure based on the abnormal execution subsequence to form a set of causal modeling variables; S3.2 Determine the control flow dependency between the behavior tree nodes based on the behavior tree structure information, and use the control flow dependency as a structural constraint of the causal relationship model; S3.
3. Based on the changing relationships of state variables in the abnormal execution subsequence, determine the state transition dependencies between state variables and behavior tree nodes; S3.
4. Based on the execution order and time sequence of nodes, constrain the control flow dependency and state transition dependency to construct a causal relationship model that characterizes the causal dependency between nodes, state variables and task results.
5. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S4 includes: S4.1 Based on the causal relationship model, intervention analysis is performed on the nodes and state variables in the abnormal execution subsequence to obtain the task failure impact value corresponding to each node and state variable; S4.2 Calculate the causal contribution of each node and state variable based on the impact value of the task failure, and sort them according to the size of the causal contribution. S4.
3. Nodes and state variables whose causal contribution meets the preset threshold condition are identified as the root cause set.
6. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S5 includes: S5.1 Determine the object to be repaired based on the root cause set, wherein the object to be repaired includes behavior tree nodes, node parameters, conditional branches or subtree structures; S5.
2. Generate candidate repair strategies based on the object to be repaired. The candidate repair strategies include node correction strategies, condition adjustment strategies, or subtree structure reconstruction strategies.
7. The behavior tree diagnosis and repair method for intelligent agent control according to claim 1, characterized in that, S6 includes: S6.1 Perform a consistency check on the optimal repair strategy to determine whether it satisfies the behavior tree structure constraints; S6.2 Apply the validated optimal repair strategy to the original behavior tree structure to update the behavior tree.
8. A behavior tree diagnosis and repair system for agent-oriented control according to any one of claims 1-7, characterized in that, include: The system includes a data acquisition module, a failed branch identification module, a causal relationship modeling module, a causal contribution calculation module, a repair strategy generation module, and a behavior tree update module. The execution data acquisition module is used to collect the node execution sequence, state variables, action outputs and task results during the execution of the behavior tree. The failed branch identification module is used to identify failed branches based on the execution trajectory collected by the execution data acquisition module, and to extract abnormal execution sub-sequences; The causal relationship modeling module is used to construct a causal relationship model based on the abnormal execution subsequence and behavior tree structure information. The causal relationship model is used to characterize the causal dependency relationship between nodes and state variables. The causal contribution calculation module is used to calculate the causal contribution of each node and state variable to the task failure based on the causal relationship model, and to determine the root cause set. The repair strategy generation module is used to generate a behavior tree repair strategy based on the root cause set, and to evaluate and filter the behavior tree repair strategy to obtain the optimal repair strategy. The behavior tree update module is used to update the original behavior tree structure based on the optimal repair strategy.