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

By entering user information into the behavior tree editing interface and generating target behavior tree using pre-trained AI models, the problem of low efficiency of behavior tree editing in the existing technology is solved, and efficient editing and learning costs are achieved.

CN119201079APending Publication Date: 2024-12-27SANDBOX NETWORK TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411153920.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-21
Publication Date
2024-12-27

AI Technical Summary

Technical Problem

The existing behavior tree editing scheme is inefficient, especially unfriendly to inexperienced users, requiring high learning costs.

Method used

By displaying the behavior tree editing interface, the editing information entered by the user is obtained and inputted into the pre-trained AI model, the editable target behavior tree is generated, including generating logical scripts and combining nodes, displaying function descriptions and attribute options, and supporting nodes. Edit and operate.

Benefits of technology

It improves the efficiency of behavior tree editing, reduces user learning costs, and allows inexperienced users to easily edit complex behavior logic.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119201079A_ABST
    Figure CN119201079A_ABST
Patent Text Reader

Abstract

The invention provides a behavior tree editing method and device, electronic equipment and a storage medium, and the method comprises the steps: displaying a behavior tree editing interface which at least comprises an information input region and a behavior tree editing region; in response to an information input operation for the information input area, obtaining editing information input by a user, and inputting the editing information into a pre-trained AI model to obtain an editable target behavior tree; and displaying the target behavior tree in the behavior tree editing area. According to the method, the editable target behavior tree can be obtained by obtaining the editing information input by the user and inputting the editing information into the pre-trained AI model, and compared with the mode that the user manually edits the behavior tree in the prior art, the efficiency of editing the behavior tree can be improved, and the operation efficiency can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

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

[0002] Behavior tree is a method to represent and manage complex behavior logic in a graphical way. It is an extension of state machine that can decompose behaviors into nodes and organize them in a hierarchical structure.

[0003] Behavior trees are scalable, easy to maintain, and easy to modify. They can help developers quickly build complex behavior logic, and are therefore widely used in game development. For example, they are used to describe character behaviors, NPC (Non-Player Character) behaviors, game AI (Artificial Intelligence), and other behaviors.

[0004] Currently, the editing scheme for behavior trees is as follows: import or create a behavior tree in the game engine, add various types of nodes in the behavior tree editor, set the corresponding properties and parameters for each node, and edit the logical flow between nodes. However, this editing method is cumbersome and inefficient; on the other hand, since the behavior logic of behavior trees is usually complex, inexperienced users usually have no idea where to start. In other words, the current behavior tree editing scheme is not friendly to inexperienced users and requires a certain learning cost.

[0005] Therefore, how to improve the efficiency of editing behavior trees is an urgent problem to be solved. Summary of the invention

[0006] The present invention provides a behavior tree editing method, device, electronic device and storage medium, which are used to solve the defect of low efficiency in the prior art of manually editing a behavior tree by a user, thereby improving the efficiency of editing a behavior tree.

[0007] The present invention provides a behavior tree editing method, comprising: Displaying a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area; In response to an information input operation on the information input area, obtaining editing information input by the user, and inputting the editing information into a pre-trained AI model to obtain an editable target behavior tree; The target behavior tree is displayed in the behavior tree editing area.

[0008] According to a behavior tree editing method provided by the present invention, the editing information is input into a pre-trained AI model to obtain an editable target behavior tree, comprising: Input the editing information into a pre-trained AI model, and the AI ​​model generates a corresponding logic script based on the editing information; Based on the logic script, a target behavior tree is generated.

[0009] According to a behavior tree editing method provided by the present invention, the editing information is input into a pre-trained AI model, and the AI ​​model generates a corresponding logic script based on the editing information, including: The editing information is input into a pre-trained AI model, and the AI ​​model completes the basic logic required by the behavior tree based on the logic contained in the editing information to generate a logic script.

[0010] According to a behavior tree editing method provided by the present invention, generating a target behavior tree based on the logic script includes: Traversing the logic script, identifying code blocks in the logic script and logical relationships between code blocks; Determine the target nodes corresponding to the code blocks, and determine the logical relationship between the target nodes according to the logical relationship between the code blocks; According to the logical relationship between the target nodes, the target nodes are combined to generate a target behavior tree.

[0011] According to a behavior tree editing method provided by the present invention, displaying the target behavior tree in the behavior tree editing area includes: For the target behavior tree, generating a functional description corresponding to the target behavior tree; For a target node on the target behavior tree, generating a function description corresponding to the target node; In the behavior tree editing area, a function description corresponding to the target behavior tree and a function description corresponding to the target node are displayed.

[0012] According to a behavior tree editing method provided by the present invention, after displaying the target behavior tree in the behavior tree editing area, the method further comprises: In response to a selection operation on a target node on the target behavior tree, displaying attribute options of the selected target node in an attribute editing area; In response to the triggering operation on the attribute option, the selected target node is edited.

[0013] According to a behavior tree editing method provided by the present invention, after displaying the target behavior tree in the behavior tree editing area, the method further comprises: In response to a trigger instruction for a target object in the behavior tree editing area, a target operation corresponding to the trigger instruction is performed on the target object; the target object includes a target node and a connection between target nodes.

[0014] The present invention also provides a behavior tree editing device, comprising: An interface display module, used to display a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area; A response module, used to respond to the information input operation on the information input area, obtain the editing information input by the user, input the editing information into a pre-trained AI model, and obtain an editable target behavior tree; A behavior tree display module is used to display the target behavior tree in the behavior tree editing area.

[0015] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the behavior tree editing method as described in any one of the above items when executing the program.

[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the behavior tree editing method as described in any one of the above items are implemented.

[0017] The behavior tree editing method, device, electronic device, and storage medium provided by the present invention obtain editing information input by a user and input the editing information into a pre-trained AI model to obtain an editable target behavior tree. Compared with the method of manually editing a behavior tree by a user in the prior art, the efficiency of editing a behavior tree can be improved, thereby improving work efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 4 is a flow chart of a behavior tree editing method provided by an embodiment of the present invention.

[0020] Figure 2 It is a schematic diagram of a logic script provided by an embodiment of the present invention.

[0021] Figure 3 Schematic diagram of a behavior tree provided by an embodiment of the present invention.

[0022] Figure 4 Schematic diagram of the structure of a behavior tree editing device provided by an embodiment of the present invention.

[0023] Figure 5 It is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0024] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0025] Figure 1 is a flow chart of a behavior tree editing method provided by an embodiment of the present invention. Figure 1 , an embodiment of the present invention provides a behavior tree editing method, the method may specifically include the following steps: Step 101: Display a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area.

[0026] The behavior tree editing method provided in the embodiment of the present invention may be executed by a game engine, such as a unity engine, a UE4 engine, a Cocos engine, etc., or by a server or a terminal device, such as a tablet computer, a notebook computer, a PDA, an ultra-mobile personal computer (UMPC), a netbook, or a personal digital assistant (PDA), etc., and the present invention is not limited thereto.

[0027] For example, a game engine can be installed and run on a terminal device, and the terminal device can display a behavior tree editing interface provided by an editor corresponding to the game engine, so that developers can edit the behavior tree through the game engine. The following embodiments of the present invention are described with the game engine as the execution subject.

[0028] The information input area can be used to receive the edit information of the behavior tree. The user can input the edit information through the information input area so that the game engine can know the behavior tree that the user expects to obtain.

[0029] The Behavior Tree Editing Area can be used to display and edit Behavior Trees. A Behavior Tree file can contain one or more Behavior Trees, and all Behavior Trees under the Behavior Tree file can be displayed in the Behavior Tree Editing Area.

[0030] The user can double-click to open the target behavior tree file in the asset directory under the current game object. The game engine can respond to the trigger operation on the target behavior tree file and provide the user with a behavior tree editing interface for editing the content of the target behavior tree file.

[0031] The behavior tree editing interface corresponds to the behavior tree file one by one. The behavior tree editing interface in the embodiment of the present invention can be a tab interface, and each time a behavior tree file is opened, a corresponding tab can be opened, that is, the corresponding behavior tree editing interface is opened.

[0032] The behavior tree editing interface may also include a file display area for displaying all behavior tree files under the current game object, and the file display area may display icons of all behavior tree files. In response to a trigger operation of opening a target behavior tree file from the file display area, the behavior tree editing interface for the target behavior tree file may be displayed. In the embodiment of the present invention, a file display area is designed in the behavior tree editing interface to display icons of all behavior tree files, so that the user can directly open other behavior tree editing interfaces corresponding to other behavior tree files in the current behavior tree editing interface, thereby facilitating switching between different behavior tree editing interfaces and improving editing efficiency.

[0033] The behavior tree editing interface may also include a resource management area. The user may create a new behavior tree file in the resource management area, and the game engine may generate a new behavior tree file in response to the trigger operation of creating a new behavior tree file in the resource management area. The user may also double-click to open a target behavior tree file in the resource management area, and the game engine may display the corresponding behavior tree editing interface in response to the trigger operation of opening the target behavior tree file.

[0034] Step 102, in response to the information input operation on the information input area, obtain the editing information input by the user, input the editing information into the pre-trained AI model, and obtain an editable target behavior tree.

[0035] The edit information input by the user may be text information. The user may input text information through a keyboard device or through voice-to-text conversion, which is not limited in the present invention.

[0036] The information input area may include an input box, which may be used to display and input the edit information input by the user, and may also include an input option for inputting the edit information input by the user into the AI ​​model. Specifically, in response to an input operation on the input box in the information input area, the edit information input by the user may be displayed in the input box, and in response to a trigger operation on the input option, the edit information in the input box may be input into a pre-trained AI model to obtain an editable target behavior tree desired by the user.

[0037] The AI ​​model can be pre-trained to generate a logic script according to the natural language text input by the user. The AI ​​model can be pre-trained by supervised, unsupervised or deep learning, and the present invention does not limit the training method of the AI ​​model.

[0038] Step 103: Display the target behavior tree in the behavior tree editing area.

[0039] After getting the editable target behavior tree, you can display the target behavior tree in the behavior tree editing area.

[0040] The embodiment of the present invention obtains the editing information input by the user and inputs the editing information into a pre-trained AI model to obtain an editable target behavior tree. Compared with the method of manually editing the behavior tree by the user in the prior art, the efficiency of editing the behavior tree can be improved, thereby improving work efficiency.

[0041] In an optional embodiment, the step of inputting the editing information into a pre-trained AI model to obtain an editable target behavior tree in step 103 may include the following sub-steps S11-S12: Sub-step S11, inputting the editing information into a pre-trained AI model, and allowing the AI ​​model to generate a corresponding logic script based on the editing information; Sub-step S12, generating a target behavior tree based on the logic script.

[0042] In the embodiment of the present invention, the logic script may refer to a behavior logic script. The behavior logic script may be used to define the behavior and interaction mode of a virtual character, NPC or other entity, and may control various behaviors of the character such as movement, dialogue, attack, escape, etc.

[0043] After the editing information input by the user is input into the pre-trained AI model, the AI ​​model can generate a corresponding logic script based on the input editing information, and input the logic script into the game engine. The game engine running on the terminal device can generate an editable target behavior tree based on the logic script.

[0044] In another optional embodiment, the editing information can be input into a pre-trained AI model to obtain an editable target behavior tree directly output by the AI ​​model, and the target behavior tree generated by the AI ​​model is displayed in the behavior tree editing area.

[0045] In one embodiment, the volume of the AI ​​model is usually large, and a pre-trained AI model can be set up in the cloud. The game engine can establish remote communication with the cloud, send the editing information input by the user to the AI ​​model set up in the cloud for processing, and receive the data (i.e., logic script) output by the AI ​​model returned by the cloud.

[0046] The embodiment of the present invention uses an AI model to understand the editing information input by the user, and uses the AI ​​model to generate an editable target behavior tree. Compared with the method in the prior art where the user manually edits the behavior tree, the efficiency of editing the behavior tree can be improved, thereby improving work efficiency.

[0047] In an optional embodiment, the sub-step S11 may include: inputting the editing information into a pre-trained AI model, and the AI ​​model completes the basic logic required by the behavior tree based on the logic contained in the editing information to generate a logic script.

[0048] Specifically, after the editing information input by the user is input into the pre-trained AI model, the AI ​​model can complete the basic logic required for a behavior tree based on the basic logic required for a behavior tree and the logic contained in the editing information input by the user, and generate a corresponding logic script after completing the basic logic.

[0049] For example, if the basic logic of a behavior tree includes selection logic, sequential logic, conditional logic, and loop logic, when the editing information input by the user only includes conditional logic and selection logic, the pre-trained AI model can complete the upper and lower tree nodes of the sequential logic and loop logic to form a complete logic tree.

[0050] By using an AI model, the embodiments of the present invention can automatically complete the basic logic required by the behavior tree when the logic contained in the editing information input by the user is incomplete, so that inexperienced users do not need to fully understand the complex logic of the behavior tree and can edit the behavior tree, thereby reducing the user's learning cost and improving the efficiency of editing the behavior tree and improving work efficiency.

[0051] In an optional embodiment, the sub-step S12 may include the following sub-steps S121-S123: Sub-step S121, traversing the logic script, identifying the code blocks in the logic script and the logical relationships between the code blocks; Sub-step S122, determining the target nodes corresponding to the code blocks, and determining the logical relationship between the target nodes according to the logical relationship between the code blocks; Sub-step S123, combining the target nodes according to the logical relationship between the target nodes to generate a target behavior tree.

[0052] The nodes in the behavior tree can represent specific behaviors (such as moving, attacking, escaping, etc.), or they can represent control nodes (such as sequence nodes, selection nodes, loop nodes, selection nodes, conditional nodes, behavior nodes, etc.).

[0053] A behavior tree can be composed of a root node, branch nodes, and leaf nodes. The root node is the entrance to the entire behavior tree, the branch node can be responsible for controlling the transition from one node to another, and the leaf node can represent a specific behavior. Complex behavior logic can be constructed by establishing connections such as conditions, selections, and sequences between branch nodes and leaf nodes.

[0054] The game engine can have multiple preset nodes built in, and each node can correspond to a specific logic code (i.e., code block) to execute the corresponding behavior. By combining different nodes, complex behavior logic can be implemented.

[0055] Specifically, after the editing information is input into a pre-trained AI model, the AI ​​model generates a corresponding logic script based on the editing information, and the logic script is input into the game engine, the game engine can traverse the logic script, identify the various code blocks in the logic script, and the logical relationship between the various code blocks, so as to determine the target node corresponding to each code block, and determine the logical relationship between the various target nodes based on the logical relationship between the various code blocks, and then based on the logical relationship between the various target nodes, the various target nodes can be combined to obtain the target behavior tree and display it in the behavior tree editing area.

[0056] Figure 2 is a schematic diagram of a logic script provided by an embodiment of the present invention, Figure 3 is a schematic diagram of a behavior tree provided by an embodiment of the present invention. Figure 2-Figure 3 As an example, a user can input editing information "help me generate a behavior tree of 'role patrol, approach when seeing the player character, attack when the player character is within the attack range'", and the pre-trained AI model can generate the following based on the editing information: Figure 2 The logic script is then input into the game engine, and the game engine traverses the logic script, identifies the code blocks and the logical relationships between the code blocks, and then determines the target node corresponding to each code block, and then generates the following Figure 3 The behavior tree shown.

[0057] The control nodes in this behavior tree include loop nodes, selection nodes, and sequence nodes. The specific behavior logic is: determine whether the player character is within the attack range, if the player character is within the attack range, initiate an attack, if the player character is not within the attack range, approach the player character; determine whether the player character is within the field of view, if the player character is within the field of view, approach the player character.

[0058] In one embodiment, the target behavior tree may be obtained by combining target nodes in a preset pattern, for example, the target nodes may be combined in a pattern of lantern nodes.

[0059] The embodiments of the present invention can determine the logical relationship between the corresponding target nodes and the target nodes by identifying the logical relationship between the code blocks in the logic script generated by the AI ​​model, thereby generating a target behavior tree. Compared with the method in which users manually edit behavior trees in the prior art, the efficiency of editing behavior trees can be improved, thereby improving work efficiency.

[0060] In an optional embodiment, step 103 may include the following sub-steps S21-S23: Sub-step S21, generating a function description corresponding to the target behavior tree for the target behavior tree; Sub-step S22, for a target node on the target behavior tree, generating a function description corresponding to the target node; Sub-step S23, displaying the function description corresponding to the target behavior tree and the function description corresponding to the target node in the behavior tree editing area.

[0061] After generating the target behavior tree, you can generate the function description corresponding to the target behavior tree and display it to the user. At the same time, you can also generate the corresponding function description for each target node of the target behavior tree, and then display the function description corresponding to each behavior node on the target behavior tree in the behavior tree editing area.

[0062] The embodiments of the present invention can facilitate users to check whether the target behavior tree is the result expected by users by generating and displaying the overall functional description of the target behavior tree and the functional description of each node on the target behavior tree. Moreover, for inexperienced users, since the AI ​​model may complete part of the logic, it is more convenient to check whether the target behavior tree is the result expected by users, thereby reducing the user's learning cost and improving work efficiency.

[0063] In an optional embodiment, after displaying the target behavior tree in the behavior tree editing area, the method further includes: in response to a selection operation on a target node on the target behavior tree, displaying property options of the selected target node in the property editing area; and in response to a trigger operation on the property options, editing the selected target node.

[0064] The behavior tree editing interface may also include a property editing area. After displaying the target behavior tree generated by the AI ​​model in the behavior tree editing area, the user may select multiple target nodes on the target behavior tree displayed in the behavior tree editing area, and the game engine may respond to the selection operation on the target node and provide the user with various property options of the selected target node in the property editing area in the form of options, so as to facilitate the user to edit the properties of the selected target node.

[0065] The game engine can respond to a trigger operation on any attribute option of a target node and edit the attributes of the selected target node.

[0066] The embodiment of the present invention displays the attribute options of the node in the attribute editing area. By editing the attribute options, the attributes of the target node can be modified to edit the target behavior tree. Therefore, the user can quickly create a behavior tree after simply editing and modifying the generated target behavior tree, thereby improving work efficiency.

[0067] In an optional embodiment, after displaying the target behavior tree in the behavior tree editing area, the method further includes: responding to a trigger instruction for a target object in the behavior tree editing area, executing a target operation corresponding to the trigger instruction on the target object; the target object includes a target node and a connection between target nodes.

[0068] The operations corresponding to the trigger instruction may include deletion operations, drag operations, etc. Users can trigger instructions through corresponding trigger methods to perform corresponding trigger operations on the selected target object. For example, delete nodes through shortcut keys, drag node connections to modify the logical relationship between nodes, etc.

[0069] In one implementation, the behavior tree editing area, widget hierarchy management area, property editing area, etc. can all be displayed in the form of a window. A window is a rectangular area that can be moved in the behavior tree editing interface and has options such as maximize, minimize, and close.

[0070] After the editable target behavior tree is generated by the AI ​​model, the embodiment of the present invention can edit the target nodes of the target behavior tree and the connections between the target nodes, so that the user can perform simple editing and modification on the basis of the generated target behavior tree, thereby quickly creating a behavior tree and improving work efficiency.

[0071] The behavior tree editing device provided by the present invention is described below. The behavior tree editing device described below and the behavior tree editing method described above can be referenced to each other.

[0072] Figure 3is a schematic diagram of the structure of a behavior tree editing device provided by an embodiment of the present invention. Figure 3 The embodiment of the present invention provides a behavior tree editing device, which may specifically include the following modules: An interface display module 301 is used to display a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area; A response module 302 is used to respond to the information input operation on the information input area, obtain the editing information input by the user, input the editing information into a pre-trained AI model, and obtain an editable target behavior tree; The behavior tree display module 303 is used to display the target behavior tree in the behavior tree editing area.

[0073] In an optional embodiment, the response module includes: A script generation submodule, used to input the editing information into a pre-trained AI model, and the AI ​​model generates a corresponding logic script based on the editing information; The behavior tree generation submodule is used to generate a target behavior tree based on the logic script.

[0074] In an optional embodiment, the script generation submodule includes: A logic completion unit is used to input the editing information into a pre-trained AI model, and the AI ​​model completes the basic logic required by the behavior tree based on the logic contained in the editing information to generate a logic script.

[0075] In an optional embodiment, the behavior tree generation submodule includes: An identification unit, used to traverse the logic script and identify the code blocks in the logic script and the logical relationships between the code blocks; A relationship determination unit, used to determine the target nodes corresponding to the code blocks, and determine the logical relationship between the target nodes according to the logical relationship between the code blocks; The combining unit is used to combine the target nodes according to the logical relationship between the target nodes to generate a target behavior tree.

[0076] In an optional embodiment, the behavior tree display module includes: A first function description generating submodule, configured to generate a function description corresponding to the target behavior tree for the target behavior tree; A second function description generating submodule is used to generate a function description corresponding to a target node on the target behavior tree; The function description display submodule is used to display the function description corresponding to the target behavior tree and the function description corresponding to the target node in the behavior tree editing area.

[0077] In an optional embodiment, after displaying the target behavior tree in the behavior tree editing area, the method further includes: An attribute option display module, used for responding to a selection operation on a target node on the target behavior tree, and displaying attribute options of the selected target node in an attribute editing area; The node editing module is used to edit the selected target node in response to the trigger operation on the attribute option.

[0078] In an optional embodiment, after displaying the target behavior tree in the behavior tree editing area, the method further includes: A trigger instruction response module is used to respond to a trigger instruction for a target object in the behavior tree editing area and perform a target operation corresponding to the trigger instruction on the target object; the target object includes a target node and a connection between target nodes.

[0079] The embodiment of the present invention obtains the editing information input by the user and inputs the editing information into a pre-trained AI model to obtain an editable target behavior tree. Compared with the method of manually editing the behavior tree by the user in the prior art, the efficiency of editing the behavior tree can be improved, thereby improving work efficiency.

[0080] Figure 4 An example of a physical structure diagram of an electronic device is shown in FIG. Figure 4 As shown, the electronic device may include: a processor 410, a communication interface 420, a memory 430 and a communication bus 440, wherein the processor 410, the communication interface 420 and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the behavior tree editing method, which includes: displaying a behavior tree editing interface, the behavior tree editing interface at least including an information input area and a behavior tree editing area; in response to the information input operation for the information input area, obtaining the editing information input by the user, inputting the editing information into the pre-trained AI model, and obtaining an editable target behavior tree; and displaying the target behavior tree in the behavior tree editing area.

[0081] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0082] On the other hand, the present invention further provides a computer program product, the computer program product includes a computer program, the computer program can be stored on a non-transitory computer-readable storage medium, when the computer program is executed by a processor, the computer can execute the behavior tree editing method provided by the above methods, the method comprising: displaying a behavior tree editing interface, the behavior tree editing interface at least including an information input area and a behavior tree editing area; in response to an information input operation for the information input area, obtaining editing information input by a user, inputting the editing information into a pre-trained AI model, and obtaining an editable target behavior tree; displaying the target behavior tree in the behavior tree editing area.

[0083] In another aspect, the present invention further provides a non-transitory computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the behavior tree editing method provided by the above methods is implemented, the method comprising: displaying a behavior tree editing interface, wherein the behavior tree editing interface comprises at least an information input area and a behavior tree editing area; in response to an information input operation for the information input area, obtaining editing information input by a user, inputting the editing information into a pre-trained AI model, and obtaining an editable target behavior tree; and displaying the target behavior tree in the behavior tree editing area.

[0084] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0085] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0086] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A behavior tree editing method, characterized in that: include: Displaying a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area; In response to an information input operation on the information input area, obtaining editing information input by the user, and inputting the editing information into a pre-trained AI model to obtain an editable target behavior tree; The target behavior tree is displayed in the behavior tree editing area.

2. The method according to claim 1, characterized in that The step of inputting the editing information into a pre-trained AI model to obtain an editable target behavior tree includes: Input the editing information into a pre-trained AI model, and the AI ​​model generates a corresponding logic script based on the editing information; Based on the logic script, a target behavior tree is generated.

3. The method according to claim 2, characterized in that The step of inputting the editing information into a pre-trained AI model, and generating a corresponding logic script based on the editing information by the AI ​​model, comprises: The editing information is input into a pre-trained AI model, and the AI ​​model completes the basic logic required by the behavior tree based on the logic contained in the editing information to generate a logic script.

4. The method according to claim 3, characterized in that The generating a target behavior tree based on the logic script includes: Traversing the logic script, identifying code blocks in the logic script and logical relationships between code blocks; Determine the target nodes corresponding to the code blocks, and determine the logical relationship between the target nodes according to the logical relationship between the code blocks; According to the logical relationship between the target nodes, the target nodes are combined to generate a target behavior tree.

5. The method according to claim 1, characterized in that Displaying the target behavior tree in the behavior tree editing area includes: For the target behavior tree, generating a functional description corresponding to the target behavior tree; For a target node on the target behavior tree, generating a function description corresponding to the target node; In the behavior tree editing area, a function description corresponding to the target behavior tree and a function description corresponding to the target node are displayed.

6. The method according to claim 1, characterized in that After displaying the target behavior tree in the behavior tree editing area, the method further includes: In response to a selection operation on a target node on the target behavior tree, displaying attribute options of the selected target node in an attribute editing area; In response to the triggering operation on the attribute option, the selected target node is edited.

7. The method according to claim 1, characterized in that Displaying the target behavior tree in the behavior tree editing area further includes: In response to a trigger instruction for a target object in the behavior tree editing area, a target operation corresponding to the trigger instruction is performed on the target object; the target object includes a target node and a connection between target nodes.

8. A behavior tree editing device, characterized in that: include: An interface display module, used to display a behavior tree editing interface, wherein the behavior tree editing interface at least includes an information input area and a behavior tree editing area; A response module, used to respond to the information input operation on the information input area, obtain the editing information input by the user, input the editing information into a pre-trained AI model, and obtain an editable target behavior tree; A behavior tree display module is used to display the target behavior tree in the behavior tree editing area.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the behavior tree editing method according to any one of claims 1 to 7 is implemented.

10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the behavior tree editing method according to any one of claims 1 to 7 is implemented.