Intelligent agent path planning method and device, electronic equipment and storage medium
By acquiring map data and forming a first low-level focus set, the initial path is planned for each agent and adjusted to avoid conflicts, the problem of empty focus list in the middle and low-level search in the prior art is solved, and the efficiency and accuracy of path planning are improved.
Patent Information
- Application Number
- CN202411971862.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-30
- Publication Date
- 2025-04-11
Smart Images

Figure CN119803503A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to an intelligent agent path planning method, device, electronic device and storage medium. Background Art
[0002] Multi-Agent Path Finding (MAPF) is the problem of planning conflict-free paths for multiple agents.
[0003] At present, the low-level A-star algorithm or the low-level search algorithm can be used in combination with the focused search algorithm to search for nodes at the low level, so as to find the paths of each intelligent agent at the low level, and then adjust the conflicting paths between the intelligent agents at the high level to obtain the target path without conflicts between the intelligent agents.
[0004] However, the above method may result in the focus list being empty in the low-level search, and the agent's path may not be found, requiring re-path planning, which reduces the efficiency of path planning. Summary of the invention
[0005] The embodiments of the present application provide an intelligent agent path planning method, apparatus, device and computer storage medium, which can avoid the situation where the focus list is empty in low-level searches.
[0006] In a first aspect, an embodiment of the present application provides an intelligent agent path planning method, the method comprising:
[0007] Acquire map data; wherein the map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents;
[0008] For each of the agents, a first position node is obtained from a first low-level open set to obtain a first low-level focus set, wherein the first low-level open set includes a plurality of starting position nodes corresponding to the agents, wherein the first position node is a position node whose low-level focus threshold of the agent is greater than or equal to a first distance of the agent, wherein the first distance of the agent is a distance from the starting position node corresponding to the agent to a target position node in the map data;
[0009] Based on the plurality of location nodes and the first low-level focus set, respectively planning an initial path for each of the agents from a corresponding starting location node to a corresponding target location node;
[0010] Determine whether there is a conflict between the initial paths of the agents, and obtain a conflict result;
[0011] If the conflict result indicates that there is no conflict between the initial paths of each of the agents, determining the initial path of each of the agents as the corresponding target path;
[0012] If the conflict result indicates that there is a conflict between the initial paths of each of the agents, the initial path of each of the agents is adjusted to obtain the target path corresponding to each of the agents, and there is no conflict between the target paths corresponding to each of the agents.
[0013] In some embodiments, before obtaining the first position node from the first lower-level open set to obtain the first lower-level focus set, the method further includes:
[0014] Obtaining target parameters, the target parameters including a preset bounded suboptimal constant, a lower limit of the path cost of each of the agents at each location node in the first low-level open set, and a path cost of each of the agents;
[0015] Determine, according to the target parameter, the width of the agent corresponding to each position node in the first low-level open set;
[0016] For each location node in the first low-level open set, the low-level focusing threshold of the agent at the location node is determined based on the minimum first distance, the bounded suboptimal constant, the relaxation width of the agent at the location node, and the lower limit of the path cost of the agent in the location node where there is a conflict, and the minimum first distance is the minimum value of the first distances corresponding to multiple agents.
[0017] In some embodiments, before respectively planning the initial path of each of the agents from the corresponding starting location node to the corresponding target location node based on the plurality of location nodes and the first low-level focus set, the method includes:
[0018] For each of the intelligent agents, obtain the number of vertices corresponding to each position node of the intelligent agent in the first low-level focus set, where the number of vertices corresponding to the position node is the number of times the path of the intelligent agent passes through the corresponding position node;
[0019] The step of planning an initial path for each of the agents from a corresponding starting location node to a corresponding target location node based on the plurality of location nodes and the first low-level focus set comprises:
[0020] For each of the agents, if there is a second position node in the first low-level focus set, the second position node is deleted from the first low-level focus set to obtain a second low-level focus set, where the second position node is a position node whose number of vertices of the agent is less than or equal to the low-level focus threshold of the agent;
[0021] If the path planning conditions are met according to the second low-level focus set and the multiple position nodes, a backtracking algorithm is used to solve the initial path of each of the intelligent agents from the second low-level focus set.
[0022] In some embodiments, the above-mentioned determining whether there is a conflict between the initial paths of the agents and obtaining the conflict result includes:
[0023] Calculating the path cost of the initial path of each of the intelligent agents respectively;
[0024] Dividing the initial paths of the agents to obtain at least one path set; the path set includes at least one initial path corresponding to each agent, and different path sets in the at least one path set include different initial paths;
[0025] Acquire a first path set in a first high-level open set to obtain a first high-level focus set, wherein the first high-level open set includes the at least one path set, the first path set is a path set whose corresponding total path cost is less than or equal to a target value, the total path cost is the sum of the path costs of each of the intelligent agents in the corresponding path set, and the target value is the product of the minimum total path cost in the total path costs corresponding to each of the path sets in the first high-level open set and a bounded suboptimal constant;
[0026] Acquire a second path set with the minimum number of conflicts from the first high-level focus set;
[0027] If there is a conflict between the initial paths in the second path set, determining that a conflict result indicates that there is a conflict between the initial paths of each of the agents;
[0028] If there is no conflict between the initial paths in the second path set, determining the conflict result indicates that there is no conflict between the initial paths of each of the agents.
[0029] In some embodiments, before determining whether there is a conflict between the initial paths of the agents and obtaining the conflict result, the method further includes:
[0030] For each of the agents, if there is a third position node in the first low-level focus set, the third position node is deleted from the first low-level open set to obtain a second low-level open set, and the third position node is a position node whose vertex number of the agent is greater than the low-level focus threshold of the agent;
[0031] The adjusting the initial path of each of the agents to obtain the target path corresponding to each of the agents includes:
[0032] Generate a root node of a constraint tree according to the second path set;
[0033] Expanding at least two child nodes of the root node, and adding a target constraint to the at least two child nodes, wherein the target constraint includes at least one of an edge constraint and a vertex constraint;
[0034] Putting the at least two subnodes into the first high-level open set to obtain a second high-level open set;
[0035] Based on the second high-level open set and the second low-level open set, a target path corresponding to each of the intelligent agents is obtained.
[0036] In some embodiments, obtaining the target path corresponding to each of the agents based on the second high-level open set and the second low-level open set includes:
[0037] Take the second low-level open set as the first low-level open set, the second low-level focus set as the first low-level focus set, the second high-level focus set as the first high-level focus set and the second high-level open set as the first high-level open set, and return to execute the step of obtaining the first position node from the first low-level open set for each of the intelligent agents to obtain the first low-level focus set.
[0038] In a second aspect, an embodiment of the present application provides an intelligent agent path planning device, the device comprising:
[0039] A data acquisition module, used to acquire map data; wherein the map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents;
[0040] A set acquisition module is used to acquire a first position node from a first low-level open set for each of the agents to obtain a first low-level focus set, wherein the first low-level open set includes a plurality of starting position nodes corresponding to the agents, wherein the first position node is a position node whose low-level focus threshold of the agent is greater than or equal to a first distance of the agent, wherein the first distance of the agent is a distance from the starting position node corresponding to the agent to a target position node in the map data;
[0041] A path planning module, configured to plan an initial path for each of the agents from a corresponding starting position node to a corresponding target position node based on a plurality of position nodes and the first low-level focus set;
[0042] A path determination module, configured to determine the initial path of each of the agents as the corresponding target path if there is no conflict between the initial paths of each of the agents;
[0043] The path adjustment module is used to adjust the initial path of each of the intelligent agents if there is a conflict between the initial paths of each of the intelligent agents, so as to obtain the target path corresponding to each of the intelligent agents, and there is no conflict between the target paths corresponding to each of the intelligent agents.
[0044] In a third aspect, an embodiment of the present application provides an electronic device, the device comprising: a processor and a memory storing computer program instructions;
[0045] When the processor executes the computer program instructions, it implements the intelligent agent path planning method as described in the first aspect.
[0046] In a fourth aspect, an embodiment of the present application provides a computer storage medium, on which computer program instructions are stored. When the computer program instructions are executed by a processor, the intelligent agent path planning method described in the first aspect is implemented.
[0047] In a fifth aspect, an embodiment of the present application provides a computer program product. When the instructions in the computer program product are executed by a processor of an electronic device, the electronic device executes the intelligent agent path planning method as described in the first aspect.
[0048] The agent path planning method, device, electronic device and computer storage medium of the embodiment of the present application, first, for each agent, obtain the first position node from the first low-level open set to obtain the first low-level focus set, the first low-level open set contains the starting position nodes corresponding to multiple agents, the first position node is the position node whose low-level focus threshold of the agent is greater than or equal to the first distance of the agent, the first distance of the agent is the distance from the starting position node corresponding to the agent to the target position node in the map data, based on the multiple position nodes and the first low-level focus set, plan the initial path of each agent from the corresponding starting position node to the corresponding target position node. If there is no conflict between the initial paths of each agent, the initial path of each agent is determined as the corresponding target path, if there is a conflict between the initial paths of each agent, the initial path of each agent is adjusted to obtain the target path corresponding to each agent. The present application can determine at least one first position node from the first low-level open set and put it into the first low-level focus set, which can ensure that the first low-level focus set will not be empty, thereby ensuring that the initial path of each intelligent agent can be found through the first low-level focus set search, and then the initial paths of each intelligent agent can be coordinated to generate a conflict-free target path between each intelligent agent. In this way, the need to re-plan the path when the first low-level focus set is empty can be avoided, so as to improve the efficiency of determining the target path of each intelligent agent. BRIEF DESCRIPTION OF THE DRAWINGS
[0049] In order to more clearly illustrate the technical solution of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0050] Figure 1 It is a flowchart of an intelligent agent path planning method provided by an embodiment of the present application;
[0051] Figure 2 This is a complete flow chart of the steps of an intelligent agent path planning method provided by an embodiment of the present application;
[0052] Figure 3 is a structural diagram of an intelligent agent path planning device provided by another embodiment of the present application;
[0053] Figure 4 It is a structural schematic diagram of an electronic device provided in yet another embodiment of the present application. DETAILED DESCRIPTION
[0054] The features and exemplary embodiments of various aspects of the present application will be described in detail below. In order to make the purpose, technical solutions and advantages of the present application clearer, the present application will be further described in detail below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only intended to explain the present application, rather than to limit the present application. For those skilled in the art, the present application can be implemented without the need for some of these specific details. The following description of the embodiments is only to provide a better understanding of the present application by illustrating the examples of the present application.
[0055] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "include..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0056] In order to solve the problems of the prior art, the embodiments of the present application provide an intelligent agent path planning method, device, equipment, computer storage medium and computer program product. The intelligent agent path planning method provided by the embodiments of the present application is first introduced below.
[0057] Figure 1 FIG. 1 is a flow chart of a method for intelligent agent path planning provided by an embodiment of the present application. Figure 1 As shown, the agent path planning method may include but is not limited to the following steps S101 to S106:
[0058] Step S101, obtaining map data.
[0059] Step S102: for each agent, obtain the first position node from the first low-level open set to obtain the first low-level focus set.
[0060] Step S103, based on the multiple location nodes and the first low-level focus set, respectively plan the initial path of each agent from the corresponding starting location node to the corresponding target location node.
[0061] Step S104, determining whether there is a conflict between the initial paths of the various agents, and obtaining a conflict result.
[0062] Step S105: If the conflict result indicates that there is no conflict between the initial paths of each agent, the initial path of each agent is determined as the corresponding target path.
[0063] Step S106: If the conflict result indicates that there is a conflict between the initial paths of each agent, the initial path of each agent is adjusted to obtain the target path corresponding to each agent.
[0064] The above-mentioned map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents.
[0065] In step S101 of some embodiments, the map is a map for planning the paths of each agent, and the map may be a grid map, where each grid in the map represents a location node, and each location node may carry corresponding location information on the map. Each agent corresponds to a starting location node and a target location node.
[0066] The above-mentioned low-level focus threshold can be understood as a value used to measure whether the location node can be placed in the first low-level focus set, wherein the low-level focus threshold can be used to compare with the first distance (f value) of the intelligent agent to measure whether the location node can be placed in the first low-level focus set.
[0067] The above-mentioned first low-level opening set includes starting position nodes corresponding to multiple intelligent agents, and the above-mentioned first position node is a position node whose low-level focusing threshold of the intelligent agent is greater than or equal to the first distance of the intelligent agent. The above-mentioned first distance of the intelligent agent is the distance from the starting position node corresponding to the intelligent agent to the target position node in the map data.
[0068] In step S102 of some embodiments, for each agent, the agent has a corresponding low-level focus threshold in each position node in the first low-level open set. For example, the multiple agents whose paths are to be planned include agent A, agent B, and agent C, and the position nodes included in the first low-level open set include starting position node A, starting position node B, and starting position node C. Then, the low-level focus threshold of agent A in starting position node A is low-level focus threshold A1, the low-level focus threshold of agent A in starting position node B is low-level focus threshold A2, and the low-level focus threshold of agent A in starting position node C is low-level focus threshold A3. The low-level focus threshold in point C is the low-level focus threshold A3, the low-level focus threshold of agent B in the starting position node A is the low-level focus threshold B1, the low-level focus threshold of agent B in the starting position node B is the low-level focus threshold B2, the low-level focus threshold of agent A in the starting position node C is the low-level focus threshold B3, the low-level focus threshold of agent C in the starting position node A is the low-level focus threshold C1, the low-level focus threshold of agent C in the starting position node B is the low-level focus threshold C2, and the low-level focus threshold of agent C in the starting position node C is the low-level focus threshold C3.
[0069] In some embodiments, for each agent, if the low-level focusing threshold of the agent in the position node is greater than or equal to the first distance of the agent, the position node is determined as the first position node. For example, the multiple agents whose paths are to be planned include agent A, agent B, and agent C, and the position nodes included in the first low-level opening set include starting position node A, starting position node B, and starting position node C. The first distances of agent A, agent B, and agent C are first distance A, first distance B, and first distance C, respectively. Taking agent A as an example, if the low-level focusing threshold of agent A in starting position node A is low-level focusing threshold A1, the low-level focusing threshold of agent A in starting position node B is low-level focusing threshold A2, and the low-level focusing threshold of agent A in starting position node C is low-level focusing threshold A3, and the low-level focusing thresholds A1 and A2 are greater than the first distance A of agent A, then the low-level focusing thresholds A1 and A2 are the first position nodes.
[0070] In step S103 of some embodiments, at least one initial path may be planned for each agent.
[0071] In one embodiment, the above-mentioned steps S102-S103 can be implemented by performing low-level search through focus search and A* search, wherein the first low-level open set can be a low-level initialized open list (OPEN list), and the first low-level focus set can be a low-level focus list (FOCAL list).
[0072] In one embodiment, a vertex number limit L is definedi (N) is:
[0073] L i (N) = r·η i (N′)
[0074] Among them, L i (N) represents the limit value of the number of vertices of the agent ai in the position node N, η i (N′) is the number of vertices of the agent ai in the conflicting position node N′, r ≥ 1, and r is a preset constant.
[0075] If there is φ i (N)≤L i (N), then steps S102-S103 are implemented using a focused search algorithm or an A* search algorithm. If φ i (N)>L i (N), then steps S102 to S103 are implemented using the A* search algorithm.
[0076] In step S104 of some embodiments, if multiple agents step into the same position node at the same time step (which can be understood as moment), there is a vertex conflict between the initial paths of the multiple agents; if for the first agent and the second agent, at the same time step, the first agent steps from its position node to the position node where the second agent is located, and the second agent steps from its position node to the position node where the first agent is located, there is an edge conflict between the initial paths of the multiple agents.
[0077] There is no conflict between the target paths corresponding to each of the intelligent agents.
[0078] In step S105 of some embodiments, if the conflict result indicates that there is no conflict between the initial paths of each agent, a conflict-free initial path is obtained, and the initial path of each agent is directly determined as the corresponding target path.
[0079] In step S106 of some embodiments, if the conflict result indicates that there is a conflict between the initial paths of each agent, the initial path of each agent needs to be adjusted to obtain the target path corresponding to each agent.
[0080] In some embodiments, the present application also provides a method for calculating the low-level focus threshold of an agent in a location node, referring to the following formula:
[0081]
[0082] Among them, T i (N) is the low-level focusing threshold of the ith agent ai in the position node N, ω is the bounded suboptimal constant, fmin,i (N) is the minimum first distance, and the above minimum distance is the minimum value of the first distances corresponding to all agents, lb i )N′) is the lower limit of the path cost of the ith agent ai in the conflicting location node N′, is the width of the i-th agent ai at position node N.
[0083] Among them, the present application also provides a method for calculating the width of the intelligent agent at the position node, referring to the following formula:
[0084]
[0085] in, is the width of the ith agent ai at position node N, ω is the bounded suboptimal constant, k is the number of agents, lb m (N) is the lower limit of the path cost of the mth agent am in the location node N, C m (N) is the path cost of the mth agent am in location node N.
[0086] It should be noted that the path cost can be understood as the number of steps the agent moves from the starting position node to the target position node. Therefore, for a path of the agent, the path cost is fixed. Therefore, for a path of the agent, the path cost of the i-th agent ai in each position node is the same.
[0087] In some embodiments, before the above step S102, the following steps may also be included but not limited to:
[0088] Get the target parameters.
[0089] The above-mentioned target parameters include a preset bounded suboptimal constant, a lower limit of the path cost of each agent at each position node in the first low-level opening set, and the path cost of each agent.
[0090] In this embodiment, the target parameters can be initialized, and the bounded suboptimal constant is preset. Since the path of the agent has not been planned at this time, the path cost and the lower limit of the path cost of each agent can be set to 0.
[0091] According to the target parameters, the width corresponding to each position node in the first low-level opening set of the intelligent agent is determined.
[0092] In this embodiment, according to the target parameters, the expansion width corresponding to each position node of the agent in the first low-level open set is calculated according to the following formula:
[0093]
[0094] Since the path cost and the lower limit of the path cost of each agent are both 0 at this time, the width corresponding to each position node in the first low-level opening set of the agent is 0 at this time.
[0095] For each location node in the first low-level open set, the low-level focusing threshold of the agent at the location node is determined based on the minimum first distance, the bounded suboptimal constant, the agent's relaxation width at the location node, and the lower limit of the agent's path cost in the location node where there is a conflict.
[0096] In this embodiment, the low-level focusing threshold of the agent at each position node is calculated according to the following formula:
[0097]
[0098] In this embodiment, the lower limit value of the path cost of the agent in the location node where there is a conflict is also initialized. Since the path of the agent has not been planned, the lower limit value of the path cost of the agent in the location node where there is a conflict is set to 0. Therefore, it can be inferred that:
[0099] T i (N) = ω·f min,i (N)
[0100] In this embodiment, ω≥1, so there must be T i (N)≥f min,i (N), at least one first position node will be obtained. Through the above method, it can be achieved that there must be a first position node in the first low-level focus set, thereby ensuring that the low-level search can find the intelligent agent a i The initial path.
[0101] In some embodiments, before the above step S103, the following steps may also be included but not limited to:
[0102] For each agent, obtain the number of vertices corresponding to each position node of the agent in the first low-level focus set.
[0103] The number of vertices corresponding to the above position nodes is the number of times the agent's path passes through the position nodes.
[0104] For example, the path of agent A is: location node A-location node B-location node C-location node B-location node D, then the number of vertices of the agent at location node B is 2.
[0105] Since the path has not been planned yet, the top number is initialized to 0.
[0106] In some embodiments, the above step S103 may also include but is not limited to the following steps:
[0107] For each agent, if there is a second position node in the first low-level focus set, the second position node is deleted from the first low-level focus set to obtain a second low-level focus set.
[0108] The second position node is a position node where the number of vertices of the agent is less than or equal to the low-level focusing threshold of the agent.
[0109] In this embodiment, if the number of vertices ηi(N) of the agent ai in the position node N is less than or equal to the low-level focus threshold Ti(N) of the agent in the position node, that is, ηi(N)≤Ti(N), then the position node is determined as the second position node.
[0110] For example, the first low-level focus set includes position node A and position node B. For agent A, the number of vertices of agent A at position node A is 2, and the number of vertices of agent A at position node B is 3. Among them, the low-level focus threshold of the agent at position node A is 3, and the low-level focus threshold of the agent at position node B is 4, then position node A is the second position node.
[0111] In this embodiment, since the number of vertices corresponding to each position node of the intelligent agent in the first low-level focus set is 0 at this time, the number of vertices corresponding to each position node of the intelligent agent in the first low-level focus set is less than the low-level focus threshold of the intelligent agent at the corresponding position node. Therefore, at this time, the position nodes in the first low-level focus set are all second position nodes.
[0112] If the path planning conditions are met according to the second lower-level focus set and multiple position nodes, the initial path of each intelligent agent is solved from the second lower-level focus set using a backtracking algorithm.
[0113] In this embodiment, it is determined whether a path can be successfully planned based on the second low-level focus set and multiple position nodes. If the path can be successfully planned, the initial path of each agent is solved from the second low-level focus set using a backtracking algorithm. In one embodiment, the path planning condition can be that the agent can move from the starting position node to the target position node without encountering obstacles.
[0114] In some embodiments, the above step S104 may also include but is not limited to the following steps:
[0115] The initial paths of the agents are divided to obtain at least one path set.
[0116] The above-mentioned path set includes at least one initial path corresponding to each intelligent agent, and different path sets in at least one path set include different initial paths.
[0117] In one embodiment, each path set includes an initial path of each agent, and the initial paths included in each path set do not completely overlap.
[0118] For example, the multiple agents include agent A and agent B, the initial path of agent A includes initial path A1, and the initial path of agent B includes initial path B1 and initial path B2, then the multiple initial paths corresponding to each agent are divided to obtain two path sets, path set 1 includes initial path A1 and initial path B1, and path set 2 includes initial path A1 and initial path B2.
[0119] Calculate the path cost of each agent's initial path separately.
[0120] Calculate the path cost of each initial path for each agent.
[0121] The first path set in the first high-level open set is obtained to obtain the first high-level focus set.
[0122] The above-mentioned first high-level open set includes at least one path set, the above-mentioned first path set is a path set whose corresponding total path cost is less than or equal to the target value, the above-mentioned total path cost LL is the sum of the path costs of each intelligent agent in the corresponding path set, the target value is the product of the minimum total path cost and the bounded suboptimal constant, and the above-mentioned minimum total path cost is the minimum value of the total path costs corresponding to each path set in the first high-level open set.
[0123] In this embodiment, the product of the minimum total path cost and the bounded suboptimal constant is calculated to obtain a target value, and for each path set in the first high-level open set, the total path cost of the path set is obtained. If the total path cost of the path set is less than or equal to the target value, the path set is determined as the first path set.
[0124] For example, the first high-level opening set includes path set 1 and path set 2, path set 1 includes the initial path A1 of agent a1 and the initial path B1 of agent a2, path set 2 includes the initial path A1 of agent a1 and the initial path B2 of agent a2, where the sum of the path cost of the initial path A1 of agent a1 and the path cost of the initial path B1 of agent a2 is 12, and the sum of the path cost of the initial path A1 of agent a1 and the path cost of the initial path B2 of agent a2 is 10, so the minimum total path cost is 10, where the bounded suboptimal constant ω is 1.1, then the target value is 11, 10<11, 12>11, then path set 2 is the first path set.
[0125] A second path set with the minimum number of conflicts is obtained from the first high-level focus set.
[0126] The above number of conflicts can be understood as the number of times multiple agents appear at the same position in the same time step in the corresponding path set. For example, in the second step, agent a1 and agent a2 are both at position node 1, and in the fifth step, agent a1 and agent a2 are both at position node 6, so the number of conflicts is two.
[0127] A path set with the smallest number of conflicts is determined as the second path set.
[0128] In this embodiment, the number of conflicts of each path set in the first high-level focus set is identified, and the path set with the smallest number of conflicts is determined as the second path set.
[0129] If there are conflicts between the initial paths in the second path set, then determining the conflict result indicates that there are conflicts between the initial paths of each agent.
[0130] If there is no conflict between the initial paths in the second path set, then determining the conflict result indicates that there is no conflict between the initial paths of each agent.
[0131] If there is no conflict among the initial paths in the second path set, each initial path in the second path set can be determined as the target path of the corresponding intelligent agent, and the target path is output.
[0132] Since the path set with the smallest number of conflicts is most likely to be the target path set containing the conflict-free path, in this embodiment, the second path set with the smallest number of conflicts is preferentially obtained for processing, which can improve the efficiency of path search.
[0133] In some embodiments, before the above step S103, the following steps may also be included but not limited to:
[0134] For each agent, if there is a third position node in the first low-level focus set, the third position node is deleted from the first low-level open set to obtain a second low-level open set.
[0135] The third position node is a position node where the number of vertices of the agent is greater than the low-level focusing threshold of the agent.
[0136] In this embodiment, if the number of vertices ηi(N) of the agent ai in the position node N is greater than the low-level focus threshold Ti(N) of the agent in the position node, that is, ηi(N)>Ti(N), then the position node is determined as the third position node.
[0137] For example, the first low-level focus set includes position node A and position node B. For agent A, the number of vertices of agent A at position node A is 2, and the number of vertices of agent A at position node B is 3. Among them, the low-level focus threshold of the agent at position node A is 3, and the low-level focus threshold of the agent at position node B is 4, then position node B is the third position node.
[0138] In some embodiments, the above step S106 may also include but is not limited to the following steps:
[0139] A root node of the constraint tree is generated according to the second path set.
[0140] Expand at least two child nodes of the root node, and add target constraints to at least two child nodes.
[0141] The above target constraint includes at least one of an edge constraint and a vertex constraint. The vertex constraint is that in the same time step, multiple agents cannot enter the same position node at the same time. The edge constraint is that for the first agent and the second agent, the first agent cannot enter the position node where the second agent is located from the position node where the first agent is located at the same time. If the second path set only has vertex conflicts, the target constraint is the vertex constraint. If the second path set only has edge conflicts, the target constraint is the edge conflict. If the second path set has vertex conflicts and edge conflicts, the target constraint includes edge constraints and vertex constraints.
[0142] In this embodiment, two child nodes are expanded for the root node, and a target constraint is added to resolve the conflict. If the parent node has a constraint, the child node also needs to inherit the constraint of the parent node. In one embodiment, the child node can be expanded in a major conflict, semi-major conflict, non-major conflict or bypass manner, wherein the major conflict expansion child node is preferred, followed by bypass expansion child node. A major conflict is when the total path cost of the expanded child nodes is greater than the total path cost of the root node. For example, assuming that the total path cost of the root node N where the conflict occurs is 6, then in order to resolve this conflict, the major conflict is selected to split two child nodes N1 and N2, and the total path costs of N1 and N2 are both greater than 6. A semi-major conflict is when the expanded child nodes have both child nodes with a total path cost greater than the root node and child nodes with a total path cost equal to the root node. For example, assuming that the total path cost of the root node N where the conflict occurs is 6, the semi-major conflict is selected to split two child nodes N1 and N2, and the total path costs of N1 and N2 are one greater than 6 and the other equal to 6. A non-major conflict is when the total path cost of the expanded child nodes is equal to the total path cost of the root node. For example, assuming that the total path cost of the root node N where the conflict occurs is 6, the non-major conflict is selected to split two child nodes N1 and N2, and the total path costs of N1 and N2 are both equal to 6. A bypass is when the expanded child nodes do not include the conflicting location node, that is, bypass the conflicting location node.
[0143] At least two child nodes are placed into a first high-level open set to obtain a second high-level open set.
[0144] Based on the second high-level opening set and the second low-level opening set, the target path corresponding to each agent is obtained.
[0145] In this embodiment, the first high-level open set may be an open list in the high-level, the first high-level focus set may be a focus list in the high-level, and the path set may be a node (CT node) on a constraint tree in the high-level.
[0146] In some embodiments, the step of obtaining the target path corresponding to each agent based on the second high-level open set and the second low-level open set may also include but is not limited to the following steps:
[0147] Take the second low-level open set as the first low-level open set, the second low-level focus set as the first low-level focus set, the second high-level focus set as the first high-level focus set, and the second high-level open set as the first high-level open set, and return to execute for each intelligent agent, obtain the first position node from the first low-level open set, and obtain the step of the first low-level focus set.
[0148] In this embodiment, the second low-level opening set is used as the first low-level opening set, the second low-level focus set is used as the first low-level focus set, the second low-level focus set is used as the first low-level focus set, and the second high-level opening set is used as the first high-level opening set.
[0149] The lower limit value of the path cost of each agent in each position node N in the first low-level open set and the path cost of the initial path corresponding to each agent in the second path set are obtained.
[0150] For each intelligent agent, a lower limit value of the path cost of the intelligent agent in the conflicting position node N′ corresponding to the second path set is obtained.
[0151] Refer to the following formula to calculate the width of each position node N in the first low-level open set of the agent ai:
[0152]
[0153] Refer to the following formula to calculate the low-level focus threshold of the agent ai in each position node N in the first low-level open set:
[0154]
[0155] Among them, lb i (N′) is the lower limit of the path cost of the i-th agent ai in the conflicting location node N′ corresponding to the second path set.
[0156] The calculation formula for calculating the width of the intelligent agent ai in each position node N in the first low-level open set can also be as follows:
[0157]
[0158] Among them, c(N) is the total path cost in the second path set, the total path cost in the second path set is the sum of the path costs of the initial paths of each intelligent agent in the second path set, and g(N) is the sum of the second distances from the initial position node to the position node N of each intelligent agent in the map data.
[0159] In some embodiments, the above steps also include the following steps:
[0160] For each path set, the following is done:
[0161] Get the target initial path in the path collection.
[0162] The above target initial path is the initial path corresponding to the minimum total path cost among the path costs of each agent in the path set.
[0163] Get the adjacent position nodes of each position node included in the target initial path.
[0164] Z takes the value of 1-Q, where Q is the number of position nodes in the target initial path. For position node Z in the target initial path, calculate the latitude of the target agent corresponding to the current target initial path at position node Z. According to the latitude of the current target agent at position node Z, calculate the low-level focusing threshold T(Z) of the current target agent at position node Z. Also, calculate the latitude of the target agent corresponding to the current target initial path at the corresponding adjacent position node Z′. According to the latitude of the current target agent at the adjacent position node Z′, calculate the low-level focusing threshold T(Z′) of the current target agent at the adjacent position node Z′. f(Z) is the first distance corresponding to the target agent. If T(Z)<f(Z)<T(Z′), determine position node Z as the fourth position node, and place the fourth position node in the second low-level focus set to obtain the second low-level focus set in which the fourth position node is placed.
[0165] The above steps can be used to terminate the underlying search within a limited running time.
[0166] In the embodiment of the present application, T can be relaxed during low-level search. i (N) = ω·f min,i (N), In addition, the present invention redefines T i (N), which will result in a larger lower bound on the path cost of the low-level search, and thus a larger g value on the high-level search, thereby speeding up the search on both levels.
[0167] In an embodiment of the present application, for each agent, a first position node is obtained from the first low-level open set to obtain a first low-level focus set. Based on multiple position nodes and the first low-level focus set, the initial path of each agent from the corresponding starting position node to the corresponding target position node is respectively planned. If there is no conflict between the initial paths of each agent, the initial path of each agent is determined as the corresponding conflict-free target path. If there is a conflict between the initial paths of each agent, the initial path of each agent is adjusted to obtain the conflict-free target path of each agent. The present application can achieve the ability to determine at least one first node from the first low-level open set and put it into the first low-level focus set, which can ensure that the focus list will not be empty, thereby ensuring that the initial path of each agent can be found through the second focus list search, and then the initial path of each agent is coordinated to generate a conflict-free target path between each agent. In this way, it can be avoided that the path needs to be replanned when the focus list is empty, so as to improve the efficiency of determining the target path of each agent.
[0168] In order to better understand the above method, the present application embodiment provides a complete step process, refer to Figure 2 , Figure 2 A complete step flow diagram is provided for an embodiment of the present application. The complete step flow diagram is as follows:
[0169] Map data is obtained, wherein the map data includes a plurality of location nodes on a map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents.
[0170] The above map is a map used to plan the path of each intelligent agent. The above map can be a grid map. Each grid in the map represents a location node. Each location node can carry the corresponding location information on the map. Each intelligent agent corresponds to a starting location node and a target location node.
[0171] At the low layer, a low-layer focused A* search algorithm of the soft explicit estimation CBS (SEECBS) algorithm is adopted. The first low-layer open set and the second low-layer open set at the low layer are the OPEN list of the low layer, and the first low-layer focus set and the second low-layer focus set at the low layer are the FOCAL list of the low layer.
[0172] Put the starting position nodes corresponding to each agent into the lower-level OPEN list.
[0173] For each agent, select the first position node from the lower-level OPEN list and put it into the lower-level FOCAL list.
[0174] Specifically, a preset bounded suboptimal constant is obtained, and the lower limit of the path cost of each position node of each agent in the lower-level OPEN list, the path cost of each agent, and the corresponding width of each position node of each agent in the lower-level OPEN list are initialized to 0.
[0175] The width of each position node of each agent in the lower-level OPEN list is calculated according to the following formula:
[0176]
[0177] in, is the width of the ith agent ai at position node N, ω is a bounded suboptimal constant, k is the number of agents, lb m (N) is the lower limit of the path cost of the mth agent am in the location node N, C m (N) is the path cost of the mth agent am in location node N.
[0178] Since at this time, the lower limit of the path cost of each position node of each agent in the lower-level OPEN list, the path cost of each agent, and the relaxation width corresponding to each position node of each agent in the lower-level OPEN list are initialized to 0, so at this time, the relaxation width of each position node of each agent in the lower-level OPEN list is 0.
[0179] For each agent, the distance from the starting position node to the target position node corresponding to the agent in the map data is calculated to obtain the first distance of the agent.
[0180] Get the minimum value from the first distance of each agent and get the minimum first distance f min,i (N).
[0181] The low-level focus threshold of each agent at each position node in the low-level OPEN list is calculated according to the following formula:
[0182]
[0183] Among them, T i (N) is the low-level focusing threshold of the ith agent ai in the position node N, ω is the bounded suboptimal constant, f min,i (N) is the minimum first distance, lb i (N′) is the lower limit of the path cost of the i-th agent ai in the conflicting location node N′, is the width of the i-th agent ai at position node N.
[0184] Since the initial paths of each agent have not yet been planned, lb i (N′) is initialized to 0, and the width of the position node of the agent in the lower OPEN list is 0, so the lower-level focusing threshold of the position node of the agent in the lower OPEN list is T i (N) = ω·f min,i (N).
[0185] i takes values from 1 to k. For each position node in the lower-level OPEN list, determine whether the lower-level focusing threshold Ti(N) of the agent ai at the position node is greater than or equal to the first distance fi(N) of the agent at the position node. If fi(N)≤Ti(N), the position node is determined as the first position node and the first position node is placed in the lower-level FOCAL list.
[0186] Initialize the number of vertices in each position node of each agent in the low-level FOCAL list to 0.
[0187] For each position node in the low-level FOCAL list, determine whether the low-level focusing threshold Ti(N) of the agent ai at the position node is greater than or equal to the number of vertices ηi(N) of the agent at the position node; if ηi(N)≤Ti(N), if ηi(N)≤Ti(N), then determine the position node as the second position node, and delete the second position node from the low-level FOCAL list to obtain the low-level FOCAL list after deleting the second position node; if ηi(N)>Ti(N), then determine the position node as the third position node, and delete the third position node from the low-level OPEN list to obtain the low-level FOCAL list after deleting the third position node.
[0188] Determine whether a path can be successfully planned based on the lower-level FOCAL list and multiple position nodes. If a path can be successfully planned, use the backtracking algorithm to solve the initial path of each agent from the lower-level FOCAL list, that is, the function EXTRACTPATH(n) starts from position node N and repeatedly moves from position node N to its parent node until it reaches the root node, thereby generating a path. If a path cannot be successfully planned, the path planning fails and the path planning ends.
[0189] If the initial paths of each intelligent agent are solved, the initial paths of each intelligent agent are divided to obtain at least one path set, which includes an initial path corresponding to each intelligent agent, and the initial paths included in different path sets in at least one path set are inconsistent.
[0190] For each path set, the path cost of the initial path of each agent in the path set is calculated respectively to obtain the target initial path, which is the initial path corresponding to the minimum total path cost among the path costs of each agent in the path set, and the adjacent position nodes of each position node contained in the target initial path are obtained.
[0191] Z takes the value of 1-Q, where Q is the number of position nodes in the target initial path. For position node Z in the target initial path, calculate the latitude of the target agent corresponding to the current target initial path at position node Z. According to the latitude of the current target agent at position node Z, calculate the low-level focusing threshold T(Z) of the current target agent at position node Z. Also, calculate the latitude of the target agent corresponding to the current target initial path at the corresponding adjacent position node Z′. According to the latitude of the current target agent at the adjacent position node Z′, calculate the low-level focusing threshold T(Z′) of the current target agent at the adjacent position node Z′. f(Z) is the first distance corresponding to the target agent. If T(Z)<f(Z)<T(Z′), determine position node Z as the fourth position node, and place the fourth position node in the second low-level focus set to obtain the second low-level focus set in which the fourth position node is placed.
[0192] In the high-level, multiple path sets are used as nodes on the constraint tree (hereinafter referred to as CT nodes), the first high-level open set and the second high-level open set are the high-level OPEN list, and the first high-level focus set and the second high-level focus set are the high-level FOCAL list.
[0193] The multiple CT nodes obtained by dividing the initial paths of each agent are put into the high-level OPEN list.
[0194] Calculate the total path cost LL corresponding to each CT node in the high-level OPEN list. The total path cost is the sum of the path costs of each agent in the corresponding CT node.
[0195] The minimum total path cost LLmin among the total path costs corresponding to each CT node is obtained, and the product of LLmin and the bounded suboptimal constant w is calculated to obtain the target value.
[0196] For each CT node in the OPEN list of the higher level, if the total path cost LL of the CT node is less than or equal to the target value, the CT node is determined as the first CT node and is placed in the FOCAL list of the higher level.
[0197] The second CT node with the smallest number of conflicts is obtained from the high-level FOCAL list. The above number of conflicts can be understood as the number of times that multiple agents appear at the same position in the same time step for each initial path in the CT node.
[0198] If there is no conflict among the initial paths in the second CT node, each initial path in the second CT node is determined as a target path of the corresponding agent, and the target path is output.
[0199] If there are conflicts among the initial paths in the second CT node, the root node of the constraint tree is generated according to the second CT node, two child nodes are expanded for the root node, and target constraints are added to the two child nodes. If the parent node has constraints, the original constraints of the parent node are added to the two child nodes, and the two child nodes are placed in the high-level OPEN list as CT nodes.
[0200] Return to execute the step of selecting the first position node from the lower-level OPEN list and putting it into the lower-level FOCAL list for each agent, until the target path of each agent is output.
[0201] The vertex limit value L is calculated according to the following formula: i (N):
[0202] L i (N) = r·η i (N′)
[0203] L i (N) represents the limit value of the number of vertices in the position node N of the agent ai in the second CT node, η i (N′) is the number of vertices in the position node N′ where the agent ai has conflicts in the second CT node, r≥1, and r is a preset constant.
[0204] If there is φ i (N)≤L i (N), then the low-level implementation uses a focused search algorithm or an A* search algorithm. If φ i (N)>L i (N), then the A* search algorithm is used at the lower level, that is, if φ i (N)>L i (N) If the low-level layer currently uses a focused search algorithm, switch to the A* search algorithm.
[0205] Specifically, obtain the lower limit value of the path cost of each agent in each position node N in the low-level OPEN list, the lower limit value of the path cost of each agent in the conflicting position node N′ corresponding to the second CT node, and the path cost of the initial path corresponding to each agent in the second CT node.
[0206] Refer to the following formula to update the calculation of the width of the intelligent agent ai in each position node N in the OPEN list of the lower layer:
[0207]
[0208] Refer to the following formula to update the low-level focus threshold of the calculation agent ai in each position node N in the low-level OPEN list:
[0209]
[0210] Among them, lb i (N′) is the lower limit of the path cost of the i-th agent ai in the conflicting location node N′ corresponding to the second CT node.
[0211] Alternatively, the total path cost in the second CT node, the lower limit of the path cost of each agent in each position node N in the lower-level OPEN list, and the corresponding path cost of each agent in the second CT node are obtained, and the second distance from the initial position node of each agent to each position node N in the map data is obtained. The total path cost in the second CT node is the sum of the path costs of the initial paths of each agent in the second path set.
[0212] Refer to the following formula to calculate the width of the agent ai in each position node N in the lower-level OPEN list:
[0213]
[0214] In the embodiment of the present application, a soft distribution is proposed to relax the bounded suboptimal restrictions of the SEECBS algorithm, while still being able to plan a path for a bounded suboptimal solution at the lower level, and it is proposed to reuse the low-level focused A* search of SEECBS to make up for the shortcomings of using soft distribution. Relaxing the requirements for planning bounded suboptimal paths at the lower level to reduce the number of conflicts that need to be resolved at the higher level, while still being able to ensure the bounded suboptimality of MAPF, can greatly improve the efficiency of MAPF path planning.
[0215] In order to better implement the above method, the present application embodiment also provides an intelligent body path planning device, referring to Figure 3 , Figure 3 A schematic diagram of the structure of an intelligent path planning device provided in an embodiment of the present application is shown in FIG. Figure 3 As shown, the device 30 includes:
[0216] The data acquisition module 301 is used to acquire map data; wherein the map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of agents;
[0217] The set acquisition module 302 is used to acquire a first position node from a first low-level open set for each agent to obtain a first low-level focus set, wherein the first low-level open set includes a plurality of starting position nodes corresponding to the agents, and the first position node is a position node whose low-level focus threshold of the agent is greater than or equal to a first distance of the agent, and the first distance of the agent is a distance from the starting position node corresponding to the agent to a target position node in the map data;
[0218] A path planning module 303 is used to plan an initial path for each agent from a corresponding starting position node to a corresponding target position node based on the multiple position nodes and the first low-level focus set;
[0219] The result determination module 304 is used to determine whether there is a conflict between the initial paths of the agents and obtain a conflict result;
[0220] A path determination module 305, for determining the initial path of each agent as the corresponding target path if the conflict result indicates that there is no conflict between the initial paths of each agent;
[0221] The path adjustment module 306 is used to adjust the initial path of each agent if the conflict result indicates that there is a conflict between the initial paths of each agent, so as to obtain the target path corresponding to each agent, and there is no conflict between the target paths corresponding to each agent.
[0222] In one embodiment, the above-mentioned set acquisition module 302 is specifically used to: obtain target parameters, the target parameters include a preset bounded suboptimal constant, a lower limit value of the path cost of each agent at each position node in the first low-level open set, and the path cost of each agent; determine the relaxation width corresponding to each position node of the agent in the first low-level open set according to the target parameters; for each position node in the first low-level open set, determine the low-level focusing threshold of the agent at the position node according to the minimum first distance, the bounded suboptimal constant, the relaxation width of the agent at the position node, and the lower limit value of the path cost of the agent in the conflicting position node, the minimum first distance is the minimum value of the first distances corresponding to multiple agents.
[0223] In one embodiment, the path planning module 303 is specifically used to: for each agent, obtain the number of vertices corresponding to each position node of the agent in the first low-level focus set, the number of vertices corresponding to the position node is the number of times the path of the agent passes through the corresponding position node; for each agent, if there is a second position node in the first low-level focus set, delete the second position node from the first low-level focus set to obtain a second low-level focus set, the second position node is a position node whose number of vertices of the agent is less than or equal to the low-level focus threshold of the agent; if the path planning conditions are met according to the second low-level focus set and multiple position nodes, use the backtracking algorithm to solve the initial path of each agent from the second low-level focus set.
[0224] In one embodiment, the result determination module 304 is specifically used to: calculate the path cost of the initial path of each agent respectively; divide according to the initial path of each agent to obtain at least one path set; the path set contains at least one initial path corresponding to each agent, and the initial paths contained in different path sets in at least one path set are different; obtain the first path set in the first high-level open set to obtain the first high-level focus set, the first high-level open set includes at least one path set, the first path set is a path set whose corresponding total path cost is less than or equal to the target value, the total path cost is the sum of the path costs of each agent in the corresponding path set, and the target value is the product of the minimum total path cost and a bounded suboptimal constant in the total path costs corresponding to each path set in the first high-level open set; obtain the second path set with the minimum number of conflicts from the first high-level focus set; if there is a conflict between the initial paths in the second path set, determine that the conflict result indicates that there is a conflict between the initial paths of each agent; if there is no conflict between the initial paths in the second path set, determine that the conflict result indicates that there is no conflict between the initial paths of each agent.
[0225] In one embodiment, the above-mentioned path planning module 303 is specifically used for: for each intelligent agent, if there is a third position node in the first low-level focus set, the third position node is deleted from the first low-level open set to obtain a second low-level open set, and the third position node is a position node whose number of vertices of the intelligent agent is greater than the low-level focus threshold of the intelligent agent.
[0226] In one embodiment, the path adjustment module 306 is specifically used to: generate a root node of a constraint tree according to the second path set; expand at least two child nodes of the root node, and add a target constraint to the at least two child nodes, wherein the target constraint includes at least one of an edge constraint and a vertex constraint; place the at least two child nodes into the first high-level open set to obtain a second high-level open set; and obtain a target path corresponding to each of the intelligent agents based on the second high-level open set and the second low-level open set.
[0227] In one embodiment, the path adjustment module 306 is specifically used to: use the second low-level open set as the first low-level open set, the second low-level focus set as the first low-level focus set, the second high-level focus set as the first high-level focus set, and the second high-level open set as the first high-level open set, and return to execute for each intelligent agent, obtain the first position node from the first low-level open set, and obtain the step of obtaining the first low-level focus set.
[0228] The functions implemented by this intelligent agent path planning device are similar to the steps of the above-mentioned intelligent agent path planning method, and will not be repeated here.
[0229] Figure 4 A schematic diagram of the hardware structure of an electronic device provided in an embodiment of the present application is shown.
[0230] The electronic device may include a processor 401 and a memory 402 storing computer program instructions.
[0231] Specifically, the processor 401 may include a central processing unit (CPU), or an application specific integrated circuit (ASIC), or may be configured to implement one or more integrated circuits of the embodiments of the present application.
[0232] Memory 402 may include a large capacity memory for data or instructions. By way of example and not limitation, memory 402 may include a hard disk drive (HDD), a floppy disk drive, a flash memory, an optical disk, a magneto-optical disk, a magnetic tape, or a universal serial bus (USB) drive or a combination of two or more of these. In appropriate cases, memory 402 may include a removable or non-removable (or fixed) medium. In appropriate cases, memory 402 may be inside or outside of an integrated gateway disaster recovery device. In a specific embodiment, memory 402 is a non-volatile solid-state memory.
[0233] In some embodiments, the memory 402 may include a read-only memory (ROM), a random access memory (RAM), a magnetic disk storage medium device, an optical storage medium device, a flash memory device, an electrical, optical or other physical / tangible memory storage device. Thus, in general, the memory includes one or more tangible (non-transitory) computer-readable storage media (e.g., a memory device) encoded with software including computer-executable instructions, and when the software is executed (e.g., by one or more processors), it is operable to perform the operations described with reference to the method according to an aspect of the present disclosure.
[0234] The processor 401 implements any one of the agent path planning methods in the above embodiments by reading and executing computer program instructions stored in the memory 402 .
[0235] In one example, the electronic device may further include a communication interface 403 and a bus 410. Figure 4 As shown, the processor 401, the memory 402, and the communication interface 403 are connected via a bus 410 and communicate with each other.
[0236] The communication interface 403 is mainly used to implement communication between various modules, devices, units and / or equipment in the embodiments of the present application.
[0237] Bus 410 includes hardware, software or both, and the parts of online data flow billing equipment are coupled to each other. For example, but not limitation, bus may include accelerated graphics port (AGP) or other graphics bus, enhanced industrial standard architecture (EISA) bus, front-side bus (FSB), hypertransport (HT) interconnection, industrial standard architecture (ISA) bus, infinite bandwidth interconnection, low pin count (LPC) bus, memory bus, micro channel architecture (MCA) bus, peripheral component interconnection (PCI) bus, PCI-Express (PCI-X) bus, serial advanced technology attachment (SATA) bus, video electronics standard association local (VLB) bus or other suitable bus or two or more of these combinations. In appropriate cases, bus 410 may include one or more buses. Although the present application embodiment describes and shows a specific bus, the present application considers any suitable bus or interconnection.
[0238] In addition, in combination with the agent path planning method in the above embodiment, the embodiment of the present application can provide a computer storage medium for implementation. The computer storage medium stores computer program instructions; when the computer program instructions are executed by a processor, any one of the agent path planning methods in the above embodiment is implemented.
[0239] It should be clear that the present application is not limited to the specific configuration and processing described above and shown in the figures. For the sake of simplicity, a detailed description of the known method is omitted here. In the above embodiments, several specific steps are described and shown as examples. However, the method process of the present application is not limited to the specific steps described and shown, and those skilled in the art can make various changes, modifications and additions, or change the order between the steps after understanding the spirit of the present application.
[0240] The functional blocks shown in the above-described block diagram can be implemented as hardware, software, firmware or a combination thereof. When implemented in hardware, it can be, for example, an electronic circuit, an application specific integrated circuit (ASIC), appropriate firmware, a plug-in, a function card, etc. When implemented in software, the elements of the present application are programs or code segments that are used to perform the required tasks. The program or code segment can be stored in a machine-readable medium, or transmitted on a transmission medium or a communication link by a data signal carried in a carrier wave. "Machine-readable medium" can include any medium capable of storing or transmitting information. Examples of machine-readable media include electronic circuits, semiconductor memory devices, ROM, flash memory, erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, optical fiber media, radio frequency (RF) links, etc. The code segment can be downloaded via a computer network such as the Internet, an intranet, etc.
[0241] It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, this application is not limited to the order of the above steps, that is, the steps can be performed in the order mentioned in the embodiment, or in a different order from the embodiment, or several steps can be performed simultaneously.
[0242] Aspects of the present disclosure are described above with reference to the flowchart and / or block diagram of the method, device (system) and computer program product according to the embodiment of the present disclosure. It should be understood that each box in the flowchart and / or block diagram and the combination of each box in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device to produce a machine so that these instructions executed by the processor of the computer or other programmable data processing device enable the implementation of the function / action specified in one or more boxes of the flowchart and / or block diagram. Such a processor can be, but is not limited to, a general-purpose processor, a special-purpose processor, a special application processor, or a field programmable logic circuit. It can also be understood that each box in the block diagram and / or flowchart and the combination of boxes in the block diagram and / or flowchart can also be implemented by dedicated hardware that performs a specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions.
[0243] The above is only a specific implementation of the present application. Those skilled in the art can clearly understand that for the convenience and simplicity of description, the specific working processes of the systems, modules and units described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. It should be understood that the protection scope of the present application is not limited to this. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in this application, and these modifications or replacements should be included in the protection scope of this application.
Claims
1. An intelligent agent path planning method, characterized in that: include: Acquire map data; wherein the map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents; For each of the agents, a first position node is obtained from a first low-level open set to obtain a first low-level focus set, wherein the first low-level open set includes a plurality of starting position nodes corresponding to the agents, wherein the first position node is a position node whose low-level focus threshold of the agent is greater than or equal to a first distance of the agent, wherein the first distance of the agent is a distance from the starting position node corresponding to the agent to a target position node in the map data; Based on the plurality of location nodes and the first low-level focus set, respectively planning an initial path for each of the agents from a corresponding starting location node to a corresponding target location node; Determine whether there is a conflict between the initial paths of the agents, and obtain a conflict result; If the conflict result indicates that there is no conflict between the initial paths of each of the agents, determining the initial path of each of the agents as the corresponding target path; If the conflict result indicates that there is a conflict between the initial paths of each of the agents, the initial path of each of the agents is adjusted to obtain the target path corresponding to each of the agents, and there is no conflict between the target paths corresponding to each of the agents.
2. The method according to claim 1, characterized in that Before acquiring the first position node from the first lower-level open set to obtain the first lower-level focus set, the method further includes: Obtaining target parameters, the target parameters including a preset bounded suboptimal constant, a lower limit of the path cost of each of the agents at each location node in the first low-level open set, and a path cost of each of the agents; Determine, according to the target parameter, the width of the agent corresponding to each position node in the first low-level open set; For each location node in the first low-level open set, the low-level focusing threshold of the agent at the location node is determined based on the minimum first distance, the bounded suboptimal constant, the relaxation width of the agent at the location node, and the lower limit of the path cost of the agent in the location node where there is a conflict, and the minimum first distance is the minimum value of the first distances corresponding to multiple agents.
3. The method according to claim 1, characterized in that Before respectively planning an initial path for each of the agents from a corresponding starting location node to a corresponding target location node based on the plurality of location nodes and the first low-level focus set, the method comprises: For each of the intelligent agents, obtain the number of vertices corresponding to each position node of the intelligent agent in the first low-level focus set, where the number of vertices corresponding to the position node is the number of times the path of the intelligent agent passes through the corresponding position node; The step of planning the initial path of each of the agents from the corresponding starting position node to the corresponding target position node based on the plurality of position nodes and the first low-level focus set comprises: For each of the agents, if there is a second position node in the first low-level focus set, the second position node is deleted from the first low-level focus set to obtain a second low-level focus set, where the second position node is a position node whose number of vertices of the agent is less than or equal to the low-level focus threshold of the agent; If the path planning conditions are met according to the second low-level focus set and the multiple position nodes, a backtracking algorithm is used to solve the initial path of each of the intelligent agents from the second low-level focus set.
4. The method according to claim 3, characterized in that The determining whether there is a conflict between the initial paths of the agents and obtaining a conflict result includes: Calculating the path cost of the initial path of each of the intelligent agents respectively; Dividing the initial paths of the agents to obtain at least one path set; the path set includes at least one initial path corresponding to each agent, and different path sets in the at least one path set include different initial paths; Acquire a first path set in a first high-level open set to obtain a first high-level focus set, wherein the first high-level open set includes the at least one path set, the first path set is a path set whose corresponding total path cost is less than or equal to a target value, the total path cost is the sum of the path costs of each of the intelligent agents in the corresponding path set, and the target value is the product of the minimum total path cost in the total path costs corresponding to each of the path sets in the first high-level open set and a bounded suboptimal constant; Acquire a second path set with the minimum number of conflicts from the first high-level focus set; If there is a conflict between the initial paths in the second path set, determining that a conflict result indicates that there is a conflict between the initial paths of each of the agents; If there is no conflict between the initial paths in the second path set, determining the conflict result indicates that there is no conflict between the initial paths of each of the agents.
5. The method according to claim 4, characterized in that Before determining whether there is a conflict between the initial paths of the agents and obtaining the conflict result, the method further comprises: For each of the agents, if there is a third position node in the first low-level focus set, the third position node is deleted from the first low-level open set to obtain a second low-level open set, and the third position node is a position node whose vertex number of the agent is greater than the low-level focus threshold of the agent; The adjusting the initial path of each of the agents to obtain the target path corresponding to each of the agents includes: Generate a root node of a constraint tree according to the second path set; Expanding at least two child nodes of the root node, and adding a target constraint to the at least two child nodes, wherein the target constraint includes at least one of an edge constraint and a vertex constraint; Putting the at least two subnodes into the first high-level open set to obtain a second high-level open set; Based on the second high-level open set and the second low-level open set, a target path corresponding to each of the intelligent agents is obtained.
6. The method according to claim 5, characterized in that The obtaining of a target path corresponding to each of the agents based on the second high-level open set and the second low-level open set includes: Take the second low-level open set as the first low-level open set, the second low-level focus set as the first low-level focus set, the second high-level focus set as the first high-level focus set and the second high-level open set as the first high-level open set, and return to execute the step of obtaining the first position node from the first low-level open set for each of the intelligent agents to obtain the first low-level focus set.
7. An intelligent agent path planning device, characterized in that: The device comprises: A data acquisition module, used to acquire map data; wherein the map data includes a plurality of location nodes on the map, and the plurality of location nodes include a starting location node and a target location node corresponding to each of the plurality of intelligent agents; A set acquisition module is used to acquire a first position node from a first low-level open set for each of the agents to obtain a first low-level focus set, wherein the first low-level open set includes a plurality of starting position nodes corresponding to the agents, wherein the first position node is a position node whose low-level focus threshold of the agent is greater than or equal to a first distance of the agent, wherein the first distance of the agent is a distance from the starting position node corresponding to the agent to a target position node in the map data; A path planning module, configured to plan an initial path for each of the agents from a corresponding starting position node to a corresponding target position node based on a plurality of position nodes and the first low-level focus set; A result determination module, used to determine whether there is a conflict between the initial paths of the agents and obtain a conflict result; a path determination module, configured to determine the initial path of each of the agents as the corresponding target path if the conflict result indicates that there is no conflict between the initial paths of each of the agents; The path adjustment module is used to adjust the initial path of each agent if the conflict result indicates that there is a conflict between the initial paths of each agent, so as to obtain the target path corresponding to each agent, and there is no conflict between the target paths corresponding to each agent.
8. An electronic device, characterized in that: The electronic device comprises: a processor and a memory storing computer program instructions; When the processor executes the computer program instructions, the intelligent agent path planning method as described in any one of claims 1-6 is implemented.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer program instructions, and when the computer program instructions are executed by the processor, the intelligent agent path planning method as described in any one of claims 1-6 is implemented.
10. A computer product, characterized in that: The computer product comprises the electronic device as claimed in claim 8.