A method for elastically constructing behavioral rules based on action perception

Through the flexible construction method of behavioral rules based on action perception, the user-defined control problem caused by interface restrictions in traditional simulation systems is solved, and higher flexibility and ease of use are achieved.

CN117666384BActive Publication Date: 2025-04-15INST OF WAR STUDIES ACAD OF MILITARY SCI OF THE CHINESE PEOPLES LIBERATION ARMY
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311665656.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-12-06
Publication Date
2025-04-15
Estimated Expiration
2043-12-06

AI Technical Summary

Technical Problem

Under the interface limitations of the behavioral rules layer, traditional agent-based simulation systems are difficult to meet users' custom control needs for behavioral processes, resulting in limited user flexibility and expression ability.

Method used

The elastic construction method of behavior rules based on action perception is adopted. By obtaining the agent's application method, the interface data of the behavior rule layer is determined, and the behavior logic code is analyzed and elastically generated, and the behavior logic code is passed to the basic action layer to control the agent's movement.

Benefits of technology

It realizes adaptively completing or skipping behavioral rule logic based on the input of the application mode layer, allowing users to express their control methods more flexibly, and improves the ease of use and application scope of the simulation system.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117666384B_ABST
    Figure CN117666384B_ABST
Patent Text Reader

Abstract

The present application relates to a method for elastically constructing behavior rules based on action perception. The method includes: obtaining the application mode of the intelligent body as the input of the application mode layer in the logic control layer; according to the application mode of the intelligent body, determining the interface data to be input into the behavior rule layer in the logic control layer, and completing the elastic input of the behavior rule data; the behavior rule layer in the logic control layer parses the input interface data, and flexibly generates behavior logic code, and passes it to the basic action layer in the logic control layer; the basic action layer in the logic control layer controls the movement of the intelligent body according to the input behavior logic code. This method adaptively completes or skips part of the behavior rule logic according to the input of the application mode layer, thereby allowing the upper-level user to more flexibly express the control mode of the intelligent body based on the same control interface, while remaining unaware of the implementation details of the behavior rule layer.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of simulation modeling, and in particular to a method for elastically constructing behavioral rules based on action perception. Background Art

[0002] Agent-Based Simulation is one of the most important means in the field of system simulation modeling. This modeling method has unique advantages for systems with multiple and complex interactive relationships. The key lies in the control of agent behavior. According to the order of behavior control logic from objective to subjective, agent-based simulation is usually divided into three levels: basic actions of agents, behavior rules, and application methods. Among the three layers of logic, the lower layer is the control basis of the upper layer, and the upper layer calls the interface exposed by the lower layer for logical control. The advantage of such hierarchical control is that each layer only needs to care about the interface exposed by the next lower layer, without perceiving unnecessary details of other layers, thereby reducing the coupling between layers, simplifying the complexity of each layer's logic design, and facilitating the replacement and reuse of logic.

[0003] In the above control hierarchy, the higher the level, the more flexible it is, especially the application mode layer, which is often highly subjective and personalized, which brings challenges to the logical construction of the behavior rule layer. From the perspective of user use, the behavior rule layer and below of an agent-based simulation system are often encapsulated inside the system, and only the behavior rule layer interface is exposed upward; users build the application mode layer based on these interfaces to implement customized applications. Simulation systems often hope to provide users with as high flexibility and expression capabilities as possible within a reasonable range, but the traditional method often adopts a bottom-up driving method, that is, the application mode layer uses what the behavior rule layer has, and the application mode layer calls the interface and format provided by the behavior rule layer, resulting in the upper-level user's logical expression and usage method being strictly restricted by the lower-level interface. If in some cases, the user wants to control the behavior process, the existing interface cannot support it. To meet this control requirement, the intuitive solution is to add a special class of interfaces, but users are required to explicitly distinguish which interface to call, which undoubtedly increases the burden and cost of user use. Summary of the invention

[0004] Based on this, it is necessary to provide a method for elastically constructing behavioral rules based on action perception to address the above technical issues.

[0005] A method for elastically constructing behavioral rules based on action perception, the method comprising:

[0006] Step S1: Obtain the agent application mode as input to the application mode layer in the logic control level;

[0007] Step S2: according to the application mode of the intelligent agent, determining the interface data of the behavior rule layer in the logic control level, and completing the flexible input of the behavior rule data;

[0008] Step S3: the behavior rule layer in the logic control level analyzes the input interface data, and flexibly generates behavior logic code, and transmits it to the basic action layer in the logic control level;

[0009] Step S4: The basic action layer in the logic control level controls the movement of the intelligent agent according to the input behavior logic code.

[0010] In one embodiment, the method of using the intelligent agent includes: controlling the behavior of the intelligent agent.

[0011] In one of the embodiments, the interface is a binary parameter, and one of the binary parameters is selected as a data transmission parameter for transferring data to a behavior rule layer in the logic control level.

[0012] In one of the embodiments, the binary parameter includes a behavior result constraint parameter and a behavior process control parameter.

[0013] In one embodiment, the step of determining the interface data for inputting into the behavior rule layer in the logic control level according to the agent application mode, and completing the flexible input of the behavior rule data includes:

[0014] According to the agent application mode, selecting one of the two-tuple parameters as the data transmission parameter;

[0015] The agent operation mode is converted into specific data on the data transmission parameter, and the other parameter in the binary parameter is "empty".

[0016] In one embodiment, parsing the input interface data and flexibly generating behavior logic code includes:

[0017] Step S61: determine whether the interface data contains behavior process control data; if so, execute step S62; otherwise, execute step S63;

[0018] Step S62: directly generating a complete behavior logic code according to the interface data including the behavior process control parameters;

[0019] Step S63: Generate an incomplete behavior logic code according to the interface data that does not include the behavior process control parameter, and complete the incomplete behavior logic code to obtain a complete behavior logic code.

[0020] In one embodiment, the behavioral process control data includes customized waypoints.

[0021] In one embodiment, directly generating a complete behavior logic code based on the interface data including the behavior process control parameters includes: directly generating a complete behavior logic code based on the initial position of the intelligent agent, the customized path points and the target position of the intelligent agent's movement.

[0022] In one of the embodiments, completing the incomplete behavior logic code includes: completing the incomplete behavior logic code using a path planning algorithm PathPlan().

[0023] In one embodiment, controlling the agent to move according to the input behavior logic code comprises:

[0024] Convert the input behavior logic code into a final path;

[0025] Control the agent to move according to the final path.

[0026] The present invention proposes a flexible behavior rule construction idea that is aware of the upper-layer behavior. It can adaptively complete or skip part of the behavior rule logic according to the input of the application mode layer, thereby allowing the upper-layer users to more flexibly express the control method of the intelligent agent based on the same control interface, while remaining unaware of the implementation details of the behavior rule layer, thereby improving the usability of the intelligent agent-based simulation system and expanding its scope of application. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] Figure 1 A simulation scene of a sweeping robot in an embodiment;

[0028] Figure 2 A flowchart of a method for elastically constructing behavior rules based on action perception in one embodiment;

[0029] Figure 3 An agent-based simulation control hierarchy and example in one embodiment;

[0030] Figure 4 An agent-based simulation control hierarchy from a user's perspective in one embodiment;

[0031] Figure 5 The workflow of the traditional behavior rule layer in one embodiment; DETAILED DESCRIPTION

[0032] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0033] The present application provides a method for elastically constructing behavioral rules based on action perception, which can be applied to Figure 1 The simulation scene shown in the figure takes the example of a user controlling a sweeping robot to clean a designated target location. The simulation scene assumes a two-dimensional plane coordinate system. The robot is initially located at (0,0), the stain (indicated by a five-pointed star), that is, the designated cleaning location is located at (3,2), and the L-shaped black strip represents an obstacle. The user's control method of the robot may vary according to needs. If the user wants the robot to reach the target area as quickly as possible to complete the cleaning, the target area location may be specified, and the specific path is left to the robot to plan autonomously, as shown in path ①; if the user wants the robot to clean other areas as much as possible during the movement, the movement path may be customized, as shown in path ②. The challenge of this problem is how to move to the target location along different paths as needed based on the same set of control interfaces provided by the behavior rule layer according to the user's input under different needs.

[0034] In one embodiment, Figure 2 As shown in the figure, a method for elastically constructing behavioral rules based on action perception is provided. Figure 1 Take this as an example to illustrate, including the following steps:

[0035] Step S1: Obtain the agent application mode as input to the application mode layer in the logic control level;

[0036] Specifically, according to the order of behavior control logic from objective to subjective, the logic control level is usually divided into three levels: basic actions of the intelligent agent, behavior rules, and application methods, such as Figure 3 As shown on the left. Among the three layers of logic, the lower layer is the control basis of the upper layer, and the upper layer calls the interface exposed by the lower layer for logical control. Among them, the lowest layer is the basic action of the intelligent agent, that is, the most basic behavior of the intelligent agent itself; above this is the behavioral rules of the intelligent agent, which is an action mode with a certain universality formed by encapsulating several basic actions; the top layer is the application method of the intelligent agent, which is based on a combination of several action styles and represents the most subjective application method of the controller of the intelligent agent. The advantage of such hierarchical control is that each layer only needs to care about the interface exposed by the adjacent lower layer, without perceiving unnecessary details of other layers, thereby reducing the coupling between layers, simplifying the complexity of the logic design of each layer, and facilitating the replacement and reuse of logic. Figure 1Taking the robot vacuum cleaner simulation scene shown in the figure as an example, the basic action layer at the bottom is the basic capabilities of the robot vacuum cleaner itself, such as tire rolling, side brush rotation, etc.; the behavior rule layer is further encapsulated on this basis, such as the behavior rule of local vacuuming, first moving to the area to be cleaned through the basic action of tire rolling, then collecting dust to the suction port through the side brush rotation, and finally sucking the dust into the dust collection box through the fan, thus completing the local vacuuming; the top layer is a number of user-defined cleaning modes, such as the fast cleaning mode, which is completed by combining the three behavior rules of local vacuuming, avoiding obstacles, and returning to charge. Such hierarchical control design is also followed in other real-time strategy games such as drone simulation and StarCraft.

[0037] From the user's perspective, the behavior rule layer and below of an agent-based simulation system are often encapsulated inside the system, and only the behavior rule layer interface is exposed upward; users build the application mode layer based on these interfaces to implement customized applications, such as Figure 4 As shown in the figure. Simulation systems often hope to provide users with as much flexibility and expression capabilities as possible within a reasonable range, but the traditional method often adopts a bottom-up driving method, that is, the application method layer uses what the behavior rule layer has, and the application method layer calls the interface and format provided by the behavior rule layer. As a result, the logical expression and usage methods of the upper-level users are strictly restricted by the lower-level interface. The workflow of the traditional behavior rule layer is as follows: Figure 5 As shown. Figure 1 Take the sweeping robot simulation control shown as an example. For example, for the obstacle avoidance rules of the behavior rule layer, its interface requires the input of the starting point and end point of the robot's movement, and the path points between the starting point and the end point are completely planned independently by the behavior rule layer. The user can only give the starting point and the end point according to this requirement. However, in some cases, if the user wants to customize the path, that is, in addition to the starting point and the end point, the path points between the starting point and the end point must also be controlled, this interface cannot support it.

[0038] Specifically, the behavior of the controlled agent is often determined on demand. The user may choose to control the behavior of the agent himself, or may only put forward requirements for the behavior effect of the agent, and then the behavior rule layer will autonomously plan the behavior accordingly. In the former case, the user will directly give the behavior control process, such as specifying the cleaning path of the sweeping robot, or specifying the attack sequence of a series of targets in a real-time strategy game; in the latter case, the user will only give the necessary constraints for controlling the behavior, such as only giving the starting point and end point of the sweeping robot, and the specific path will be autonomously planned by the behavior rule layer, or only giving the attack target set for a certain formation in the game, and the specific attack sequence will be autonomously calculated by the behavior rule layer. Both methods are input to the behavior rule layer in the form of behavior control parameters, as shown in Table 1.

[0039] Table 1 Examples of two different ways for users to control the behavior of the agent

[0040]

[0041] Specifically, the pseudocode of the execution process of the sweeping robot under different control modes is as follows, and the pseudocode for obtaining the intelligent agent application mode is lines 1-5.

[0042]

[0043] Step S2: according to the application mode of the intelligent agent, determining the interface data of the behavior rule layer in the logic control level, and completing the flexible input of the behavior rule data;

[0044] Step S3: the behavior rule layer in the logic control level analyzes the input interface data, and flexibly generates behavior logic code, and transmits it to the basic action layer in the logic control level;

[0045] Step S4: The basic action layer in the logic control level controls the movement of the intelligent agent according to the input behavior logic code.

[0046] In one embodiment, the agent application method includes: controlling the behavior of the agent.

[0047] In one embodiment, the interface is a binary parameter, and one of the binary parameters is selected as a data transmission parameter for transferring data to the behavior rule layer in the logic control level.

[0048] In one embodiment, the two-tuple parameter includes a behavior result constraint parameter and a behavior process control parameter.

[0049] Specifically, based on the analysis and summary of the behavior control methods of the intelligent agent, the control interface of the behavior is redesigned. Different from the traditional control of each behavior consisting of a set of parameters, for each behavior, its control interface is designed as a two-tuple <behavior result constraint parameter, behavior process control parameter>. Taking the above robot's maneuver rule control interface as an example, the pseudo code of its control interface is as follows:

[0050]

[0051] Among them, path represents the path point, which is used to store the control parameters of the behavior process; src and dest represent the initial position and target position respectively, which are used to store the constraint parameters of the behavior effect.

[0052] In one embodiment, the step of determining the interface data for inputting into the behavior rule layer in the logic control level according to the agent application mode, and completing the flexible input of the behavior rule data includes:

[0053] According to the agent application mode, selecting one of the two-tuple parameters as the data transmission parameter;

[0054] The agent operation mode is converted into specific data on the data transmission parameter, and the other parameter in the binary parameter is "empty".

[0055] Specifically, the behavior rule layer provides the Move() function as an interface for controlling the movement of the sweeping robot. Its parameter is a variable of type MoveControl. The pseudo code for its implementation is as follows:

[0056]

[0057] After reading the user's input parameters, the input data mc_customized and mc_planned need to be mapped to the interface parameter MoveControl provided by the behavior rule layer, and the corresponding interface parameters are replaced with the specific data entered by the user. The pseudo code for implementation is as follows:

[0058]

[0059] Specifically, another parameter being "empty" indicates that the parameter has no specific value and no data is passed.

[0060] In one embodiment, parsing the input interface data and flexibly generating behavior logic code includes:

[0061] Step S61: determine whether the interface data contains behavior process control data; if so, execute step S62; otherwise, execute step S63;

[0062] Specifically, since the user input is uncertain, it may be a behavior process control parameter, that is, a user-defined path②; it may also be a constraint parameter of the behavior effect, that is, the robot's initial position and the target position of movement, so it is necessary to parse and identify the user's intention. The pseudo code for determining the control method of the behavior is as follows:

[0063]

[0064] Step S62: directly generating a complete behavior logic code according to the interface data including the behavior process control parameters;

[0065] Specifically, if the user input parameters include custom path points, indicating that the user wants to control the behavior of the agent, the logical code segment of autonomous path planning at the rule layer is skipped, and the pseudo code is as follows:

[0066]

[0067] Step S63: Generate an incomplete behavior logic code according to the interface data that does not include the behavior process control parameter, and complete the incomplete behavior logic code to obtain a complete behavior logic code.

[0068] Specifically, if the user input parameters do not contain custom path points, it means that the user wants the rule layer to autonomously plan the robot's maneuvering path, and then the path planning algorithm PathPlan() is used to complete the logic code segment of the robot's autonomous planning behavior. The pseudo code for implementation is as follows:

[0069]

[0070] In one embodiment, the behavioral process control data includes user-defined waypoints.

[0071] In one embodiment, directly generating a complete behavior logic code based on the interface data containing the behavior process control parameters includes: directly generating a complete behavior logic code based on the initial position of the intelligent agent, the customized path points and the target position of the intelligent agent's movement.

[0072] In one embodiment, completing the incomplete behavior logic code includes: completing the incomplete behavior logic code using a path planning algorithm PathPlan().

[0073] In one embodiment, controlling the agent to move according to the input behavior logic code comprises:

[0074] Convert the input behavior logic code into a final path;

[0075] Control the agent to move according to the final path.

[0076] Specifically, after constructing the corresponding complete logic, the robot can be moved according to the final path mv_path obtained after reconstruction, so as to adapt to the user's control requirements for the robot in different situations. The pseudo code is as follows:

[0077]

[0078] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

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

Claims

1. A method for elastically constructing behavioral rules based on action perception, characterized in that: The method comprises: Step S1: Obtaining the agent application mode as input of the application mode layer in the logic control layer; the agent application mode includes: controlling the behavior of the agent; Step S2: according to the agent application mode, determine the interface data for inputting into the behavior rule layer in the logic control level, and complete the flexible input of the behavior rule data; the interface is a binary parameter, and one parameter in the binary parameter is selected as the data transmission parameter for transmitting data to the behavior rule layer in the logic control level; the binary parameter includes the behavior result constraint parameter and the behavior process control parameter; specifically including: according to the agent application mode, select one parameter in the binary parameter as the data transmission parameter; convert the agent application mode into specific data on the data transmission parameter, and the other parameter in the binary parameter is "empty"; Step S3: The behavior rule layer in the logic control level analyzes the input interface data, and flexibly generates behavior logic code, which is transferred to the basic action layer in the logic control level; specifically, it includes: Step S61: determine whether the interface data contains behavior process control data; if so, execute step S62; otherwise, execute step S63; Step S62: directly generating a complete behavior logic code according to the interface data including the behavior process control parameters; Step S63: generating an incomplete behavior logic code according to the interface data that does not include the behavior process control parameter, and completing the incomplete behavior logic code to obtain a complete behavior logic code; Step S4: The basic action layer in the logic control level controls the movement of the intelligent agent according to the input behavior logic code.

2. The method according to claim 1, characterized in that The behavior process control data includes customized path points.

3. The method according to claim 2, characterized in that The directly generating complete behavior logic code according to the interface data including the behavior process control parameters includes: directly generating complete behavior logic code according to the initial position of the intelligent body, the customized path point and the target position of the intelligent body movement.

4. The method according to claim 3, characterized in that: The completing the incomplete behavior logic code includes: completing the incomplete behavior logic code using a path planning algorithm PathPlan().

5. The method according to claim 4, characterized in that The step of controlling the agent to move according to the input behavior logic code comprises: Convert the input behavior logic code into a final path; Control the agent to move according to the final path.

Citation Information

Patent Citations

  • Reactive layer software architecture containing sensing, actuation and real-time actions for intelligent robots

    KR1020080072335A