Behavior tree debugging method and device, storage medium and electronic equipment

By obtaining breakpoint marks and node configuration operations on the debug editing end, remotely configuring and debugging the breakpoint nodes and logical relationships in the behavior tree, the problem of behavior tree debugging is solved, flexible debugging and modification of the behavior tree is realized, and game development is improved efficiency.

CN119396694APending Publication Date: 2025-02-07XINGZHEN TECH (SHANGHAI) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411224770.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-02
Publication Date
2025-02-07

AI Technical Summary

Technical Problem

In game development, debugging and interrupt debugging of behavior trees are difficult to achieve, especially in complex combat logic, and it is difficult for the existing technology to effectively debug and modify nodes and logical relationships in behavior trees.

Method used

By obtaining breakpoint marking operations on the debug editing side, generating and sending breakpoint information to the debugged side, the node in the behavior tree is configured as a breakpoint node, and the operation of the behavior tree is paused when it is run to the breakpoint node. In addition, by obtaining node configuration operations, the logical relationship between nodes is displayed and configured, and description information is generated for remote configuration.

Benefits of technology

Remote debugging and interrupt debugging of the behavior tree are realized, which can easily understand and modify the nodes and logical relationships in the behavior tree, and improve the efficiency and flexibility of game development.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119396694A_ABST
    Figure CN119396694A_ABST
Patent Text Reader

Abstract

The invention relates to a behavior tree debugging method and device, a storage medium and electronic equipment, and the method is applied to a debugging editing end and comprises the steps that breakpoint marking operation is acquired; obtaining first breakpoint information according to the breakpoint marking operation, and sending the first breakpoint information to the debugged end; wherein the debugged end is used for receiving the first breakpoint information, configuring a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node, and suspending operation of the behavior tree under the condition that the behavior tree operates to the first breakpoint node. According to the embodiment of the invention, the breakpoint node which needs to be interrupted is edited at the debugging editing end, the corresponding breakpoint information is sent to the debugged end and is executed by the debugged end, and the operation of the behavior tree is paused when the breakpoint node is executed, so that the remote editing of the breakpoint node is realized, and the interruption of the node of the behavior tree in the operation environment is remotely controlled. The interrupt debugging of the behavior tree can be more convenient, and then the operation condition of the interrupt node is known.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a behavior tree debugging method, device, storage medium, and electronic device. Background Art

[0002] As game scenes continue to develop, the complexity of gameplay increases, and the complexity and diversity of combat logic in games continue to increase. The tree structure composed of multiple nodes in the behavior tree can handle complex behavior logic and has strong scalability, making it easy to add or modify behaviors. Therefore, more and more behavior trees are used in game development to configure complex combat. To ensure that the behavior logic defined in the behavior tree meets expectations and the nodes in the behavior tree can perform corresponding actions or decisions as needed, the behavior tree needs to be interrupted and debugged. Summary of the invention

[0003] The present disclosure provides a behavior tree debugging method, device, storage medium and electronic device to solve at least one problem in the related art. The technical solution of the present disclosure is as follows:

[0004] According to a first aspect of an embodiment of the present disclosure, a behavior tree debugging method is provided, which is applied to a debugging editing end, and the method includes:

[0005] Get breakpoint mark operation;

[0006] According to the breakpoint marking operation, first breakpoint information is obtained, and the first breakpoint information is sent to the debugged end;

[0007] The debugged end is used to receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and pause the running of the behavior tree when the behavior tree runs to the first breakpoint node.

[0008] In an exemplary embodiment, before obtaining the breakpoint mark operation, the method further includes:

[0009] Get node configuration operations. Node configuration operations are used to change the logical relationship between nodes in the behavior tree.

[0010] According to the node configuration operation, a logical relationship diagram between nodes after the change is displayed, and node description information is generated, where the node description information indicates the change content corresponding to the node configuration operation;

[0011] Send the node description information to the debugged end;

[0012] The debugged end is further used to receive the node description information, and configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree.

[0013] In an exemplary embodiment, after the execution of the behavior tree is paused, the method further includes:

[0014] Get single-step debugging operation;

[0015] Generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end;

[0016] The debugged end is further used to receive the second breakpoint information, configure the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node; and run the behavior tree from the first breakpoint node to the second breakpoint node, and when the behavior tree runs to the second breakpoint node, suspend the running of the behavior tree.

[0017] In an exemplary implementation, after sending the second breakpoint information to the debugged end, the method further includes:

[0018] Sending an operation data acquisition instruction to the debugged terminal, and receiving feedback data of the debugged terminal in response to the operation data acquisition instruction;

[0019] Based on the feedback data, a debugging file is generated.

[0020] In an exemplary embodiment, generating a debugging file based on feedback data includes:

[0021] Determine timestamp information, where the timestamp information is used to indicate the execution time of the first breakpoint node and the second breakpoint node;

[0022] Extracting data within the execution time indicated by the timestamp information in the feedback data to obtain data to be packaged;

[0023] The data to be packaged is packaged to obtain a debugging file.

[0024] In an exemplary embodiment, obtaining a breakpoint mark operation includes:

[0025] Display each node in the behavior tree;

[0026] In response to a trigger operation on a target node, a breakpoint configuration control is displayed, the target node is any execution node among the nodes, and the breakpoint configuration control is used to receive a breakpoint marking operation.

[0027] According to a second aspect of an embodiment of the present disclosure, a behavior tree debugging method is provided, which is applied to a debugged end, and the method includes:

[0028] receiving first breakpoint information, and configuring a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node;

[0029] When the behavior tree reaches the first breakpoint, pause the behavior tree.

[0030] The debugging editing end is used to obtain a breakpoint marking operation; obtain first breakpoint information according to the breakpoint marking operation, and send the first breakpoint information to the debugged end.

[0031] In an exemplary embodiment, before receiving the first breakpoint information, the method further includes:

[0032] Receiving node description information, the node description information indicating changes corresponding to the node configuration operation;

[0033] Configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree;

[0034] The debugging editing end is used to obtain node configuration operations, and the node configuration operations are used to change the logical relationship between nodes of the behavior tree; according to the node configuration operations, the changed logical relationship diagram between nodes is displayed, and node description information is generated; and the node description information is sent to the debugged end.

[0035] In an exemplary embodiment, after pausing the execution of the behavior tree, the method further includes:

[0036] receiving second breakpoint information, and configuring a node in the behavior tree indicated by the second breakpoint information as a second breakpoint node;

[0037] Run the behavior tree from the first breakpoint node to the second breakpoint node. When the behavior tree reaches the second breakpoint node, pause the behavior tree.

[0038] The debugging editing end is used to obtain a single-step debugging operation; generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end.

[0039] In an exemplary embodiment, when the behavior tree runs to the second breakpoint node, after pausing the running of the behavior tree, the method further includes:

[0040] Get the running data acquisition instruction;

[0041] Send feedback data of the running data acquisition instruction to the debugged end.

[0042] In an exemplary implementation, the node information corresponding to the breakpoint node is stored in the breakpoint storage array, and pausing the running of the behavior tree includes:

[0043] Match the node information corresponding to the current running node with the node information stored in the breakpoint storage array to obtain a matching result;

[0044] When the match result indicates a successful match, pause the running of the behavior tree.

[0045] According to a third aspect of an embodiment of the present disclosure, a behavior tree debugging device is provided, which is applied to a debugging editing end, and the device includes:

[0046] A first acquisition module is configured to execute an acquisition breakpoint mark operation;

[0047] The first breakpoint information sending module is configured to execute an operation according to a breakpoint mark, obtain first breakpoint information, and send the first breakpoint information to the debugged end; wherein the debugged end is used to receive the first breakpoint information, configure a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node, and pause the operation of the behavior tree when the behavior tree runs to the first breakpoint node.

[0048] In an exemplary embodiment, the apparatus further comprises:

[0049] A second acquisition module is configured to execute an acquisition node configuration operation, where the node configuration operation is used to change the logical relationship between nodes of the behavior tree;

[0050] A node description information generating module is configured to execute a node configuration operation, display a changed logical relationship diagram between nodes, and generate node description information, wherein the node description information indicates a changed content corresponding to the node configuration operation;

[0051] The node description information sending module is configured to send the node description information to the debugged end; wherein the debugged end is further configured to receive the node description information and configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree.

[0052] In an exemplary embodiment, the apparatus further comprises:

[0053] A third acquisition module is configured to execute an acquisition single-step debugging operation;

[0054] The second breakpoint information sending module is configured to generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end; wherein the debugged end is further configured to receive the second breakpoint information, configure the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node; and run the behavior tree from the first breakpoint node to the direction of the second breakpoint node, and when the behavior tree runs to the second breakpoint node, suspend the running of the behavior tree.

[0055] In an exemplary embodiment, the apparatus further comprises:

[0056] A feedback data receiving module is configured to execute and send an operation data acquisition instruction to the debugged terminal, and receive feedback data from the debugged terminal in response to the operation data acquisition instruction;

[0057] The debugging file generating module is configured to generate a debugging file based on the feedback data.

[0058] In an exemplary embodiment, the debugging file generation module includes:

[0059] A timestamp information determining unit is configured to determine timestamp information, where the timestamp information is used to indicate the execution time of the first breakpoint node and the second breakpoint node;

[0060] A data extraction unit is configured to extract data within an execution time indicated by timestamp information in the feedback data to obtain data to be packaged;

[0061] The debugging file generating unit is configured to perform packaging processing on the data to be packaged to obtain a debugging file.

[0062] In an exemplary embodiment, the first acquisition module includes:

[0063] A first display unit is configured to execute and display each node in the behavior tree;

[0064] The second display unit is configured to execute a trigger operation in response to a target node and display a breakpoint configuration control, where the target node is any execution node among the nodes, and the breakpoint configuration control is used to receive a breakpoint marking operation.

[0065] According to a fourth aspect of an embodiment of the present disclosure, a behavior tree debugging device is provided, which is applied to a debugged end, and the device includes:

[0066] A breakpoint configuration module is configured to receive first breakpoint information and configure a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node;

[0067] The first pause module is configured to pause the running of the behavior tree when the behavior tree runs to the first breakpoint node; wherein the debugging editing end is used to obtain the breakpoint mark operation; according to the breakpoint mark operation, obtain the first breakpoint information, and send the first breakpoint information to the debugged end.

[0068] In an exemplary embodiment, the apparatus further comprises:

[0069] A node description information receiving module is configured to receive node description information, where the node description information indicates the change content corresponding to the node configuration operation;

[0070] The logic configuration module is configured to configure the changed inter-node logical relationship of the behavior tree indicated by the node description information into the behavior tree; wherein the debugging editing end is used to obtain the node configuration operation, and the node configuration operation is used to change the inter-node logical relationship of the behavior tree; according to the node configuration operation, the changed inter-node logical relationship diagram is displayed, and the node description information is generated; and the node description information is sent to the debugged end.

[0071] In an exemplary embodiment, the apparatus further comprises:

[0072] A second breakpoint information receiving module is configured to receive second breakpoint information and configure a node in the behavior tree indicated by the second breakpoint information as a second breakpoint node;

[0073] The second pause module is configured to execute the behavior tree from the first breakpoint node to the second breakpoint node, and pause the behavior tree when the behavior tree runs to the second breakpoint node; wherein the debugging editor end is used to obtain the single-step debugging operation; according to the single-step debugging operation, generate the second breakpoint information, and send the second breakpoint information to the debugged end.

[0074] In an exemplary embodiment, the apparatus further comprises:

[0075] A fourth acquisition module is configured to execute an instruction to acquire operation data;

[0076] The feedback data sending module is configured to execute and send feedback data for the running data acquisition instruction to the debugged terminal.

[0077] In an exemplary embodiment, the node information corresponding to the breakpoint node is stored in the breakpoint storage array, and the first pause module or the second pause module includes:

[0078] A matching unit is configured to match the node information corresponding to the current running node with the node information stored in the breakpoint storage array to obtain a matching result;

[0079] The pause unit is configured to pause the running of the behavior tree when the matching result indicates that the matching is successful.

[0080] According to a fifth aspect of an embodiment of the present disclosure, there is provided an electronic device, including:

[0081] processor;

[0082] a memory for storing processor-executable instructions;

[0083] The processor is configured to execute instructions to implement the behavior tree debugging method as described in any of the above embodiments.

[0084] According to a sixth aspect of an embodiment of the present disclosure, a computer storage medium is provided. When instructions in the computer storage medium are executed by a processor of an electronic device, the electronic device executes the behavior tree debugging method in any of the above-mentioned embodiments.

[0085] According to a seventh aspect of an embodiment of the present disclosure, a computer program product is provided. The computer program product includes a computer program. When the computer program is executed by a processor, the behavior tree debugging method in any one of the above embodiments is implemented.

[0086] The technical solution provided by the embodiments of the present disclosure brings at least the following beneficial effects:

[0087] The disclosed embodiment edits the breakpoint node that needs to be interrupted on the debugging and editing end, sends the corresponding breakpoint information to the debugged end, and executes it by the debugged end. When the behavior tree is executed to the breakpoint node, the behavior tree is paused, thereby realizing remote editing of the breakpoint node. By remotely controlling the interruption of the behavior tree node in its running environment, the interruption debugging of the behavior tree can be made more convenient, and it is easy to understand the running status of the interrupted node.

[0088] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0089] The drawings herein are incorporated into the specification and constitute a part of the present disclosure, illustrate embodiments consistent with the present disclosure, and together with the description are used to explain the principles of the present disclosure, and do not constitute improper limitations on the present disclosure.

[0090] Figure 1 A schematic diagram showing an application environment according to an embodiment of the present disclosure;

[0091] Figure 2 is a flowchart of a behavior tree debugging method according to an exemplary embodiment;

[0092] Figure 3 is a flow chart showing an operation of obtaining a breakpoint mark according to an exemplary embodiment;

[0093] Figure 4 is a structural diagram of a behavior tree editor configured on a debugging editing terminal according to an exemplary embodiment;

[0094] Figure 5 is a flowchart showing a node configuration of a debugging editing terminal according to an exemplary embodiment;

[0095] Figure 6 is a flowchart of single-step debugging of a debugging editing terminal according to an exemplary embodiment;

[0096] Figure 7 is a flowchart showing generation of a debugging file according to an exemplary embodiment;

[0097] Figure 8 is a flowchart of a behavior tree debugging method according to an exemplary embodiment;

[0098] Fig. 9 is a schematic diagram of a behavior tree structure module according to an exemplary embodiment;

[0099] Fig.10 is a flowchart showing a node configuration of a debugged end according to an exemplary embodiment;

[0100] Fig.11 is a flowchart showing a single-step debugging of a debugged terminal according to an exemplary embodiment;

[0101] Fig.12 is a block diagram of a behavior tree debugging device according to an exemplary embodiment;

[0102] Fig.13 is a block diagram of a behavior tree debugging device according to an exemplary embodiment;

[0103] Fig.14 is a structural frame of a computer device according to an exemplary embodiment Figure 1 ;

[0104] Fig.15 is a structural frame of a computer device according to an exemplary embodiment Figure 2 . DETAILED DESCRIPTION

[0105] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0106] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0107] See also Figure 1 , Figure 1A schematic diagram of an application environment according to an embodiment of the present disclosure is shown, and the application environment may include a terminal 02 and a server 01.

[0108] In an exemplary embodiment, the terminal 02 may be a debugging and editing terminal, and the terminal 02 may obtain a breakpoint marking operation, obtain first breakpoint information according to the breakpoint marking operation, and send the first breakpoint information to the server 01, i.e., the debugged terminal. Specifically, the terminal 02 may include, but is not limited to, electronic devices such as smart phones, desktop computers, tablet computers, laptop computers, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, and may also be software running on the above electronic devices, such as applications, etc. Optionally, the operating system running on the electronic device may include, but is not limited to, Android system, IOS system, Linux, Windows, etc.

[0109] In an exemplary embodiment, the server 01 may be a debugged end, and the server 01 may receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and suspend the operation of the behavior tree when the behavior tree runs to the first breakpoint node. Specifically, the server 01 may be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or a cloud server providing cloud computing services. Optionally, the server 01 may also be replaced by a client, and the client may include but is not limited to electronic devices such as smart phones, desktop computers, tablet computers, laptops, smart speakers, digital assistants, augmented reality (AR) / virtual reality (VR) devices, smart wearable devices, etc., and may also be software running on the above electronic devices, such as applications, etc. Optionally, the operating system running on the electronic device may include but is not limited to Android system, IOS system, Linux, Windows, etc.

[0110] In addition, it should be noted that Figure 1 What is shown is only one application environment provided by the present disclosure. In actual application, other application environments may also be included, for example, more terminals may be included.

[0111] In the embodiments of this specification, the terminal 02 and the server 01 may be directly or indirectly connected via wired or wireless communication, which is not limited in this disclosure.

[0112] Figure 2The present invention is a flowchart of a behavior tree debugging method according to an exemplary embodiment. The behavior tree debugging method can be applied to a debugging editing terminal. The debugging editing terminal is configured with a behavior tree editor to implement debugging and editing of the behavior tree. The debugging editing terminal can be, but is not limited to, a physical device such as a smart phone, a tablet computer, a laptop computer, a desktop computer, a smart speaker, a smart wearable device, a digital assistant, an augmented reality device, a virtual reality device, etc., and can also include software such as an application running in the physical device. Figure 2 As shown, the method includes the following steps.

[0113] In step S201, a breakpoint marking operation is obtained.

[0114] In the present disclosure, the behavior tree includes multiple nodes of different types, and complex game combat logic can be implemented by configuring the functions and node execution logic corresponding to different nodes in the behavior tree. The behavior tree nodes in the present disclosure may include multiple types of nodes such as service nodes, execution nodes, decorator nodes, and composite nodes, wherein the service node is used to execute periodic tasks or background tasks, the execution node is used to execute specific behaviors, the decorator node is used to modify or extend the behavior of the execution node, and the composite node includes a selection composite node and a sequence composite node, the selection composite node is used to select and execute a node according to a condition, and the sequence composite node is used to execute nodes sequentially.

[0115] In the present disclosure, the breakpoint marking operation may be to mark the execution nodes therein, and the marked nodes are the breakpoint nodes. Specifically, the execution nodes targeted by the breakpoint marking operation may be newly added logic nodes in the behavior tree. For example, in a combat game, a new combat logic needs to be implemented to enable players to chase and attack monsters. To implement the combat logic, the newly added logic nodes in the behavior tree may include execution nodes such as chase nodes and weapon delivery nodes. To detect whether the newly added nodes can perform the corresponding functions as required, breakpoints may be set for execution nodes such as chase nodes and weapon delivery nodes to implement interrupt debugging, so as to detect the functions of the nodes. The breakpoint marking operation may be targeted at any execution node among the execution nodes such as chase nodes and weapon delivery nodes.

[0116] Figure 3 FIG. 1 is a flowchart of an operation of obtaining a breakpoint mark according to an exemplary embodiment. In an exemplary implementation, the operation of obtaining a breakpoint mark includes:

[0117] In step S301, each node in the behavior tree is displayed.

[0118] In this disclosure, Figure 4The structure diagram of a behavior tree editor configured in a debugging editing terminal according to an exemplary embodiment is shown. Specifically, the resource loading module of the behavior tree editor can realize the loading of the behavior tree and the corresponding blackboard through the behavior tree resource loading module and the blackboard resource loading module respectively, and the corresponding blackboard stores the variables required for decision making; the view processing module can realize the display of the behavior tree graphics through the behavior tree view display module, realize the access to the common editing functions in the editor interface through the editor toolbar module, realize the switching between different editing or debugging modes through the editor mode switching module, and realize the creation of different tabs in the editor interface through the editing tab creation module, such as the property page, blackboard page, debugging page, view page, etc. The property page is used to display the properties and parameters of the currently selected node, the blackboard page is used to view and manage the variables used in the decision-making process, and the debugging is used to display the debugging information and status when the behavior tree is running; the visual node module can display different types of nodes, including service nodes, execution nodes, composite nodes, decorator nodes, etc.; the debugging module can realize the debugging of the behavior tree through the behavior tree debugger, and view the detailed information of the selected node through the detailed view.

[0119] In the present disclosure, displaying each node in the behavior tree can be accomplished through the cooperation between the modules in the behavior tree editor. The behavior tree that needs to be debugged by the client can be loaded into the editor of the debugging editing end, and the tree structure composed of each node in the behavior tree can be visualized. The displayed content includes information such as the type and name of each node, as well as the execution logic relationship between each node.

[0120] In step S302, in response to a trigger operation on a target node, a breakpoint configuration control is displayed, the target node is any execution node among the nodes, and the breakpoint configuration control is used to receive a breakpoint marking operation.

[0121] In the present disclosure, the breakpoint marking operation can be performed on any execution node in the behavior tree. Specifically, the triggering operation on the target node can be completed by right-clicking on the target node in the behavior tree editor interface to open the selection control, and clicking the set breakpoint sub-control in the selection control to complete the triggering operation. After the triggering operation is completed, the breakpoint configuration control is displayed in the behavior tree editor interface, and the breakpoint marking operation can be received through the breakpoint configuration control.

[0122] The above embodiment can display the tree structure of the behavior tree by displaying each node in the behavior tree, so that the user can intuitively understand the structural logic of the behavior tree and the configuration of the execution node in the behavior tree. Through the visual breakpoint marking process, the user can more quickly find the node that needs to be interrupted and debugged and complete the breakpoint marking operation more conveniently.

[0123] In step S202, first breakpoint information is obtained according to the breakpoint marking operation, and the first breakpoint information is sent to the debugged end; wherein the debugged end is used to receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and pause the operation of the behavior tree when the behavior tree runs to the first breakpoint node.

[0124] In the present disclosure, after the breakpoint marking operation is completed, the first breakpoint information can be obtained by the behavior tree debugger collecting the breakpoint marks on the nodes. After the debugger editor obtains the first breakpoint information, the debugger editor sends the first breakpoint information to the debugged terminal through the communication connection between the debugger editor and the debugged terminal. After receiving the first breakpoint information, the debugged terminal configures the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and when the behavior tree runs to the first breakpoint node, the running of the behavior tree is suspended.

[0125] Figure 5 The following is a flowchart of a node configuration of a debugging editing terminal according to an exemplary embodiment. In an exemplary implementation, before obtaining a breakpoint mark operation, the method further includes:

[0126] In step S501, a node configuration operation is obtained, where the node configuration operation is used to modify the logical relationship between nodes of the behavior tree.

[0127] In the present disclosure, the node configuration operation may be to add a new node to the behavior tree, or to delete a node in the behavior tree, or to modify the execution logic of a node in the behavior tree. For example, in a game scene, a new execution node such as a chase node or a weapon delivery node is added.

[0128] In the present disclosure, node configuration operations can add, delete or modify nodes of the behavior tree and the corresponding execution logic through the editor toolbar module. The node-related data is displayed in the tab page. When viewing the data in the tab page, the editing tab page creation module provides support. If mode switching is required during the configuration process, it is provided by the editor mode switching module. The resource loading module modifies the behavior tree and the corresponding logic variables according to the node configuration operation.

[0129] In step S502, according to the node configuration operation, the changed logical relationship diagram between nodes is displayed, and node description information is generated, where the node description information indicates the changed content corresponding to the node configuration operation.

[0130] In the present disclosure, after the node configuration operation is completed, it is supported by the behavior tree view display module to display the changed logical relationship diagram between nodes. The behavior tree debugger summarizes the modified content corresponding to the node configuration operation and generates node description information, including the changed node, the corresponding execution logic, the corresponding interface called by the node and other information.

[0131] In step S503, the node description information is sent to the debugged end; wherein the debugged end is further used to receive the node description information, and configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree.

[0132] In the present disclosure, the debugging editor sends the node description information to the debugged end through the communication connection between the debugging editor and the debugged end. The debugged end is also used to receive the node description information and configure the logical relationship between the nodes of the modified behavior tree indicated by the node description information into the behavior tree to complete the node configuration.

[0133] The above embodiment obtains the node configuration operation on the debugging and editing end, and displays the changed node logic relationship diagram according to the node configuration operation, and generates node description information. The node configuration process, the changed content and the changed node logic relationship can be displayed on the debugging and editing end, so that the user can complete the node configuration more intuitively, improve the node configuration efficiency, and enrich the operation logic of the behavior tree; and the debugged end configures the changed node logic relationship of the behavior tree indicated by the node description information into the behavior tree, so that remote behavior tree logic editing can be realized, and the behavior tree logic change can be completed more conveniently.

[0134] Figure 6 is a flowchart of a single-step debugging of a debugging editor according to an exemplary embodiment. In an exemplary implementation, after the operation of the behavior tree is paused, the method further includes:

[0135] In step S601, a single-step debugging operation is acquired.

[0136] In the present disclosure, the single-step debugging operation is used to implement the single-step execution of the behavior tree, that is, only a single node is executed in one run. The single-step debugging operation can be implemented by triggering a single-step forward or backward in the behavior tree editor interface of the debugging editing end. Specifically, the single-step debugging operation can be that after the debugging editing end receives the information of the pause node, the corresponding node is marked as a pause node, and then, in the behavior tree editor interface, by right-clicking on the pause node to open the selection control, the single-step forward sub-control or the single-step backward sub-control in the selection control is clicked to complete the single-step debugging operation.

[0137] In step S602, according to the single-step debugging operation, second breakpoint information is generated and sent to the debugged end; wherein the debugged end is further used to receive the second breakpoint information, configure the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node; and run the behavior tree from the first breakpoint node to the second breakpoint node, and when the behavior tree runs to the second breakpoint node, suspend the running of the behavior tree.

[0138] In the present disclosure, after the single-step debugging operation is triggered, the debugged end marks the next adjacent node as a new breakpoint node according to the behavior tree running direction indicated by the single-step debugging operation, and the behavior tree debugger collects the new breakpoint nodes and determines them as the second breakpoint information.

[0139] In the present disclosure, in a game scenario, after a player chases a monster, the next step may be to drop a weapon on the monster to attack the monster, so the node execution logic may be to first execute the chase node and then execute the weapon drop node. In the case where the first breakpoint node obtained by the breakpoint marking operation is the chase node, the node targeted by the single-step debugging operation may be the weapon drop node, and the weapon drop node is marked as the second breakpoint node.

[0140] In the present disclosure, the debugging editing end sends the second breakpoint information to the debugged end through the communication connection between the debugging editing end and the debugged end, and the debugged end is further used to configure the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node; and run the behavior tree from the first breakpoint node to the direction of the second breakpoint node, and when the behavior tree runs to the second breakpoint node, the running of the behavior tree is suspended.

[0141] The above embodiment can more quickly select a node that needs to be single-step debugged by obtaining a single-step debugging operation on the debugging editing end, and generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end, and the debugged end configures the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node, and runs the behavior tree from the first breakpoint node to the direction of the second breakpoint node. When the behavior tree runs to the second breakpoint node, the running of the behavior tree is suspended, so that remote single-step debugging can be achieved.

[0142] Figure 7 FIG. 1 is a flowchart of a debug file generation according to an exemplary embodiment. In an exemplary implementation, after sending the second breakpoint information to the debugged end, the method further includes:

[0143] In step S701, an operation data acquisition instruction is sent to the debugged end, and feedback data of the debugged end in response to the operation data acquisition instruction is received.

[0144] In the present disclosure, the running data acquisition instruction is used to obtain the data generated when the debugged end runs according to the debugging instruction of the debugging editing end. After the second breakpoint information is sent to the debugged end, the running data acquisition instruction is sent and received, and the feedback data of the debugged end for the running data acquisition instruction is received. After receiving the data acquisition instruction, the debugged end sends the corresponding data to the debugging editing end.

[0145] In step S702, a debugging file is generated based on the feedback data.

[0146] The above-mentioned embodiment can obtain the running data of single-step debugging at the debugging editing end by sending the running data acquisition instruction to the debugged end and receiving the feedback data of the debugged end in response to the running data acquisition instruction. Based on the feedback data, the debugging file is generated, and the debugging file corresponding to the current debugging can be generated at the debugging editing end to locate errors and repair them.

[0147] In an exemplary embodiment, generating a debugging file based on feedback data includes:

[0148] Determine timestamp information, where the timestamp information is used to indicate the execution time of the first breakpoint node and the second breakpoint node.

[0149] In the present disclosure, when the breakpoint marking operation is performed on the debugging editing end, a timestamp of each breakpoint node is configured to indicate the execution time of each breakpoint node.

[0150] The data within the execution time indicated by the timestamp information in the feedback data is extracted to obtain the data to be packaged.

[0151] In the present disclosure, since the single-step running of the first breakpoint node and the second breakpoint node is completed within the time indicated by the timestamp information, the data generated by the single-step running process of the first breakpoint node and the second breakpoint node are all generated within the time period indicated by the timestamp information. Therefore, the data within the execution time indicated by the timestamp information in the feedback data is the data generated by this single-step debugging. The data within the execution time indicated by the timestamp information in the feedback data is extracted, and the node path of the behavior tree and the corresponding blackboard variables are refreshed to obtain the data to be packaged.

[0152] In the present disclosure, in a game scenario, by marking the chase node as the first breakpoint node and the weapon delivery node as the second breakpoint node, single-step debugging can be implemented for the newly configured chase node and weapon delivery node, and the data within the execution time indicated by the timestamp information in the feedback data can be extracted, which can be the detailed information of the execution steps when the above nodes are executed, the active path information, and the corresponding updated data in the blackboard to obtain the data to be packaged.

[0153] The data to be packaged is packaged to obtain a debugging file.

[0154] In the present disclosure, the data to be packaged can be packaged into a file in XML format, and the file in XML format is the debugging file.

[0155] The above embodiment can locate the data generated by the single-step running process of the first breakpoint node and the second breakpoint node in this debugging by determining the timestamp information. By extracting the data within the execution time indicated by the timestamp information in the feedback data and packaging it to obtain the debugging file, it is possible to generate the debugging file corresponding to this debugging on the debugging editing end to locate errors and repair them.

[0156] Figure 8 It is a flow chart of a behavior tree debugging method according to an exemplary embodiment. The behavior tree debugging method can be applied to the debugged end. The debugged end can be a client or a server, including but not limited to physical devices such as smart phones, tablet computers, laptops, desktop computers, smart speakers, smart wearable devices, digital assistants, augmented reality devices, virtual reality devices, etc., and can also include software such as applications running in physical devices. The server can be but not limited to an independent server, or a server cluster or distributed system composed of multiple physical servers, or one or more cloud servers that provide cloud services, cloud databases, cloud computing, cloud, cloud storage, network services, cloud communications, intermediate services, domain name services, security services, and basic cloud computing services such as big data and artificial intelligence platforms. Reference Figure 8 As shown, the method includes the following steps.

[0157] In step S801, first breakpoint information is received, and a node in the behavior tree indicated by the first breakpoint information is configured as a first breakpoint node.

[0158] In the present disclosure, the first breakpoint information may be the index of the node targeted by the breakpoint marking operation. After receiving the first breakpoint information, the debugged end searches for the node according to the corresponding node index and marks the node as the first breakpoint node.

[0159] In step S802, when the behavior tree runs to the first breakpoint node, the running of the behavior tree is paused; wherein the debugging editing end is used to obtain the breakpoint marking operation; according to the breakpoint marking operation, the first breakpoint information is obtained, and the first breakpoint information is sent to the debugged end.

[0160] In the present disclosure, the behavior tree may be a behavior tree running in a UE4 environment, where UE4 is a 3D game engine. The behavior tree starts running from a root node, and is interrupted when running to a first breakpoint node, thereby pausing the running of the behavior tree.

[0161] Fig. 9It is a schematic diagram of a behavior tree structure module according to an exemplary embodiment. In the present disclosure, the structure module of the behavior tree includes a behavior tree instance, a blackboard, a behavior tree control module, a behavior tree management module, etc. The behavior tree instance includes multiple behavior tree nodes. The blackboard is used to store variables required for decision-making. The behavior tree control module is used to control the decision-making of the behavior tree. The behavior tree management module is used to manage the execution of the behavior tree. Specifically, the behavior tree instance includes multiple types of nodes, such as decorator nodes, execution nodes, update nodes, composite nodes, etc. In the game scene, the decoration nodes include role judgment nodes, state judgment nodes, space judgment nodes, time nodes, scene nodes, etc. The execution nodes include skill release nodes, chase nodes, play effect nodes, transition nodes, flight nodes, etc. The update nodes include attribute update nodes, blackboard value modification nodes, etc. The composite nodes include selection composite nodes and sequence composite nodes. The execution process of each of the above nodes will call the corresponding functions through the corresponding interfaces to implement the corresponding functions. Therefore, the interfaces correspond to various types, such as navigation interface, projection interface, character attribute interface, motion control interface, etc. The navigation interface corresponds to the callable path finding function, ground height function, point confirmation function, etc. The projection interface corresponds to the callable ray projection function, etc. The character attribute interface corresponds to the callable acquisition function, setting function, etc. The motion control interface corresponds to the callable movement function, jump function, pause function, etc.

[0162] In this disclosure, for an execution node that executes a chase function in a game scene, when the behavior tree runs to this node, the movement control interface can be used to call the move function, jump function, pause function, etc. to implement the character's running, jumping, and stopping the chase function. When it is necessary to interrupt the debugging of this node, this node is the first breakpoint node. When the behavior tree runs to this chase node, the operation of the behavior tree is paused.

[0163] In an exemplary implementation, the debugged terminal is configured with a breakpoint storage array, and node information corresponding to the breakpoint node is stored in the breakpoint storage array. Pausing the running of the behavior tree includes:

[0164] Match the node information corresponding to the currently running node with the node information stored in the breakpoint storage array to obtain a matching result; if the matching result indicates a successful match, pause the running of the behavior tree.

[0165] In the present disclosure, the breakpoint storage array can store node information corresponding to a preset number of first breakpoint nodes. Every time the behavior tree runs to a node, the debugged end matches the node information corresponding to the current running node with the node information stored in the breakpoint storage array. When the matching result indicates a successful match, that is, the node information corresponding to the current running node is stored in the breakpoint storage array, the current running node is determined to be a breakpoint node, and then the running of the behavior tree is suspended.

[0166] The above embodiment stores the node information corresponding to the breakpoint node through the breakpoint storage array, which can prevent the interrupt debugging failure caused by the loss of the breakpoint. By matching the node information corresponding to the current running node with the node information stored in the breakpoint storage array, when the matching result indicates a successful match, the operation of the behavior tree is paused, which can ensure that the breakpoint node is successfully interrupted, thereby realizing the interrupt debugging of the behavior tree at a specific node.

[0167] Fig.10 The following is a flowchart of a node configuration of a debugged terminal according to an exemplary embodiment. In an exemplary implementation, before receiving the first breakpoint information, the method further includes:

[0168] In step S1001, node description information is received, where the node description information indicates the change content corresponding to the node configuration operation.

[0169] In the present disclosure, the debugged end receives the node description information sent by the debugging editing end through communication with the debugging editing end.

[0170] In step S1002, the changed logical relationship between nodes of the behavior tree indicated by the node description information is configured into the behavior tree; wherein the debugging editing end is used to obtain the node configuration operation, and the node configuration operation is used to change the logical relationship between nodes of the behavior tree; according to the node configuration operation, the changed logical relationship diagram between nodes is displayed, and the node description information is generated; and the node description information is sent to the debugged end.

[0171] In the present disclosure, the debugged end refreshes its running behavior tree according to the changed node indicated by the node description information, the corresponding execution logic, the corresponding called interface of the node and other information to complete the configuration of the logical relationship between the nodes of the changed behavior tree.

[0172] In the present disclosure, in the game scenario, the modified content may be the newly added logic nodes of the behavior tree, including execution nodes such as the chase node and the weapon delivery node, so that the player can drop weapons on the monster after chasing the monster to attack the monster. Therefore, the configuration content of the debugged terminal indicated by the node description information includes the auxiliary nodes corresponding to the chase node and the weapon delivery node, the corresponding execution logic, the corresponding called interface configuration, and the function called through the corresponding interface, etc.

[0173] The above embodiment obtains the node configuration operation on the debugging and editing end, and displays the changed node logic relationship diagram according to the node configuration operation, and generates node description information. The node configuration process, the changed content and the changed node logic relationship can be displayed on the debugging and editing end, so that the user can complete the node configuration more intuitively, improve the node configuration efficiency, and enrich the operation logic of the behavior tree; and the debugged end configures the changed node logic relationship of the behavior tree indicated by the node description information into the behavior tree, so that remote behavior tree logic editing can be realized, and the behavior tree logic change can be completed more conveniently.

[0174] Fig.11 is a flowchart of a single-step debugging of a debugged terminal according to an exemplary embodiment. In an exemplary implementation, after pausing the running of the behavior tree, the method further includes:

[0175] In step S1101, second breakpoint information is received, and a node in the behavior tree indicated by the second breakpoint information is configured as a second breakpoint node.

[0176] In the present disclosure, the second breakpoint information may be a node adjacent to the first breakpoint node marked as a new breakpoint node, and the second breakpoint information may be an index of the node targeted by the second breakpoint marking operation. After receiving the second breakpoint information, the debugged end searches for the node according to the index of the corresponding node and marks the node as the second breakpoint node.

[0177] In step S1102, the behavior tree is run from the first breakpoint node to the second breakpoint node, and when the behavior tree runs to the second breakpoint node, the running of the behavior tree is paused; wherein the debugging editing end is used to obtain a single-step debugging operation; according to the single-step debugging operation, second breakpoint information is generated, and the second breakpoint information is sent to the debugged end.

[0178] In the present disclosure, after the behavior tree is paused at the first breakpoint node, the direction indicated by the single-step debugging operation runs from the first breakpoint node to the second breakpoint node. When the behavior tree runs to the second breakpoint node, it is interrupted and the running of the behavior tree is paused, thereby completing the single-step debugging.

[0179] In the present disclosure, in a game scenario, the single-step debugging operation can be to pause at the chase node, run from the chase node to the weapon delivery node, interrupt when the behavior tree runs to the weapon delivery node, pause the operation of the behavior tree, and then complete the single-step debugging.

[0180] In an exemplary implementation, the debugged terminal is configured with a breakpoint storage array, and node information corresponding to the breakpoint node is stored in the breakpoint storage array. Pausing the running of the behavior tree includes:

[0181] Match the node information corresponding to the currently running node with the node information stored in the breakpoint storage array to obtain a matching result; if the matching result indicates a successful match, pause the running of the behavior tree.

[0182] In the present disclosure, the breakpoint storage array may further store node information corresponding to a preset number of second breakpoint nodes. When the behavior tree has a first breakpoint node running to the next node, the debugged end matches the node information corresponding to the current running node with the node information stored in the breakpoint storage array. When the matching result indicates a successful match, that is, the node information corresponding to the current running node is stored in the breakpoint storage array, the current running node is determined to be the second breakpoint node, and the running of the behavior tree is then paused.

[0183] The above embodiment can more quickly select a node that needs to be single-step debugged by obtaining a single-step debugging operation on the debugging editing end, and generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end, and the debugged end configures the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node, and runs the behavior tree from the first breakpoint node to the direction of the second breakpoint node. When the behavior tree runs to the second breakpoint node, the running of the behavior tree is suspended, so that remote single-step debugging can be achieved.

[0184] In an exemplary embodiment, when the behavior tree runs to the second breakpoint node, after pausing the running of the behavior tree, the method further includes:

[0185] Obtaining a running data acquisition instruction; sending feedback data for the running data acquisition instruction to the debugged end.

[0186] In the present disclosure, the operation data acquisition instruction is used to obtain the data generated when the debugged end runs according to the debugging instruction of the debugging editing end. After the second breakpoint information is sent to the debugged end, the debugged end executes from the first breakpoint node to the second breakpoint node and pauses again at the second breakpoint node. At the same time, the operation data acquisition instruction can be obtained and the corresponding data can be sent to the debugging editing end. The debugging editing end generates a debugging file based on the feedback data. Specifically, the feedback data may include detailed information on the execution steps in the single-step debugging, the active path information in the single-step debugging, and the corresponding updated data in the blackboard.

[0187] In the present disclosure, when the execution node of the single-step execution in the single-step debugging operation is a chase node, the feedback data sent to the debugged end for the running data acquisition instruction is the detailed execution step information of the chase node and its corresponding auxiliary node, the corresponding calling of the motion control interface, and the execution results of the move, jump, and pause functions called through the motion control interface, and the resulting data changes, etc.

[0188] In the present disclosure, when the execution node of single-step execution in the single-step debugging operation is a weapon delivery node, the feedback data sent to the debugged end for the running data acquisition instruction is the detailed execution step information of the weapon delivery node and its corresponding auxiliary nodes, the corresponding calling of the projection interface, and the execution result of the ray projection function called through the projection interface, and the resulting data changes, etc.

[0189] The above embodiment obtains the running data acquisition instruction by the debugged end; sends feedback data for the running data acquisition instruction to the debugged end, so that the debugging editing end can obtain the running data of the single-step debugging, so as to generate a debugging file based on the feedback data, and realize the generation of the debugging file corresponding to this debugging at the debugging editing end, so as to locate the error and repair it.

[0190] Fig.12 The present invention is a block diagram of a behavior tree debugging device according to an exemplary embodiment, which is applied to a debugging editing terminal.

[0191] Reference Fig.12 , the device comprises:

[0192] The first acquisition module 1201 is configured to execute an operation of acquiring a breakpoint mark;

[0193] The first breakpoint information sending module 1202 is configured to perform an operation according to a breakpoint mark, obtain first breakpoint information, and send the first breakpoint information to the debugged end; wherein the debugged end is used to receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and pause the operation of the behavior tree when the behavior tree runs to the first breakpoint node.

[0194] In an exemplary embodiment, the apparatus further comprises:

[0195] A second acquisition module is configured to execute an acquisition node configuration operation, where the node configuration operation is used to change the logical relationship between nodes of the behavior tree;

[0196] A node description information generating module is configured to execute a node configuration operation, display a changed logical relationship diagram between nodes, and generate node description information, wherein the node description information indicates a changed content corresponding to the node configuration operation;

[0197] The node description information sending module is configured to send the node description information to the debugged end; wherein the debugged end is further configured to receive the node description information and configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree.

[0198] In an exemplary embodiment, the apparatus further comprises:

[0199] A third acquisition module is configured to execute an acquisition single-step debugging operation;

[0200] The second breakpoint information sending module is configured to generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end; wherein the debugged end is further configured to receive the second breakpoint information, configure the node in the behavior tree indicated by the second breakpoint information as the second breakpoint node; and run the behavior tree from the first breakpoint node to the direction of the second breakpoint node, and when the behavior tree runs to the second breakpoint node, suspend the running of the behavior tree.

[0201] In an exemplary embodiment, the apparatus further comprises:

[0202] A feedback data receiving module is configured to execute and send an operation data acquisition instruction to the debugged terminal, and receive feedback data from the debugged terminal in response to the operation data acquisition instruction;

[0203] The debugging file generating module is configured to generate a debugging file based on the feedback data.

[0204] In an exemplary embodiment, the debugging file generation module includes:

[0205] A timestamp information determining unit is configured to determine timestamp information, where the timestamp information is used to indicate the execution time of the first breakpoint node and the second breakpoint node;

[0206] A data extraction unit is configured to extract data within an execution time indicated by timestamp information in the feedback data to obtain data to be packaged;

[0207] The debugging file generating unit is configured to perform packaging processing on the data to be packaged to obtain a debugging file.

[0208] In an exemplary implementation, the first acquisition module 1201 includes:

[0209] A first display unit is configured to execute and display each node in the behavior tree;

[0210] The second display unit is configured to execute a trigger operation in response to a target node and display a breakpoint configuration control, where the target node is any execution node among the nodes, and the breakpoint configuration control is used to receive a breakpoint marking operation.

[0211] Fig.13 The following is a block diagram of a behavior tree debugging device according to an exemplary embodiment, which is applied to a debugged terminal. Fig.13 , the device comprises:

[0212] The breakpoint configuration module 1301 is configured to receive first breakpoint information and configure a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node;

[0213] The first pause module 1302 is configured to pause the running of the behavior tree when the behavior tree runs to the first breakpoint node; wherein the debugging editing end is used to obtain the breakpoint mark operation; according to the breakpoint mark operation, obtain the first breakpoint information, and send the first breakpoint information to the debugged end.

[0214] In an exemplary embodiment, the apparatus further comprises:

[0215] A node description information receiving module is configured to receive node description information, where the node description information indicates the change content corresponding to the node configuration operation;

[0216] The logic configuration module is configured to configure the changed inter-node logical relationship of the behavior tree indicated by the node description information into the behavior tree; wherein the debugging editing end is used to obtain the node configuration operation, and the node configuration operation is used to change the inter-node logical relationship of the behavior tree; according to the node configuration operation, the changed inter-node logical relationship diagram is displayed, and the node description information is generated; and the node description information is sent to the debugged end.

[0217] In an exemplary embodiment, the apparatus further comprises:

[0218] A second breakpoint information receiving module is configured to receive second breakpoint information and configure a node in the behavior tree indicated by the second breakpoint information as a second breakpoint node;

[0219] The second pause module is configured to execute the behavior tree from the first breakpoint node to the second breakpoint node, and pause the behavior tree when the behavior tree runs to the second breakpoint node; wherein the debugging editor end is used to obtain the single-step debugging operation; according to the single-step debugging operation, generate the second breakpoint information, and send the second breakpoint information to the debugged end.

[0220] In an exemplary embodiment, the apparatus further comprises:

[0221] A fourth acquisition module is configured to execute an instruction to acquire operation data;

[0222] The feedback data sending module is configured to execute and send feedback data for the running data acquisition instruction to the debugged terminal.

[0223] In an exemplary embodiment, the node information corresponding to the breakpoint node is stored in the breakpoint storage array, and the first pause module or the second pause module includes:

[0224] A matching unit is configured to match the node information corresponding to the current running node with the node information stored in the breakpoint storage array to obtain a matching result;

[0225] The pause unit is configured to pause the running of the behavior tree when the matching result indicates that the matching is successful.

[0226] In the embodiments of the present application, the term "module" or "unit" refers to a computer program or a part of a computer program with a predetermined function, and works together with other related parts to achieve a predetermined goal, and can be implemented in whole or in part by using software, hardware such as processing circuits or memories, or a combination thereof. Similarly, one processor or multiple processors or memories can be used to implement one or more modules or units. In addition, each module or unit can be part of an overall module or unit that includes the function of the module or unit.

[0227] Regarding the device in the above embodiment, the specific manner of each step has been described in detail in the embodiment of the aforementioned method, and will not be elaborated here.

[0228] Please refer to Fig.14 , which shows a structural frame of a computer device provided by an exemplary embodiment of the present disclosure Figure 1 The computer device may be a terminal. The computer device is used to implement the behavior tree debugging method provided in the above embodiment. Specifically:

[0229] Typically, the computer device 1400 includes a processor 1401 and a memory 1402 .

[0230] The processor 1401 may include one or more processing cores, such as a 4-core processor, an 8-core processor, and the like. The processor 1401 may be implemented in at least one hardware form of DSP (Digital Signal Processing), FPGA (Field Programmable Gate Array), and PLA (Programmable Logic Array). The processor 1401 may also include a main processor and a coprocessor, the main processor is a processor for processing data in an awake state, also known as a CPU (Central Processing Unit); the coprocessor is a low-power processor for processing data in a standby state. In an exemplary embodiment, the processor 1401 may be integrated with a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the display screen. In an exemplary embodiment, the processor 1401 may also include an AI (Artificial Intelligence) processor, which is used to process computing operations related to machine learning.

[0231] The memory 1402 may include one or more computer-readable storage media, which may be non-transitory. The memory 1402 may also include high-speed random access memory, and non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In an exemplary embodiment, the non-transitory computer-readable storage medium in the memory 1402 is used to store at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is configured to be executed by one or more processors to implement the above-mentioned behavior tree debugging method.

[0232] In an exemplary embodiment, the computer device 1400 may further optionally include: a peripheral device interface 1403 and at least one peripheral device. The processor 1401, the memory 1402 and the peripheral device interface 1403 may be connected via a bus or a signal line. Each peripheral device may be connected to the peripheral device interface 1403 via a bus, a signal line or a circuit board. Specifically, the peripheral device includes: at least one of a radio frequency circuit 1404, a touch display screen 1405, a camera assembly 1406, an audio circuit 1407, a positioning assembly 1408 and a power supply 1409.

[0233] Those skilled in the art will understand that Fig.14The structure shown in the figure does not constitute a limitation on the computer device 1400, and the computer device 1400 may include more or less components than shown in the figure, or combine some components, or adopt a different arrangement of components.

[0234] Please refer to Fig.15 It shows a structural frame of a computer device provided by another exemplary embodiment of the present disclosure. Figure 2 The computer device may be a server for executing the above behavior tree debugging method. Specifically:

[0235] The computer device 1500 includes a central processing unit (CPU) 1501, a system memory 1504 including a random access memory (RAM) 1502 and a read only memory (ROM) 1503, and a system bus 1505 connecting the system memory 1504 and the central processing unit 1501. The computer device 1500 also includes a basic input / output system (I / O (Input / Output) system) 1506 that helps to transfer information between various components in the computer, and a large-capacity storage device 1507 for storing an operating system 1513, application programs 1514, and other program modules 1511.

[0236] The basic input / output system 1506 includes a display 1508 for displaying information and an input device 1509 such as a mouse and a keyboard for user inputting information. The display 1508 and the input device 1509 are connected to the central processing unit 1501 through an input / output controller 1510 connected to the system bus 1505. The basic input / output system 1506 may also include an input / output controller 1510 for receiving and processing inputs from a plurality of other devices such as a keyboard, a mouse, or an electronic stylus. Similarly, the input / output controller 1510 also provides output to a display screen, a printer, or other types of output devices.

[0237] The mass storage device 1507 is connected to the central processing unit 1501 through a mass storage controller (not shown) connected to the system bus 1505. The mass storage device 1507 and its associated computer readable media provide non-volatile storage for the computer device 1500. That is, the mass storage device 1507 may include a computer readable medium (not shown) such as a hard disk or a CD-ROM (Compact Disc Read-Only Memory) drive.

[0238] Without loss of generality, computer readable media may include computer storage media and communication media. Computer storage media include volatile and non-volatile, removable and non-removable media implemented by any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Computer storage media include RAM, ROM, EPROM (Erasable Programmable Read Only Memory), EEPROM (Electrically Erasable Programmable Read Only Memory), flash memory or other solid-state storage technologies, CD-ROM, DVD (Digital Video Disc) or other optical storage, cassettes, tapes, disk storage or other magnetic storage devices. Of course, those skilled in the art will appreciate that computer storage media are not limited to the above. The above-mentioned system memory 1504 and mass storage device 1507 can be collectively referred to as memory.

[0239] According to various embodiments of the present disclosure, the computer device 1500 can also be connected to a remote computer on the network through a network such as the Internet. That is, the computer device 1500 can be connected to the network 1512 through the network interface unit 1511 connected to the system bus 1505, or the network interface unit 1511 can be used to connect to other types of networks or remote computer systems (not shown).

[0240] The memory also includes a computer program, which is stored in the memory and configured to be executed by one or more processors to implement the behavior tree debugging method.

[0241] In an exemplary embodiment, a computer-readable storage medium is further provided, wherein the storage medium stores at least one instruction, at least one program, a code set or an instruction set, and when the at least one instruction, the at least one program, the code set or the instruction set is executed by a processor, the behavior tree debugging method is implemented.

[0242] Optionally, the computer readable storage medium may include: ROM (Read Only Memory), RAM (Random Access Memory), SSD (Solid State Drives) or optical disks, etc. Among them, the random access memory may include ReRAM (Resistance Random Access Memory) and DRAM (Dynamic Random Access Memory).

[0243] In an exemplary embodiment, a computer-readable storage medium including program code is also provided, such as a memory including program code, and the program code can be executed by a processor to perform the above behavior tree debugging method. Optionally, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact-disc read-only memory (CD-ROM), a magnetic tape, a floppy disk, an optical data storage device, etc.

[0244] In an exemplary embodiment, a computer program product is also provided, including a computer program, and when the computer program is executed by a processor, the above-mentioned behavior tree debugging method is implemented.

[0245] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. The present disclosure is intended to cover any variations, uses or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The description and examples are to be considered exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0246] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A behavior tree debugging method, characterized in that: Applied to the debugging editing end, the method includes: Get breakpoint mark operation; According to the breakpoint marking operation, first breakpoint information is obtained, and the first breakpoint information is sent to the debugged end; The debugged end is used to receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as a first breakpoint node, and pause the operation of the behavior tree when the behavior tree runs to the first breakpoint node.

2. The method according to claim 1, characterized in that: Before the operation of obtaining the breakpoint mark, the method further includes: Obtaining a node configuration operation, wherein the node configuration operation is used to change the logical relationship between nodes of the behavior tree; According to the node configuration operation, a changed logical relationship diagram between nodes is displayed, and node description information is generated, where the node description information indicates the changed content corresponding to the node configuration operation; Sending the node description information to the debugged terminal; The debugged end is further used to receive the node description information, and configure the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree.

3. The method according to claim 1, characterized in that: After the operation of the behavior tree is paused, the method further includes: Get single-step debugging operation; Generate second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end; The debugged end is further configured to receive the second breakpoint information, configure the node in the behavior tree indicated by the second breakpoint information as a second breakpoint node, and run the behavior tree from the first breakpoint node to the second breakpoint node, and suspend the running of the behavior tree when the behavior tree runs to the second breakpoint node.

4. The method according to claim 3, characterized in that: After sending the second breakpoint information to the debugged end, the method further includes: Sending an operation data acquisition instruction to the debugged end, and receiving feedback data from the debugged end in response to the operation data acquisition instruction; Based on the feedback data, a debugging file is generated.

5. The method according to claim 4, characterized in that: The step of generating a debugging file based on the feedback data includes: Determine timestamp information, where the timestamp information is used to indicate the execution time of the first breakpoint node and the second breakpoint node; Extracting data within the execution time indicated by the timestamp information in the feedback data to obtain data to be packaged; The data to be packaged is packaged to obtain the debugging file.

6. The method according to claim 1, characterized in that: The operation of obtaining a breakpoint mark includes: Display each node in the behavior tree; In response to a trigger operation on a target node, a breakpoint configuration control is displayed, the target node being any execution node among the nodes, and the breakpoint configuration control is used to receive the breakpoint marking operation.

7. A behavior tree debugging method, characterized in that: Applied to the debugged end, the method includes: receiving first breakpoint information, and configuring a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node; When the behavior tree runs to the first breakpoint node, pausing the running of the behavior tree; The debugging editing end is used to obtain a breakpoint marking operation; obtain first breakpoint information according to the breakpoint marking operation, and send the first breakpoint information to the debugged end.

8. The method according to claim 7, characterized in that: Before receiving the first breakpoint information, the method further includes: Receiving node description information, where the node description information indicates a change content corresponding to the node configuration operation; configuring the changed logical relationship between nodes of the behavior tree indicated by the node description information into the behavior tree; The debugging editing end is used to obtain a node configuration operation, and the node configuration operation is used to change the logical relationship between nodes of the behavior tree; according to the node configuration operation, the changed logical relationship diagram between nodes is displayed, and the node description information is generated; and the node description information is sent to the debugged end.

9. The method according to claim 7, characterized in that: After pausing the running of the behavior tree, the method further includes: receiving second breakpoint information, and configuring a node in the behavior tree indicated by the second breakpoint information as a second breakpoint node; Running the behavior tree from the first breakpoint node to the second breakpoint node, and pausing the running of the behavior tree when the behavior tree reaches the second breakpoint node; The debugging editing end is used to obtain a single-step debugging operation; generate the second breakpoint information according to the single-step debugging operation, and send the second breakpoint information to the debugged end.

10. The method according to claim 9, characterized in that: When the behavior tree runs to the second breakpoint node, after pausing the running of the behavior tree, the method further includes: Get the running data acquisition instruction; Sending feedback data for the operation data acquisition instruction to the debugged end.

11. The method according to claim 7 or 9, characterized in that: The node information corresponding to the breakpoint node is stored in the breakpoint storage array. The pausing the running of the behavior tree includes: Matching the node information corresponding to the current running node with the node information stored in the breakpoint storage array to obtain a matching result; When the matching result indicates that the match is successful, the running of the behavior tree is paused.

12. A behavior tree debugging device, characterized in that: include: A first acquisition module is configured to execute an acquisition breakpoint mark operation; The first breakpoint information sending module is configured to execute the breakpoint marking operation to obtain the first breakpoint information, and send the first breakpoint information to the debugged end; wherein the debugged end is used to receive the first breakpoint information, configure the node in the behavior tree indicated by the first breakpoint information as the first breakpoint node, and suspend the operation of the behavior tree when the behavior tree runs to the first breakpoint node.

13. A behavior tree debugging device, characterized in that: include: A breakpoint configuration module is configured to receive first breakpoint information and configure a node in the behavior tree indicated by the first breakpoint information as a first breakpoint node; A first pause module is configured to pause the operation of the behavior tree when the behavior tree reaches the first breakpoint node; wherein the debugging editor is used to obtain a breakpoint mark operation; According to the breakpoint marking operation, first breakpoint information is obtained, and the first breakpoint information is sent to the debugged end.

14. An electronic device, characterized in that: include: processor; a memory for storing instructions executable by the processor; The processor is configured to execute the instructions to implement the behavior tree debugging method according to any one of claims 1 to 6 or claims 7 to 11.

15. A computer-readable storage medium, characterized in that: When the instructions in the computer-readable storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the behavior tree debugging method according to any one of claims 1 to 6 or claims 7 to 11.

16. A computer program product, characterized in that The computer program product comprises a computer program, the computer program is stored in a readable storage medium, at least one processor of a computer device reads and executes the computer program from the readable storage medium, so that the computer device performs the behavior tree debugging method according to any one of claims 1 to 6 or claims 7 to 11.