Behavior tree-based self-adaptive source searching method

Through the adaptive source search method based on behavior tree and the genetic programming algorithm to optimize the behavior tree, the problem of low source search efficiency in the existing technology is solved, and the robot can effectively find the source of gas leakage in complex environments, especially in indoor environments with obstacles.

CN120409177APending Publication Date: 2025-08-01NAT INNOVATION INST OF DEFENSE TECH PLA ACAD OF MILITARY SCI
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510275264.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-10
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

The existing reactive and cognitive source search methods are inefficient in indoor environments with obstacles, and the reactive methods fail in turbulent environments. The cognitive methods calculate the local optimal concentration value of large resource requirements and are prone to trap in the surrounding obstacles.

Method used

Adaptive source search method based on behavior tree is adopted, combined with genetic programming algorithms, and adaptive source search behavior tree is constructed, including Infotaxis conditional nodes, headwind search conditional nodes, Wall-Around conditional nodes and switching nodes. The behavior tree individual is optimized through genetic programming algorithms to realize adaptive source search for robots in complex environments.

Benefits of technology

The robot can efficiently search for source in an indoor environment with obstacles, and can effectively find gas leakage sources in environments with weak turbulence and wind, improving source search efficiency and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120409177A_ABST
    Figure CN120409177A_ABST
Patent Text Reader

Abstract

The invention discloses a self-adaptive source searching method based on a behavior tree, and the method comprises the steps: obtaining a source searching task which comprises any target substance that a source searching device wants to search; according to a predefined action priority level in the source searching task, a self-adaptive source searching behavior tree is constructed, the self-adaptive source searching behavior tree comprises a root node, a first node, a second node and a switching node, the source searching task is used as the root node of the self-adaptive source searching behavior tree, and the switching node is used as the switching node of the self-adaptive source searching behavior tree; a first node, a second node and a switching node are used as control nodes of an adaptive source searching behavior tree, the first node is used for guiding a decision-making behavior of a source searching device by using environment information, and the second node is used for searching a search space for the source searching device to obtain a new behavior of sensing information. The switching node is used for switching the first node and the second node so as to enable the source searching equipment to adaptively search a source; and adopting a genetic programming algorithm to synthesize and evolve the self-adaptive source searching behavior tree to obtain an optimal behavior tree individual for self-adaptive source searching.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of simulation, and particularly to an adaptive source seeking method based on a behavior tree. Background Art

[0002] The occurrence of accidents such as toxic gas leakage poses a major safety risk to human production, life and the ecological environment. It is crucial to accurately, quickly and safely find the gas leakage source. However, entering the leakage area to seek the source by carrying detection equipment will face a huge safety threat. Therefore, mobile robots equipped with sensors are generally used to search for the leakage source now. According to whether they rely on historical information, the robot source seeking methods can be roughly divided into two categories: reactive methods and cognitive methods. Among them, the reactive method directly establishes a connection between the actions of the robot and the input of the sensor, and triggers a series of predefined motion sequences according to the perceived information such as gas concentration gradient and plume. Typical representative algorithms include the Escherichia coli algorithm based on concentration gradient, and the silkworm moth algorithm and dung beetle algorithm based on windwardness, etc.; the cognitive method usually regards the position of the source as a parameter in the gas diffusion model, and then estimates the distribution of the source position through a probability method based on measurement. Typical representatives include the hidden Markov model method, the Infotaxis algorithm, the particle filter method and so on.

[0003] The existing reactive source seeking methods have limited applicable scenarios. For example, the algorithm based on concentration gradient is not applicable to turbulent environments, and the windwardness algorithm cannot play its advantages in environments with weak wind; each step execution of cognitive source seeking methods such as the Infotaxis algorithm requires updating the probability map, which has a large demand for computing resources. In addition, methods such as the Infotaxis algorithm are designed specifically for obstacle-free scenarios. If directly applied in an obstacle scenario, it is easy for the robot to fall into the local concentration optimum around the obstacle and cannot efficiently seek the source in an indoor environment with obstacles. Summary of the Invention

[0004] To solve some or all of the above technical problems existing in the prior art, the present invention provides an adaptive source seeking method based on a behavior tree, which can achieve efficient source seeking in an indoor environment with obstacles.

[0005] The technical solution of the present invention is as follows:

[0006] The present invention provides an adaptive source seeking method based on a behavior tree, including:

[0007] Obtaining a source seeking task, where the source seeking task includes any target substance that the source seeking device wants to search for;

[0008] Construct an adaptive source-seeking behavior tree according to the predefined action priority levels in the source-seeking task. The adaptive source-seeking behavior tree includes a root node, a first node, a second node, and a switching node. Among them, the source-seeking task is used as the root node of the adaptive source-seeking behavior tree, and the first node, the second node, and the switching node are used as the control nodes of the adaptive source-seeking behavior tree. The first node is used for the behavior of guiding the decision-making of the source-seeking device using environmental information. The second node is used for the behavior of exploring the search space for the source-seeking device to obtain new perception information. The switching node is used to switch between the first node and the second node to enable the source-seeking device to adaptively seek sources.

[0009] Adopt a genetic programming algorithm to synthesize and evolve the adaptive source-seeking behavior tree, and obtain the optimal behavior tree individual for adaptive source-seeking.

[0010] Furthermore, in the above-mentioned adaptive source-seeking method based on a behavior tree, the first node includes an Infotaxis condition node and a headwind search condition node, where:

[0011] The Infotaxis condition node includes the encapsulation of the standard Infotaxis algorithm. After the adaptive source-seeking behavior tree calls the Infotaxis condition node, the Infotaxis condition node returns "running". Subsequently, the source-seeking device executes the Infotaxis algorithm until the source-seeking device reaches the required number of steps. If the required number of steps is reached, the Infotaxis condition node will return "success". If the number of times the source-seeking device reaches the same position is greater than or equal to the preset threshold, the Infotaxis condition node will return "failure".

[0012] The headwind search condition node is used to make the source-seeking device move in the headwind direction. After the adaptive source-seeking behavior tree calls the headwind search condition node, the headwind search condition node will return "running". If the current wind speed is less than the preset threshold, the headwind search condition node will return "failure". Otherwise, the headwind search condition node will return "success".

[0013] Furthermore, in the above-mentioned adaptive source-seeking method based on a behavior tree, the second node includes a Wall-Around condition node and a straight-ahead condition node, where:

[0014] The Wall-Around conditional node includes the encapsulation of the Wall-Around algorithm for implementing a single-step execution of the Wall-Around algorithm. When the distance between the source-seeking device and the nearest obstacle is lower than the preset threshold, the source-seeking device will move along the preset route, thereby avoiding obstacles in the environment and exploring more space. When the Wall-Around conditional node is called by the adaptive source-seeking behavior tree, the Wall-Around conditional node will immediately return to running, and each execution of the Wall-Around conditional node will always return "success".

[0015] The straight-line conditional node is used to move in a straight line along the movement direction of the previous behavior of the source-seeking device. After the straight-line conditional node is called by the adaptive source-seeking behavior tree, the straight-line conditional node will return to running, and then the source-seeking device will perform a straight-line movement according to the preset requirements until the required number of steps is reached. When the required number of steps is reached, the straight-line conditional node will return "success"; when the source-seeking device encounters an obstacle, the straight-line conditional node will return "failure".

[0016] Further, in the above adaptive source-seeking method based on the behavior tree, the switching node includes a posterior reset node, a Wall-Around step threshold node, a concentration threshold node, and a distance threshold node, where:

[0017] The posterior reset node is used to reset the posterior probability map of the Infotaxis conditional node. When the source-seeking device falls into a local optimum due to the execution of the Infotaxis conditional node, executing the posterior reset node can reset the posterior probability map to a uniform distribution, and each execution of the posterior reset node will always return "success".

[0018] The Wall-Around step threshold node is used to execute the Wall-Around conditional node to enable the source-seeking device to avoid obstacles and jump out of the local optimum. At the same time, it checks the total number of steps in a single execution of the Wall-Around conditional node. If the number of steps exceeds the preset threshold, the Wall-Around step threshold node will return "success"; if the number of steps does not exceed the preset threshold, the Wall-Around step threshold node will return "failure".

[0019] The concentration threshold node is used to detect whether the current gas concentration is higher than the threshold. If the current gas concentration is higher than the preset threshold, the concentration threshold node will return "success", otherwise it will return "failure".

[0020] The distance threshold node is used to detect the distance from the current position of the source-seeking device to the nearest obstacle. If the distance from the source-seeking device to the nearest obstacle is less than the preset threshold, the distance threshold node will return "success"; otherwise, it will return "failure".

[0021] Further, in the above-mentioned adaptive source-seeking method based on the behavior tree, the genetic programming algorithm is used to synthesize and evolve the adaptive source-seeking behavior tree to obtain the optimal behavior tree individual for adaptive source-seeking, including:

[0022] Population initialization to obtain the initial behavior tree individuals;

[0023] Using genetic operators to optimize the initial behavior tree individuals to obtain multiple generations of new populations;

[0024] Using the fitness function to limit the new population so that the number of the new population is within the preset range;

[0025] Put the root node, the first node, the second node, and the switching node of the adaptive source-seeking behavior tree into the terminal set and the function set of the genetic programming algorithm, and use the fitness function to evolve and synthesize the optimal behavior tree individual by executing the genetic operators.

[0026] Further, in the above-mentioned adaptive source-seeking method based on the behavior tree, population initialization includes:

[0027] Design a random subtree generation algorithm. The random subtree generation algorithm can select different root node types and add N rand sub-nodes to the initial behavior tree individuals. The first sub-node is a conditional node, and the remaining sub-nodes are action nodes. According to the random subtree generation algorithm, two random subtrees with the root nodes being the fallback node and the sequence node respectively are synthesized, denoted as Use to replace the leftmost sub-node Make the leftmost sub-node of the root node become a sequence node to prevent the root node from returning "success" too early by only calling a few nodes. Subsequently, generate a random subtree Random subtree The type of the root node is randomly selected, and an action node is randomly selected from . Use to replace the randomly selected action node in . If the maximum depth of does not exceed D, keep looping, and loop at most λ - 1 times. Finally, output rand where N maxa random integer between them, D represents the maximum depth of the behavior tree, λ represents the maximum number of replacements, and the above initial behavior tree individual synthesis method N is repeatedly executed pop times, then N pop initial behavior trees can be generated to complete the population initialization.

[0028] Furthermore, in the above-mentioned adaptive source seeking method based on the behavior tree, the genetic operator design includes: a crossover operator, a mutation operator, and a selection operator.

[0029] Furthermore, in the above-mentioned adaptive source seeking method based on the behavior tree, the fitness function is calculated using the following formula:

[0030]

[0031] where fitness represents the fitness function, τ represents the time consumed by the source seeking device to find the target substance; τ tau_max represents the maximum simulation time set in the evolution, tau_max represents the longest simulation time in the simulation environment, and tau represents the time when the robot finds the source in a certain simulation; δ tree_size represents the population range of the adaptive source seeking behavior tree, which is used to limit the size of the adaptive source seeking behavior tree, N th represents the threshold of the number of nodes of the adaptive source seeking behavior tree. When the number of nodes of the adaptive source seeking behavior tree is greater than N th δ tree_size is equal to the number of nodes in the adaptive source seeking behavior tree, otherwise δ tree_size is less than the number of nodes in the adaptive source seeking behavior tree.

[0032] The main advantages of the technical solution of the present invention are as follows:

[0033] The adaptive source seeking method based on the behavior tree of the present invention effectively combines the existing reactive source seeking method and cognitive source seeking method, and through complementary advantages, realizes the efficient source seeking of the robot in the indoor environment with obstacles. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] The accompanying drawings described herein are used to provide a further understanding of the embodiments of the present invention, and constitute a part of the present invention. The illustrative embodiments and descriptions thereof of the present invention are used to explain the present invention, and do not constitute an improper limitation of the present invention. In the drawings:

[0035] Figure 1 is a schematic flow chart of the adaptive source seeking method based on the behavior tree according to an embodiment of the present invention;

[0036] Figure 2The schematic flowchart of synthesizing and evolving an adaptive source seeking behavior tree by using a genetic programming algorithm in the adaptive source seeking method based on a behavior tree provided by an embodiment of the present invention;

[0037] Figure 3 The structural diagram of the adaptive source seeking behavior tree in the adaptive source seeking method based on a behavior tree provided by an embodiment of the present invention;

[0038] Figure 4 The structural diagram of synthesizing and evolving the adaptive source seeking behavior tree in the adaptive source seeking method based on a behavior tree provided by an embodiment of the present invention;

[0039] Figure 5 The schematic structural diagram before population initialization in the adaptive source seeking method based on a behavior tree provided by an embodiment of the present invention;

[0040] Figure 6 The schematic structural diagram after population initialization in the adaptive source seeking method based on a behavior tree provided by an embodiment of the present invention. Detailed implementation manners

[0041] To make the objectives, technical solutions and advantages of the present invention clearer, the technical solutions of the present invention will be clearly and completely described below in conjunction with specific embodiments of the present invention and the corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all of the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.

[0042] The following combines the attached Figures 1 - 6 , and details the technical solutions provided by the embodiments of the present invention.

[0043] First, to more clearly illustrate the technical solutions provided by the embodiments of the present invention, the technical terms involved in the embodiments of the present invention are further described below. Specifically, the technical terms involved in the present invention include:

[0044] A behavior tree consists of multiple nodes, each node represents a behavior or decision, and they are connected together in a specific way to form a tree-like structure, which is the behavior tree.

[0045] Taking an indoor environment with obstacles as an example, as shown in the attached Figure 1 , the embodiments of the present invention provide an adaptive source seeking method based on a behavior tree, and the method includes steps S1 - S3:

[0046] Step S1: Obtain a source seeking task, and the source seeking task includes any target substance that the source seeking device wants to search for;

[0047] In some alternative implementation manners of this embodiment, the source seeking device includes a drone, a robot, etc. The target substances mainly include harmful substances that endanger the environment, biological property, and health in nature, such as harmful gases, fire sources, dangerous goods, radioactive substances, etc. In this embodiment, the following takes poisonous gas as the source seeking task and the robot as the source seeking device to elaborate the technical solution of the present invention in detail.

[0048] Step S2: According to the predefined action priority levels in the source seeking task, construct an adaptive source seeking behavior tree. The adaptive source seeking behavior tree includes a root node, a first node, a second node, and a switching node. Among them, the source seeking task is used as the root node of the adaptive source seeking behavior tree, and the first node, the second node, and the switching node are used as the control nodes of the adaptive source seeking behavior tree. The first node is used for the behavior of guiding the decision-making of the source seeking device using environmental information. The second node is used for the behavior of exploring the search space for the source seeking device to obtain new perception information. The switching node is used to switch between the first node and the second node so that the source seeking device can adaptively seek the source.

[0049] The performance of the behavior tree depends on the design of the behaviors. To achieve adaptive source seeking, several nodes need to be defined. The design of the nodes usually requires determining the node name, node parameters, and designing the functions of the nodes. Combining Figures 1 - 4 as shown, the following gives the specific method for the design of the nodes of the robot's adaptive source seeking behavior tree.

[0050] Design of the first node

[0051] To achieve source seeking, it is necessary to estimate the source position and make a decision based on the posterior probability map. In addition, it is also necessary to use perception information such as wind direction to guide the search. Based on the above requirements, the functions and parameters of the Infotaxis conditional node and the upwind search conditional node are designed. Since both of these nodes perform utilization behaviors, the above two nodes are called utilization nodes. The following elaborates on these two nodes in detail:

[0052] Infotaxis conditional node: This node is an encapsulation of the standard Infotaxis algorithm. After the behavior tree calls this node, it will return "running", and then the robot executes the Infotaxis algorithm until the required number of steps is reached. If the required number of steps is reached, the node will return "success". To prevent the robot from lingering near the local optimum, a local optimum determination criterion is introduced: that is, when the number of times the robot reaches the same position is not less than a certain threshold N repeat , it is considered that the robot has fallen into the local optimum. Therefore, when the local optimum determination criterion is reached, the node will return "failure".

[0053] It can be understood that the threshold N repeat can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0054] Upwind Search Condition Node: This node is used to make the robot move against the wind direction. Once called, this node will return "running". If the wind speed at the current position is very weak, especially less than a certain threshold V min , this node will return "failed"; otherwise, it will return "success".

[0055] It can be understood that V min can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0056] Design of the Second Node

[0057] To prevent the behavior tree from over-relying on exploitation, it is necessary to introduce nodes that can perform exploration behaviors. Based on this requirement, the functions and parameters of the Wall-Around Condition Node and the Straight-Ahead Condition Node are designed. Since both of these nodes perform exploration behaviors, the above two nodes are called exploration nodes. The following details these two nodes:

[0058] Wall-Around Condition Node: This node is a wrapper for the Wall-Around algorithm and can implement a single-step execution of the Wall-Around algorithm. The basic principle of this algorithm is that when the distance between the robot and the nearest obstacle is lower than the threshold d min , the robot will move clockwise along the wall to avoid obstacles in the environment and explore more space. When this node is called, it will immediately return "running", and each execution of this node will always return "success".

[0059] It can be understood that d min can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0060] Straight-Ahead Condition Node: This node will move the robot in a straight line along the direction of the robot's previous behavior. Once called, it will return "running", and then the robot will perform a straight-line movement as required until it reaches the required number of steps N line . If the required steps are reached, this node will return "success"; if an obstacle is encountered, this node will return "failed".

[0061] It can be understood that N line can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0062] Design of the Switching Node

[0063] To solve the problem of the difficulty in balancing exploration and exploitation during the source search process of the robot, based on the design of the above exploration and exploitation nodes, the switching mechanism between exploration behavior and exploitation behavior is further designed. To achieve flexible switching, the triggering and aborting of exploration and exploitation should meet corresponding conditions, and the execution of either of the two behaviors should promote the invocation of the other behavior. Based on this idea, the switching node is set to include a posterior reset node, a Wall-Around step threshold node, a concentration threshold node, and a distance threshold node. The above nodes are described in detail below:

[0064] Posterior reset node: This node is used to reset the posterior probability map of the "Infotaxis" node to eliminate the influence of previous sampling information. When the robot falls into a local optimum due to the execution of the "Infotaxis" node, executing this node can reset the posterior probability map to a uniform distribution, thus preparing for the next exploitation. Each execution of this node will always return "success".

[0065] Wall-Around step threshold node: The execution of the "Wall-Around" node is to avoid obstacles and jump out of the local optimum at the same time. If the robot has already avoided the local optimum, it should not continue to explore. Therefore, this node defines the criterion for over-exploration, that is, to check the total number of steps in a single execution of the "Wall-Around" node. If the number of steps exceeds the threshold N step , it is considered over-exploration, and this node will return "success". To establish a connection between exploitation and exploration, on the premise of over-exploration, the algorithm should enter the next round of exploitation in a timely manner. The aborting of the previous round of exploitation is based on the "Infotaxis" node returning "failure". Therefore, after this node returns "success", the "failure" state of the "Infotaxis" node will be aborted to start a new round of exploitation. Conversely, if the number of steps does not exceed the threshold N step , it proves that the exploration is not sufficient, and this node will return "failure".

[0066] It can be understood that N step can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0067] Concentration threshold node: This node is used to query whether the current gas concentration is higher than the threshold c0. If it is higher than c0, this node will return "success", otherwise it will return "failure". This node helps to query whether the robot is in a local optimum and creates conditions for the invocation of exploration behavior.

[0068] It can be understood that c 0 can be used as a design parameter for further optimization in the synthesis and evolution of the behavior tree.

[0069] Distance Threshold Node: This node is used to query the distance from the current position to the nearest obstacle. If the distance between the robot and the nearest obstacle is less than the threshold d0, the node will return "Success"; otherwise, it will return "Failure". Since the "Wall-Around" node is only allowed to execute when the distance to the nearest obstacle is less than a certain threshold, this node helps to create conditions for the invocation of exploration behavior.

[0070] In some alternative implementation manners of this embodiment, for the convenience of the robot's movement, to reduce the time of the robot during the source search process, improve the source search efficiency, and reduce the pollution and damage caused by target substances such as poisonous gas, the robot preferably moves in any one of the four directions of forward, backward, left, and right. It can also move along the included angles of the four directions of forward, backward, left, and right.

[0071] It can be understood that d0 can be further optimized as a design parameter in the synthesis and evolution of the behavior tree.

[0072] Based on the behavior tree nodes designed above, it is necessary to further synthesize the behavior tree for the source search task and optimize the parameters in the node design. The present invention uses a genetic programming algorithm to synthesize and evolve an adaptive source search behavior tree. First, the behavior tree nodes designed above are placed in the terminal set and function set of genetic programming, and then a fitness function is designed. By executing genetic operators such as selection, crossover, and mutation, the optimal behavior tree individual is evolved and synthesized.

[0073] The specific steps are as follows:

[0074] Step S3: Use a genetic programming algorithm to synthesize and evolve an adaptive source search behavior tree to obtain an optimal behavior tree individual for adaptive source search.

[0075] Specifically, using a genetic programming algorithm to synthesize and evolve an adaptive source search behavior tree to obtain an optimal behavior tree individual for adaptive source search includes steps S51 - S54:

[0076] Step S51: Initialize the population to obtain initial behavior tree individuals;

[0077] Step S52: Use genetic operators to optimize the initial behavior tree individuals to obtain multiple generations of new populations;

[0078] Step S53: Use a fitness function to limit the new population so that the number of the new population is within a preset range;

[0079] Step S54: Place the root node, the first node, the second node, and the switching node of the adaptive source search behavior tree in the terminal set and function set of the genetic programming algorithm, and use the fitness function to evolve and synthesize the optimal behavior tree individual by executing genetic operators.

[0080] Specifically, in combination with Figures 5 - 6 as shown, the population initialization in step S51 initializes the population structure in Figure 5 to the structure shown in Figure 6 . This population initialization includes:

[0081] The key to population initialization is to synthesize the initial behavior tree individuals. The present invention proposes a method for initializing the behavior population by replacing random subtrees. First, design a random subtree generation algorithm, which can select different root node types and add N rand child nodes to it, where N rand is a random integer between 2 and N max . The first child node should be a conditional node, and the remaining child nodes should be action nodes. On this basis, according to this algorithm, synthesize two random subtrees with the root nodes being the fallback node and the sequence node respectively, denoted as . After that, as Figures 5 - 6 shown, use to replace the leftmost child node . This step makes the leftmost child node of the root node become a sequence node to prevent the root node from returning "success" prematurely by only calling a few nodes. After that, perform the loop replacement according to the following steps: First, generate a random subtree whose root node type is randomly selected. Randomly select an action node in and use to replace this action node. As long as 's maximum depth does not exceed D, keep looping, and loop at most λ - 1 times. Finally, output . Among them, D is the maximum depth of the behavior tree, and λ is the maximum number of replacements. Repeat the above method for synthesizing the initial behavior tree individuals N pop times, then N pop initial behavior trees can be generated to complete the population initialization.

[0082] Specifically, the genetic operators adopted in the embodiments of the present invention include crossover, mutation, and selection, where:

[0083] Crossover operator: Its input is several parent individuals to be crossed, and the output is the crossed offspring individuals. The probability of crossing of the parent individuals is P c . In each crossover operation, randomly select two individuals from the input parents for crossover and exchange. After crossover, two offspring individuals are generated. It is required that the parents who have participated in the crossover cannot participate in the next crossover again until all parents have completed the crossover, and return all the crossed offspring individuals.

[0084] Mutation operator: Its input is a number of parent individuals to be mutated, and the output is the mutated offspring individuals. The probability of a parent individual mutating is P m . The mutation operations include adding, deleting, and replacing behavior tree nodes, and let the probabilities of each operation be P m_a , P m_d , and P m_c . It is required that a parent individual can only complete one mutation until all parent individuals have completed mutation, and then return all the mutated offspring individuals.

[0085] Selection operator: After crossover and mutation are completed, first use elitist selection to retain a number of elite individuals P1 of the parent generation, and the selected proportion is f elite ; secondly, put P1 together with the offspring generated by crossover and mutation to form population P2, and perform elitist selection on P2 again to obtain population P3, and the selected proportion is still f elite ; to keep the population size N pop unchanged, calculate the difference number N pop between N sub and the number of individuals in P3, and then use the tournament selection method to select N sub individuals from the remaining individuals of P2.

[0086] The primary metric of concern in the source-seeking task is the time taken for the search; in addition, the size of the behavior tree is not allowed to grow indefinitely as the evolution progresses. Based on these factors, the fitness function is calculated using the following formula:

[0087]

[0088] where fitness represents the fitness function, τ represents the time consumed by the source-seeking device to find the target substance; τ tau_max represents the maximum simulation time set in the evolution, tau_max represents the longest simulation time in the simulation environment, tau represents the time when the robot finds the source in a certain simulation; δ tree_size represents the population range of the adaptive source-seeking behavior tree, which is used to limit the size of the adaptive source-seeking behavior tree, N th represents the threshold of the number of nodes of the adaptive source-seeking behavior tree. When the number of nodes of the adaptive source-seeking behavior tree is greater than N th , δ tree_size is equal to the number of nodes in the adaptive source-seeking behavior tree, otherwise δ tree_size is less than the number of nodes in the adaptive source-seeking behavior tree.

[0089] Since the evolution of the behavior tree is carried out in the simulation environment, the behavior tree evolved in the simulation environment can be deployed to the real environment for use.

[0090] The adaptive source-seeking method based on behavior tree of the present invention effectively combines the existing reactive source-seeking method and cognitive source-seeking method, complements their advantages, and enables a robot to efficiently seek a source in an indoor environment with obstacles. The following is a detailed description:

[0091] Set multiple nodes in the behavior tree, and set various algorithms on multiple different nodes, so that the behavior tree comprehensively has algorithms capable of coping with various different environments and the actions corresponding to the algorithms. Thus, different nodes can be called according to different environmental characteristics during the source-seeking process to solve problems under different environmental characteristics, thereby guiding the robot to adjust the search direction and search posture in real time until the target object is found.

[0092] By introducing a behavior tree, the typical reactive method and cognitive method are respectively encapsulated into nodes, and which node (method) to use is selected according to the actual situation during the source-seeking process. Advantage: In this way, the optimal method (reactive or cognitive) can be selected in real time according to the dynamic changes during the source-seeking process to generate the next action of the robot. That is to say, the present invention does not provide a method other than the reactive and cognitive methods, but provides a method framework that unifies the use of the two methods.

[0093] It should be noted that in the technical solution of the embodiment of the present invention, "utilization" is an action of guiding the robot's decision-making using local perception information such as gas concentration and wind direction; "exploration" is an action of the robot exploring the search space to obtain new perception information, and it does not use local perception information such as gas concentration and wind direction.

[0094] Therefore, the present invention proposes a robot adaptive source-seeking method based on a behavior tree, which can enable the robot to adaptively generate corresponding source-seeking action strategies according to perception information and achieve a balance between exploration and utilization.

[0095] As an example, in a turbulent environment, when using a robot to seek a source of poisonous gas, the upwind search condition node of the first node, the Wall-Around condition node in the second node, and the Wall-Around step threshold node and concentration threshold node in the switching node are called, so that the robot can find the source of poisonous gas in the turbulent environment by means of concentration and upwind search.

[0096] Therefore, the adaptive source-seeking method based on behavior tree of the present invention can not only achieve efficient source-seeking of a robot in an indoor environment with obstacles, but also achieve efficient source-seeking in a turbulent environment or a turbulent indoor environment with obstacles.

[0097] As another example, in an environment with weak wind, when using a robot to search for the source of poisonous gas, the upwind search condition node of the first node, the Wall-Around condition node in the second node, and the Wall-Around step threshold node and concentration threshold node in the switching node are called, enabling the robot to find the source of poisonous gas in a weak-wind environment through concentration and upwind search methods.

[0098] As yet another example, in an environment with obstacles, when using a robot to search for the source of poisonous gas, the Infotaxis condition node of the first node, the Wall-Around condition node and the straight-line condition node in the second node, the posterior reset node, the Wall-Around step threshold node and the distance threshold node in the switching node are called, enabling the robot to find the source of poisonous gas in a weak-wind environment through concentration and upwind search methods.

[0099] As yet another example, in a turbulent environment with weak indoor wind and obstacles, the first node, the second node and the switching node are all called, enabling the robot to find the source of poisonous gas in a turbulent environment with weak indoor wind and obstacles.

[0100] Thus, the adaptive source search method based on a behavior tree of the present invention can not only achieve efficient source search by the robot in an indoor environment with obstacles, but also achieve efficient source search in an environment with weak wind or in an indoor environment with weak wind and obstacles.

[0101] In summary, the adaptive source search method based on a behavior tree of the present invention can effectively combine the reactive source search method and the cognitive source search method in the prior art, complement the advantages of both, and can singly or simultaneously achieve efficient source search by the robot in an indoor environment with obstacles, in a turbulent environment, in a turbulent indoor environment with obstacles, in an environment with weak wind, or in an indoor environment with weak wind and obstacles.

[0102] It should be noted that in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or also includes elements inherent to such process, method, article or device. In addition, "front", "rear", "left", "right", "upper" and "lower" in this article are referenced based on the placement state shown in the drawings.

[0103] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than limiting it; although the present invention has been described in detail with reference to the foregoing embodiments, those of ordinary skill in the art should understand that they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features; and these modifications or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. An adaptive source seeking method based on a behavior tree, characterized in that, Including: Obtain a sourcing task, where the sourcing task includes any target substance that the sourcing device wants to search for; According to the predefined action priority levels in the sourcing task, construct an adaptive sourcing behavior tree. The adaptive sourcing behavior tree includes a root node, a first node, a second node, and a switching node. Among them, the sourcing task is used as the root node of the adaptive sourcing behavior tree, and the first node, the second node, and the switching node are used as the control nodes of the adaptive sourcing behavior tree. The first node is used for the behavior of guiding the sourcing device's decision-making using environmental information. The second node is used for the behavior of exploring the search space for the sourcing device to obtain new sensing information. The switching node is used to switch between the first node and the second node to enable the sourcing device to adaptively source; Adopt a genetic programming algorithm to synthesize and evolve the adaptive sourcing behavior tree to obtain the optimal behavior tree individual for adaptive sourcing.

2. The adaptive source seeking method based on behavior tree according to claim 1, wherein The first node includes an Infotaxis condition node and a headwind search condition node, where: The Infotaxis condition node includes an encapsulation of the standard Infotaxis algorithm. After the adaptive sourcing behavior tree calls the Infotaxis condition node, the Infotaxis condition node returns "running". Subsequently, the sourcing device executes the Infotaxis algorithm until the sourcing device reaches the required number of steps. If the required number of steps is reached, the Infotaxis condition node will return "success". If the number of times the sourcing device reaches the same position is greater than or equal to the preset threshold, the Infotaxis condition node will return "failure"; The headwind search condition node is used to make the sourcing device move along the headwind direction. After the adaptive sourcing behavior tree calls the headwind search condition node, the headwind search condition node will return "running". If the current wind speed is less than the preset threshold, the headwind search condition node will return "failure". Otherwise, the headwind search condition node will return "success".

3. The adaptive source finding method based on behavior tree according to claim 2, wherein The second node includes a Wall-Around condition node and a straight-ahead condition node, where: The Wall-Around condition node includes an encapsulation of the Wall-Around algorithm and is used to implement a single-step execution of the Wall-Around algorithm. When the distance between the sourcing device and the nearest obstacle is lower than the preset threshold, the sourcing device will move along the preset route to avoid obstacles in the environment and explore more space. When the Wall-Around condition node is called by the adaptive sourcing behavior tree, the Wall-Around condition node will immediately return "running", and each execution of the Wall-Around condition node will always return "success"; The straight-line condition node is used to move in a straight line along the movement direction of the previous action of the source-seeking device. After being called by the adaptive source-seeking behavior tree, the straight-line condition node will return "running", and then the source-seeking device will perform straight-line movement according to preset requirements until the required number of steps is reached. When the required number of steps is reached, the straight-line condition node will return "success"; when the source-seeking device encounters an obstacle, the straight-line condition node will return "failure".

4. The adaptive source seeking method based on a behavior tree according to claim 3, wherein The switching node includes a posterior reset node, a Wall-Around step threshold node, a concentration threshold node, and a distance threshold node, where: The posterior reset node is used to reset the posterior probability map of the Infotaxis condition node. When the source-seeking device falls into a local optimum due to executing the Infotaxis condition node, executing the posterior reset node can reset the posterior probability map to a uniform distribution, and each execution of the posterior reset node will always return "success"; The Wall-Around step threshold node is used to execute the Wall-Around condition node to enable the source-seeking device to avoid obstacles and jump out of the local optimum. At the same time, it checks the total number of steps for a single execution of the Wall-Around condition node. If the number of steps exceeds the preset threshold, the Wall-Around step threshold node will return "success"; if the number of steps does not exceed the preset threshold, the Wall-Around step threshold node will return "failure"; The concentration threshold node is used to detect whether the current gas concentration is higher than the threshold. If the current gas concentration is higher than the preset threshold, the concentration threshold node will return "success", otherwise it will return "failure"; The distance threshold node is used to detect the distance from the current position of the source-seeking device to the nearest obstacle. If the distance from the source-seeking device to the nearest obstacle is less than the preset threshold, the distance threshold node will return "success", otherwise it will return "failure".

5. The adaptive source seeking method based on a behavior tree according to claim 1, wherein, Using a genetic programming algorithm to synthesize and evolve the adaptive source-seeking behavior tree to obtain the optimal behavior tree individual for adaptive source-seeking includes: Initializing the population to obtain the initial behavior tree individuals; Using genetic operators to optimize the initial behavior tree individuals to obtain multiple generations of new populations; Using a fitness function to limit the new population so that the number of the new population is within a preset range; Putting the root node, the first node, the second node, and the switching node of the adaptive source-seeking behavior tree into the terminal set and function set of the genetic programming algorithm, and using the fitness function to evolve and synthesize the optimal behavior tree individual by executing the genetic operators.

6. The adaptive source seeking method based on a behavior tree according to claim 5, wherein Population initialization includes: Design a random subtree generation algorithm that can select different root node types and add N child nodes to the initial behavior tree individual. The first child node is a conditional node, and the remaining child nodes are action nodes. Synthesize two random subtrees with root nodes being fallback nodes and sequence nodes respectively according to the random subtree generation algorithm, denoted as Use to replace the leftmost child node to make the leftmost child node of the root node become a sequence node to prevent the root node from returning "success" prematurely by only calling a few nodes. Subsequently, generate a random subtree The random subtree The type of the root node is randomly selected. Randomly select an action node from and use to replace the randomly selected action node from If the maximum depth of does not exceed D, then keep looping, looping at most λ - 1 times, and finally output rand where N max represents a random integer between 2 and N pop D represents the maximum depth of the behavior tree, and λ represents the maximum replacement times. Repeat the above method for synthesizing the initial behavior tree individual N pop times, then N tau_max initial behavior trees can be generated to complete the population initialization.

7. The adaptive source seeking method based on a behavior tree according to claim 5, wherein Genetic operator design includes: a crossover operator, a mutation operator, and a selection operator.

8. The adaptive source seeking method based on a behavior tree according to claim 5, wherein The fitness function is calculated using the following formula: Among them, fitness represents the fitness function, and τ represents the time consumed by the source-seeking device to find the target substance; τ tau_max represents the maximum simulation time set in the evolution, tau_max represents the longest simulation time in the simulation environment, and tau represents the time when the robot finds the source in a certain simulation; δ tree_size represents the population range of the adaptive source-seeking behavior tree, which is used to limit the size of the adaptive source-seeking behavior tree, N th represents the threshold of the number of nodes of the adaptive source-seeking behavior tree. When the number of nodes of the adaptive source-seeking behavior tree is greater than N th then, δ tree_size is equal to the number of nodes in the adaptive source-seeking behavior tree; otherwise, δ tree_size is less than the number of nodes in the adaptive source-seeking behavior tree.