Communication multi-agent path planning method and device based on priority re-planning

Through the communication multi-agent path planning method based on priority re-planning, combined with Q network and graph convolution network, the agent perceives obstacles and other agent positions in the local environment, selects the optimal action and dynamically adjusts the priority to solve the problem It solves the problem of path coordination in high-density environments and improves system performance and reliability.

CN118760180APending Publication Date: 2024-10-11HARBIN INSTITUTE OF TECHNOLOGY (SHENZHEN) (INSTITUTE OF SCIENCE AND TECHNOLOGY INNOVATION HARBIN INSTITUTE OF TECHNOLOGY SHENZHEN)
View PDF 0 Cites 4 Cited by

Patent Information

Application Number
CN202410934819.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-07-12
Publication Date
2024-10-11

AI Technical Summary

Technical Problem

Existing multi-agent path planning technology is difficult to effectively coordinate agent paths in high-density environments, leading to conflicts and deadlock problems, and lacks effective priority planning, affecting system efficiency and reliability.

Method used

Using a communication multi-agent path planning method based on priority re-planning, through a reinforcement learning framework combining Q network and graph convolution network, the agent perceives obstacles and other agent positions in the local environment, and calculates the action Q through the communication network value, select the optimal action, and dynamically adjust the priority and path when encountering a deadlock to avoid conflicts.

Benefits of technology

It effectively reduces conflicts and deadlocks between agents, improves the overall performance and reliability of the system, and can quickly adapt to dynamic environment changes, especially in application scenarios with high real-time and accuracy requirements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118760180A_ABST
    Figure CN118760180A_ABST
Patent Text Reader

Abstract

The invention relates to a communication multi-agent path planning method and device based on priority re-planning, and the method comprises the steps: initializing a plane map environment, and distributing different starting points and terminal points; obtaining sensing information of the intelligent agent; the position information of the obstacle, the position information of other intelligent agents, the position information of the target point, the position coordinate of the first step in the future, the position coordinate of the second step in the future and the position coordinate of the third step in the future are respectively input into a Q network structure, and feature information # imgabs0 # is extracted and input into a communication network; aggregating the weighted feature information of all neighbor agents to obtain aggregated feature information, mapping the aggregated feature information through a Q network structure, and selecting an action with the maximum Q value as a prediction action; and performing invalid detection on the predicted action. According to the method, priority planning and a communication strategy are introduced, coordination among the intelligent agents is enhanced, conflicts and deadlocks can be effectively reduced even in an environment with a large number of intelligent agents, and the overall performance of the system is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the field of path planning, and in particular relates to a communication multi-agent path planning method and a device thereof based on priority re-planning. Background Art

[0002] In the development of modern automation and intelligent systems, multi-agent path planning (MAPF) technology plays a vital role. The goal of multi-agent path planning (MAPF) is to develop paths from a starting position to a target position for a group of autonomous agents. These paths must avoid conflicts and be optimized as much as possible within the feasible range. This technology has a wide range of applications in fields such as drone formation flying, automated logistics, autonomous driving systems, and robot football, and is of great significance for improving efficiency and safety. The complexity of the multi-agent path planning (MAPF) problem mainly stems from the need to consider the path planning of multiple agents at the same time, which includes not only the effectiveness of the path, but also the coordination between paths to avoid collisions. The complexity of this problem leads to it being generally classified as a computational problem, which is specifically manifested in the handling of complex constraints, the management of interactions between agents, and the ability to adapt to dynamic changes in the environment.

[0003] Traditional multi-agent path planning (MAPF) solutions are mainly divided into centralized methods and distributed methods. Centralized methods are favored for their ability to guarantee global optimal solutions, but they usually require huge computing resources, especially when the number of agents increases, the amount of computation increases exponentially, which is impractical in large-scale systems. In contrast, distributed methods can obtain suboptimal solutions faster by allowing agents to make decisions independently based on local information. This method is particularly suitable for application scenarios that require high real-time response. However, distributed methods also face their own limitations, especially in environments with a large number of agents, where agents often find it difficult to achieve effective collaboration due to the limitations of local information. To overcome this limitation, researchers have introduced communication mechanisms to enhance the global consistency of decisions through information exchange between agents. However, when the density of agents is too high, the transmission and processing of information may become too complicated, affecting the quality of decision-making. In high-density environments, conflict and deadlock problems are particularly prominent. When the paths of agents intersect, they may need to stop moving to avoid collisions. Such a strategy may lead to a significant decrease in system efficiency or even stagnation of the entire system.

[0004] In addition, most existing distributed solutions lack effective priority planning, which may lead to uncoordinated decisions when agents meet, increasing the possibility of system deadlock. Summary of the invention

[0005] The present invention provides a communication multi-agent path planning method and device based on priority replanning, aiming to solve at least one of the technical problems existing in the prior art.

[0006] The technical solution of the present invention relates to a communication multi-agent path planning method based on priority replanning and a device thereof. The communication multi-agent path planning method based on priority replanning is applied to a communication multi-agent path planning device based on priority replanning. The communication multi-agent path planning device based on priority replanning includes a host computer and at least one agent. The agents work on a plane map. Each agent can perceive the local environment of its position on the plane map. Each of the agents is electrically connected to the host computer. The communication multi-agent path planning method based on priority replanning includes the following steps:

[0007] S100, initializing the plane map environment and assigning different starting points and end points to all agents;

[0008] S200, acquiring the perception information of the intelligent agent, and decomposing the perception information of the intelligent agent into obstacle position information, other intelligent agent position information and target point position information in the local field of view of the intelligent agent;

[0009] S300, based on the A* algorithm, calculating the position coordinates of the first step in the future, the second step in the future, and the third step in the future when the agent moves from the current position to the target position;

[0010] S400, the obstacle position information, other agent position information, target point position information, the position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively input into the Q network structure, and the Q network structure extracts the feature information of the agent's perception information to obtain feature information

[0011] S500: feature information of the agent and its neighboring agents Input into the communication network, the communication network calculates the characteristic information The correlation is the feature information of neighbor agents Assign weights to obtain weighted feature information of neighboring agents, aggregate the weighted feature information of all neighboring agents to obtain aggregated feature information, map the aggregated feature information into upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value through the Q network structure, and the agent selects the action with the largest Q value among the upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value as the predicted action;

[0012] S600: Perform an invalidity check on the predicted action. If the predicted action passes the invalidity check, the agent executes the predicted action.

[0013] Furthermore, the step S200 also includes:

[0014] The obstacle position information, other agent position information and target position information in the local field of view of the agent are converted into binary matrix forms respectively;

[0015] Among them, the size of the agent's perception information is a 1X1 observation map;

[0016] The obstacle position information is recorded in the obstacle map, the other agent position information is recorded in the other agent map, and the target point position information is recorded in the target point map; in the obstacle map, the coordinate value of the position with obstacles is set to 1, and the coordinate value of the position without obstacles is set to 0; in the other agent map, the coordinate value of the position with other agents is set to 1, and the coordinate value of the position without other agents is set to 0; in the target point map, if the target point is within the field of view of the current agent, the coordinate value of the position where the target point is located is set to 1, and the coordinate values ​​of other positions are set to 0; if the target point is not within the field of view of the current agent, the coordinate value of the projection position of the target point at the boundary of the field of view of the current agent is set to 1, and the coordinate values ​​of other positions are set to 0.

[0017] Specifically, the agent can only obtain local environmental information and observe a local field of view of 1X1 size. Local observability gives the model strong generalization ability, and the agent only needs a local map to make decisions. The local observation map is divided into three channels: obstacle positions, other agent positions, and agent target point positions, represented by three binary matrices. If the target point is not in the field of view, it is represented by its projection on the boundary of the field of view. In order to guide the agent to move to the target, four heuristic channels are introduced, corresponding to four moving directions. If the action brings the agent closer to the target, the corresponding position is set to 1. Multi-channel input reduces the amount of network calculation and improves information efficiency.

[0018] Further, the step S300 includes:

[0019] The position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively expressed in the form of binary matrices;

[0020] Among them, the coordinate positions corresponding to the position coordinates of the first step in the future, the second step in the future, and the third step in the future are marked in the obstacle map, other intelligent agent map, and target point map, and the coordinate values ​​of the corresponding positions in the next three steps are set to 1, and the coordinate values ​​of other positions are set to 0.

[0021] Further, in step S500,

[0022] The communication network is constructed between multiple agents based on GATv2, and is used to obtain feature information after time series processing.

[0023] Wherein, the communication network calculates characteristic information The correlation is:

[0024] e(h i ,h j )=a T LeakyReLU(W·[h i ||h j ])

[0025] Among them, h i and h j There are two agents a i and a j The characteristic information of e(h i ,h j ) is h i and h j , a and W are learnable parameters, and LeakyReLU is the activation function.

[0026] Furthermore, in step S500, when training the Q network, an internal reward mechanism is included to motivate the agent to explore in the direction of the target point, and the internal reward mechanism is:

[0027]

[0028] in,

[0029] δ = 1 or 0,

[0030] If dist(π i [t-1], t i )>dist(π i [t],t i ), δ=1, otherwise, δ=0;

[0031] π i [t] represents agent a i The coordinates at time t, s i and t i Respectively represent agent a i The starting point and end point, dist(π i [t-1], t i ) represents agent a i The distance between the coordinate at time t-1 and the end point, dist(π i[t],t i ) represents agent a i The distance between the coordinate at time t and the end point, dist(s i , t i ) represents agent a i The distance between the starting point and the end point.

[0032] Furthermore, in step S600, it is determined based on the buffer whether the agent is in a deadlock state. If the agent is in a deadlock state, the predicted action will be reselected based on a random strategy for the deadlocked agent, and the state of the current agent will be updated.

[0033] Furthermore, in step S600, replanning the predicted action includes:

[0034] S610, sequentially search for the adjacent position C of the current agent i All agent nodes v, and each adjacent position C i The agent node v is based on the target point position g corresponding to the agent i The distances are sorted, among which,

[0035] C i =Neigh(a i ),

[0036] Neigh(a i ) is the agent a i The set of all neighboring agents within the field of view;

[0037] S620, if there is an intelligent agent node v∈C i Conflicting Agents j , then skip the node. If there is a node with a lower priority than agent a at the position of agent node v i Agent a j , then for a j Call replan (a j );

[0038] S630, if replanning Replan (a j ) returns valid, then move a i , otherwise continue searching, if successful move a i , then replan Replan(a i ) returns valid;

[0039] S640, otherwise if Replan (a j ) returns invalid and resets the agent's state to the state at the previous moment.

[0040] Further, in step S600,

[0041] If the predicted action will cause the agent to cross the boundary, collide or deadlock, the action will be reselected; if the predicted action will conflict with other agents, the predicted action will be replanned to bring the agent into a new state.

[0042] Furthermore, the present invention also proposes a communication multi-agent path planning device based on priority replanning, which is used to implement a communication multi-agent path planning method based on priority replanning. The communication multi-agent path planning device based on priority replanning includes:

[0043] A host computer and at least one intelligent agent, wherein the intelligent agents work on a plane map, each intelligent agent can sense the local environment of its position on the plane map, and each intelligent agent is electrically connected to the host computer.

[0044] Furthermore, the present invention also proposes a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the communication multi-agent path planning method based on priority re-planning is implemented.

[0045] Compared with the prior art, the present invention has the following characteristics.

[0046] The present invention not only considers the effectiveness and efficiency of the path, but also introduces priority planning and communication strategies to enhance the coordination between agents. In this way, even in an environment with a large number of agents, it can effectively reduce conflicts and deadlocks and improve the overall performance of the system.

[0047] The present invention also considers the dynamic obstacles that the agent may encounter when performing path planning. In real-world applications, the environment is often constantly changing, and the agent needs to be able to quickly adapt to environmental changes and make corresponding adjustments. Therefore, the path planning mechanism of the present invention not only needs to take these issues into consideration during design, but also needs to be able to dynamically adjust the path during runtime to cope with possible obstacles and changes in the actions of other agents.

[0048] The multi-agent path planning technology of the present invention provides a comprehensive and effective solution by comprehensively considering multiple aspects such as path optimization, conflict avoidance, communication strategy and dynamic environment adaptation. The implementation of this technology will greatly improve the performance and reliability of multi-agent systems in various application scenarios, especially in those occasions with high requirements for real-time and accuracy. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 Flowchart of a communicating multi-agent path planning method based on priority replanning.

[0050] Figure 2 A network diagram of the Q network structure in the communication multi-agent path planning method based on priority replanning.

[0051] Figure 3 Schematic diagram of the decomposition pipeline of the feature processing network input in the communicating multi-agent path planning method based on priority replanning.

[0052] Figure 4 A flowchart of performing action detection after obtaining action prediction in a communication multi-agent path planning method based on priority replanning.

[0053] Figure 5 Schematic diagram of the process of intelligent weight planning for selecting invalid actions in the communicating multi-agent path planning method based on priority replanning. DETAILED DESCRIPTION

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

[0055] The concept, specific structure and technical effects of the present invention will be clearly and completely described below in combination with the embodiments and drawings to fully understand the purpose, scheme and effect of the present invention.

[0056] It should be noted that, unless otherwise specified, when a feature is referred to as being "fixed" or "connected" to another feature, it may be directly fixed or connected to another feature, or it may be indirectly fixed or connected to another feature. The singular forms "a", "said" and "the" used herein are also intended to include the plural forms, unless the context clearly indicates otherwise. In addition, unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art. The terms used in this specification are intended only to describe specific embodiments and are not intended to limit the invention. The term "and / or" used herein includes any combination of one or more of the related listed items.

[0057] It should be understood that although the terms first, second, third, etc. may be used to describe various elements in the present disclosure, these elements should not be limited to these terms. These terms are only used to distinguish elements of the same type from each other. For example, without departing from the scope of the present disclosure, the first element may also be referred to as the second element, and similarly, the second element may also be referred to as the first element. The use of any and all examples or exemplary language ("for example", "such as", etc.) provided herein is intended only to better illustrate embodiments of the present invention, and unless otherwise required, will not impose limitations on the scope of the present invention. In addition, the industry term "posture" used herein refers to the position and attitude of a certain element relative to a spatial coordinate system.

[0058] Reference Figures 1 to 5 The embodiment of the present invention provides a communication multi-agent path planning method based on priority replanning and a device thereof. The communication multi-agent path planning method based on priority replanning is applied to a communication multi-agent path planning device based on priority replanning. The communication multi-agent path planning device based on priority replanning includes a host computer and at least one agent. The agents work on a plane map. Each agent can perceive the local environment of its position on the plane map. Each of the agents is electrically connected to the host computer. Figure 1 The communication multi-agent path planning method based on priority replanning comprises the following steps:

[0059] S100, initializing the plane map environment and assigning different starting points and end points to all agents;

[0060] S200, acquiring the perception information of the intelligent agent, and decomposing the perception information of the intelligent agent into obstacle position information, other intelligent agent position information and target point position information in the local field of view of the intelligent agent;

[0061] S300, based on the A* algorithm, calculating the position coordinates of the first step in the future, the second step in the future, and the third step in the future when the agent moves from the current position to the target position;

[0062] S400, the obstacle position information, other agent position information, target point position information, the position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively input into the Q network structure, and the Q network structure extracts the feature information of the agent's perception information to obtain feature information

[0063] S500: feature information of the agent and its neighboring agents Input into the communication network, the communication network calculates the characteristic information The correlation is the feature information of neighbor agents Assign weights to obtain weighted feature information of neighboring agents, aggregate the weighted feature information of all neighboring agents to obtain aggregated feature information, map the aggregated feature information into upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value through the Q network structure, and the agent selects the action with the largest Q value among the upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value as the predicted action;

[0064] S600: Perform an invalidity check on the predicted action. If the predicted action passes the invalidity check, the agent executes the predicted action.

[0065] The communication multi-agent path planning method and device based on priority replanning assume that the agent can only perceive its local environment and adopts a reinforcement learning framework to guide the agent to plan the path. Through a communication network with an attention mechanism, the agent can exchange information with neighboring agents to achieve more effective collaborative control. The attention mechanism enables the agent to pay attention to neighbor information that is more critical to the current situation to avoid information overload. The agent selects actions based on the Q value obtained by the Q network structure, and prioritizes the action with the highest Q value to reach the destination.

[0066] In the present invention, the agent is placed in a grid map of size M×N, and irregular obstacles are randomly distributed on the map. The environment can be represented by a binary matrix, where 0 represents an occupyable position and 1 represents an obstacle. At the beginning of each round, n starting points and target points are randomly selected from the valid positions and assigned to the agent, and it is ensured that they are reachable. The agent can only obtain local environmental information and observe a local field of view of size l×l. The local observation map is divided into three channels: the position of obstacles, the positions of other agents, and the position of the agent's target point, which are represented by three binary matrices respectively. If the target point is not in the field of view, it is represented by its projection on the boundary of the field of view. In order to guide the agent to move to the target, four heuristic channels are introduced, corresponding to four moving directions respectively. If the action brings the agent close to the target, the corresponding position is set to 1. Multi-channel input reduces the amount of network calculation and improves information efficiency. The present invention abstracts the multi-agent path planning (MAPF) problem into a sequential decision problem. The goal is to train a mapping The mapping The input is the local observation map and communication information of the agent, and the output is the Q value of the agent's action. The agent chooses the action with the largest Q value to reach the target point from the starting point without collision.

[0067] During the training process, the system will detect whether there are invalid actions that may cause collisions or deadlocks before the agent performs actions. Once such invalid actions are detected, the system will impose penalties to reduce the selection frequency of these actions. For agents that are stuck in deadlock, the system will assign unique priorities and replan actions based on these priorities to solve the deadlock problem. In the present invention, the priority of the agent is dynamically assigned, depending on its progress in completing the task. In addition, the present invention also designs an internal reward mechanism to motivate the agent to explore the environment and accelerate task completion. When the agent is far away from the starting point and close to the target point, the system believes that it is conducting effective exploration and gives internal rewards to promote the rapid completion of the task.

[0068] Compared with the prior art, the present invention has the following characteristics.

[0069] The present invention not only considers the effectiveness and efficiency of the path, but also introduces priority planning and communication strategies to enhance the coordination between agents. In this way, even in an environment with a large number of agents, it can effectively reduce conflicts and deadlocks and improve the overall performance of the system.

[0070] The present invention also considers the dynamic obstacles that the agent may encounter when performing path planning. In real-world applications, the environment is often constantly changing, and the agent needs to be able to quickly adapt to environmental changes and make corresponding adjustments. Therefore, the path planning mechanism of the present invention not only needs to take these issues into consideration during design, but also needs to be able to dynamically adjust the path during runtime to cope with possible obstacles and changes in the actions of other agents.

[0071] The multi-agent path planning technology of the present invention provides a comprehensive and effective solution by comprehensively considering multiple aspects such as path optimization, conflict avoidance, communication strategy and dynamic environment adaptation. The implementation of this technology will greatly improve the performance and reliability of multi-agent systems in various application scenarios, especially in those occasions with high requirements for real-time and accuracy.

[0072] Specifically, the present invention provides a multi-agent path planning (MAPF) solution based on a partially observable Markov decision process (POMDP), which aims to optimize the behavior strategy of agents under local information constraints. In this framework, each agent can only observe a part of the current environment and select its action through an action strategy based on this local vision. All agents then execute the selected actions synchronously and obtain new rewards and environmental observations based on the results of the actions. In order to solve the problem of limited global information, the present invention adopts a Dueling deep Q network (DuelingDQN) enhanced by a recurrent unit. The network maps local observations and communication information to the Q value of the action in an end-to-end manner. When training a distributed model, the problem of local information limitation is solved through communication between agents, and the collaborative cooperation missing in the communication-free model is promoted.

[0073] Further, refer to Figure 1 and Figure 3 , the step S200 also includes:

[0074] The obstacle position information, other agent position information and target position information in the local field of view of the agent are converted into binary matrix forms respectively;

[0075] Among them, the size of the agent's perception information is a 1X1 observation map;

[0076] The obstacle position information is recorded in the obstacle map, the other agent position information is recorded in the other agent map, and the target point position information is recorded in the target point map; in the obstacle map, the coordinate value of the position with obstacles is set to 1, and the coordinate value of the position without obstacles is set to 0; in the other agent map, the coordinate value of the position with other agents is set to 1, and the coordinate value of the position without other agents is set to 0; in the target point map, if the target point is within the field of view of the current agent, the coordinate value of the position where the target point is located is set to 1, and the coordinate values ​​of other positions are set to 0; if the target point is not within the field of view of the current agent, the coordinate value of the projection position of the target point at the boundary of the field of view of the current agent is set to 1, and the coordinate values ​​of other positions are set to 0.

[0077] Specifically, the recurrent unit enhanced Dueling deep Q network structure (Dueling DQN) includes three main modules: a feature processing module, a communication module and a Q network module. The feature processing module consists of eight convolutional units and one gated recurrent unit (GRU). The eight convolutional units are organized into three residual modules and two independent convolutional modules, and each residual module contains two convolutional layers. In order to guide the agent to move toward the target point more quickly, the present invention integrates trajectory prediction into path planning. The model input is expanded from the traditional three-channel mode to the six-channel mode. The three newly added channels are based on the position of the agent after the next three actions predicted by the A algorithm, and the existence of other agents is not considered in the path planning of the A algorithm. This design enables the agent to describe the environment more accurately in the local field of view, so as to reach the target location faster and minimize collisions.

[0078] Specifically, refer to Figure 2 ,The Q network structure includes a feature processing module, a communication module and a Q network module which are connected in sequence.

[0079] The feature processing module includes 8 convolutional units and a first GRU unit connected in sequence, wherein the 8 convolutional layers include a first convolutional unit (Conv2D+ReLU), a first residual unit (Resnet1), a second residual unit (Resnet2), a third residual unit (Resnet3) and a second convolutional unit (Conv2D+ReLU) connected in sequence, and the first residual unit (Resnet1), the second residual unit (Resnet2) and the third residual unit (Resnet3) are each composed of two convolutional layers connected in sequence.

[0080] Agent a i The local observation map and heuristic channel of the current time step Input feature processing module, where Contains 8 information channels, and after being processed by 8 convolution units, a higher-dimensional feature vector is obtained Then the first GRU unit receives and hidden state After that, the intermediate feature vector containing time series information is output in It is the feature after the communication between agents in the previous time step. The processing of the first GRU unit allows the agent to sort out past information according to time, so that the action strategy can be better optimized.

[0081] The communication module is a graph convolutional network including the second GRU unit, and the agent's own feature vector With neighboring agents within the communication range (denoted by N i Represents agent a iother agents within the communication range) First, graph convolution is used to aggregate, indicating that the agent communicates with neighboring agents to obtain the intermediate vector In the graph convolution aggregation module, the agent first calculates the correlation between its feature vector and the feature vectors of other neighboring agents, that is, assigns a correlation weight to the feature vectors of the neighboring agents, and then aggregates the weighted feature information to obtain the intermediate vector, which is used as the hidden state and feature vector. They are input into the second GRU unit together, and the final information features are obtained after multiple cycles. Information characteristics It will be used as a hidden feature by the feature processing module at the next moment.

[0082] Finally, information features It is input into the Q network module to calculate the Q value of each action. The information features are mapped to the Q values ​​of five actions in the fully connected layer, and then the agent selects the action with the largest Q value to execute.

[0083] The perception information of the agent is an observation map of size 1X1. The perception information is decomposed into three channels to represent the obstacle position, the position of other agents and the position of the target point in the local field of view of the agent, and converted into three binary matrices. The obstacle coordinates in the obstacle map are set to 1, otherwise they are set to 0. The coordinates of other agents in the other agent map are set to 1, otherwise they are set to 0. In the target point map, if the target point is within the field of view, the target point coordinates are set to 1. If it is not within the field of view, the projection of the target point position on the field of view boundary is set to 1, and the other coordinates are set to 0. The A* algorithm is used to calculate the position coordinates of the next three steps from the current position of the agent to the target point, and then the coordinates corresponding to the next three steps are set to 1 in the three binary matrices, and the other positions are set to 0. By adding three channels, based on the position of the agent after the future action is executed obtained by the A* algorithm, the agent can plan the path more intelligently, avoid conflicts, and achieve efficient and safe collaboration.

[0084] Reference Figure 3, the white grid area is the area where the agent is allowed to pass or occupy, the black area is the obstacle area, the colored area number is the starting point of the agent, the colored G area is the target position of the agent, and the colored unnumbered area is the ideal running trajectory of the agent, which is calculated by the A* algorithm. The local observation map of the agent is divided into three channels, which are three binary matrices representing the position of obstacles, the positions of other agents, and the position of the agent's own target point. Among them, if the target point of the agent is not within the field of view, then the position of the target point is represented by the projection on the boundary of its field of view. The local map is centered on the coordinates of the agent, and the area size is limited to l×l. Taking agent a0 as an example, the field of view is limited to 3×3. The yellow border is the local observation area of ​​agent a0, that is, the perception information of the agent. The perception information of the agent can be decomposed into six channels:

[0085] (1) The first channel uses a binary matrix to represent the obstacle information within the agent’s field of view. With the position of agent a0 as the center, if there is an obstacle in the 3×3 map area, the coordinates corresponding to the obstacle are set to 1, otherwise they are set to 0.

[0086] (2) The second channel uses a binary matrix to represent the target point position information of the agent. If the target point of agent a0 is located in the 3×3 map area centered on the position of agent a0, the corresponding position of the target point is set to 1, and other positions are set to 0. If the target point of agent a0 is not within the field of view, the projection of the target point on the boundary of the field of view is set to 1, and other positions are set to 0.

[0087] (3) The third channel uses a binary matrix to represent the information of neighboring agents within the agent’s field of view. With the position of agent a0 as the center, if there are other agents in the 3×3 map area, the corresponding coordinates are set to 1, otherwise they are set to 0.

[0088] (4) The fourth channel uses a binary matrix to represent the coordinate position of the agent a0 at the next time step t+1 calculated by the A* algorithm within the agent's field of view.

[0089] (5) The fifth channel uses a binary matrix to represent the coordinate position of the agent a0 at the second time step t+2 calculated by the A* algorithm within the field of view of the agent.

[0090] (6) The sixth channel uses a binary matrix to represent the coordinate position of the agent a0 at the third time step t+3 calculated by the A* algorithm within the field of view of the agent.

[0091] Further, refer to Figures 1 to 3 , the step S300 includes:

[0092] The position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively expressed in the form of binary matrices;

[0093] Among them, the coordinate positions corresponding to the position coordinates of the first step in the future, the second step in the future, and the third step in the future are marked in the obstacle map, other intelligent agent map, and target point map, and the coordinate values ​​of the corresponding positions in the next three steps are set to 1, and the coordinate values ​​of other positions are set to 0.

[0094] Specifically, in step S400, agent a i The local observation map of the current time step Input feature processing module, after convolution processing, we get GRU unit receives The hidden state obtained by communicating with the previous time step Output feature vector The GRU unit enables the agent to integrate time series information and optimize action strategies.

[0095] Further, refer to Figures 1 to 3 In step S500,

[0096] The communication network is constructed between multiple agents based on GATv2, and is used to obtain feature information after time series processing.

[0097] Wherein, the communication network calculates characteristic information The correlation is:

[0098] e(h i ,h j )=a T LeakyReLU(W·[h i ||h j ])

[0099] Among them, h i and h j There are two agents a i and a j The characteristic information of e(h i ,h j ) is h i and h j , a and W are learnable parameters, and LeakyReLU is the activation function.

[0100] Specifically, in terms of communication, the present invention constructs a communication network based on the Transformer model. The communication network based on the Transformer model combines the graph convolutional network and the GRU unit to implement a dynamic attention mechanism. The present invention uses GATv2 to construct a communication network between agents to obtain information features after time series processing.

[0101] Agent a i The eigenvector of The feature vectors of neighboring agents Aggregated into intermediate vectors through graph convolution Again with Input into GRU unit together. After cyclic processing, information features are obtained The information feature is input into the Q network structure to calculate the action Q value, and the agent selects the action based on the maximum Q value.

[0102] Further, refer to Figures 1 to 3 In step S500, when training the Q network, an internal reward mechanism is included to motivate the agent to explore in the direction of the target point, and the internal reward mechanism is:

[0103]

[0104] in,

[0105] δ = 1 or 0,

[0106] If dist(πi[t-1], ti)>dist(πi[t], ti), δ=1, otherwise, δ=0;

[0107] π i [t] represents agent a i The coordinates at time t, s i and t i Respectively represent agent a i The starting point and end point, dist(π i [t-1], t i ) represents agent a i The distance between the coordinate at time t-1 and the end point, dist(π i [t],t i ) represents agent a i The distance between the coordinate at time t and the end point, dist(s i , t i ) represents agent a i The distance between the starting point and the end point.

[0108] Specifically, the internal reward mechanism motivates the agent to move toward the target point by comparing the change in the distance from the agent to the target point in two consecutive steps. If the distance from the agent to the target point decreases, the reward is positive; otherwise, it is zero. The internal reward mechanism encourages the agent to avoid wandering near the valid position and explore new states.

[0109] In each time step of the reward function, agents that fail to reach the target point after executing an action will be subject to a small penalty. If an agent reaches the target point, it will be rewarded to encourage it to reach the target quickly. However, agents that have point conflicts, edge conflicts, or are in deadlocks will be subject to larger penalties to avoid collisions and deadlocks. The round ends when all agents reach the target or the time reaches a threshold. To reduce deadlocks, additional penalties are imposed on agents when deadlocks are detected.

[0110] Further, refer to Figures 1 to 4 In step S600, it is determined whether the agent is in deadlock based on the cache. If the agent is in deadlock, the predicted action will be reselected based on the random strategy for the deadlocked agent, and the state of the current agent will be updated.

[0111] Specifically, after the predicted action is obtained, action detection will be performed. In the action detection stage, the system first determines whether the agent a i Whether it is deadlocked. The present invention uses a fixed-capacity buffer to record the position of the agent in the last five time steps. If the agent performs the predicted action, the position of the next time step π i [t+1] coincides with a position in the buffer, and there are more than two pairs of coincident coordinates in the buffer, the system determines that a deadlock has occurred. For deadlocked agents, the system will adopt a random strategy to reselect actions and update π i [t+1]. Next, the system checks π i Is [t+1] an invalid position, that is, check whether it is out of bounds or π i There is an obstacle at position [t+1]. If π i [t+1] is an invalid action, so it is set to π i [t]. If there is an edge conflict or point conflict with other agents, i [t+1] is marked as O. Finally, for π i The agent with [t+1]=O will replan the operation.

[0112] In Replan(a i ) process, first search for the adjacent position C i =Neigh(a i ), and for C i Nodes are separated by distance from the target point g iSort by distance and search in sequence. If the node v∈C i There is a conflicting agent a i , then skip the node. If there is a node with a lower priority than a at position v i Agent a j , then call Replan(a j ). If Replan(a j ) returns valid, then move a i ; Otherwise, continue searching. If a is successfully moved i , then Replan(a i ) returns valid; otherwise returns invalid and sets π i [t+1] is set to π i [t].

[0113] Specifically, the following is the pseudo code for replanning:

[0114]

[0115]

[0116] Further, refer to Figure 4 and Figure 5 In step S600, replanning the predicted action includes:

[0117] S610, sequentially search for the adjacent position C of the current agent i All agent nodes v, and each adjacent position C i The agent node v is based on the target point position g corresponding to the agent i The distances are sorted, among which,

[0118] C i =Neigh(a i ),

[0119] Neigh(a i ) is the agent a i The set of all neighboring agents within the field of view;

[0120] S620, if there is an intelligent agent node v∈C i Conflicting Agents j , then skip the node. If there is a node with a lower priority than agent a at the position of agent node v i Agent a j , then for a j Call replan (a j );

[0121] S630, if replanning Replan (a j) returns valid, then move a i , otherwise continue searching, if successful move a i , then replan Replan(a i ) returns valid;

[0122] S640, otherwise if Replan (a j ) returns invalid and resets the agent's state to the state at the previous moment.

[0123] Further, refer to Figure 1 and Figure 4 In step S600,

[0124] If the predicted action will cause the agent to cross the boundary, collide or deadlock, the action will be reselected; if the predicted action will conflict with other agents, the predicted action will be replanned to bring the agent into a new state.

[0125] Specifically, in order to reduce deadlock in the system, the present invention adds a detection mechanism for invalid actions and implements action replanning for agents that perform invalid actions. In the action detection link, the system first uses the buffer to determine whether the agent is in deadlock. For agents that are deadlocked, the system will adopt a random strategy to reselect actions and update the agent state. If an agent has an edge conflict or a point conflict with other agents, the system will perform a priority-based replanning operation.

[0126] Furthermore, the present invention also proposes a communication multi-agent path planning device based on priority replanning, which is used to implement a communication multi-agent path planning method based on priority replanning. The communication multi-agent path planning device based on priority replanning includes:

[0127] A host computer and at least one intelligent agent, wherein the intelligent agents work on a plane map, each intelligent agent can sense the local environment of its position on the plane map, and each intelligent agent is electrically connected to the host computer.

[0128] Furthermore, the present invention also proposes a computer-readable storage medium having program instructions stored thereon, and when the program instructions are executed by a processor, the communication multi-agent path planning method based on priority re-planning is implemented.

[0129] The present invention discloses a method combining reinforcement learning and a communication network with an attention mechanism, aiming to optimize the solution of multi-agent reinforcement learning problems. Multi-agent reinforcement learning (MARL) has become an effective tool for solving tasks with high real-time requirements due to its excellent generalization ability and fast computing speed, and has been widely studied and applied in multi-agent path finding (MAPF) problems. Nevertheless, when the density of agents is extremely high, the multi-agent path finding (MAPF) solver based on reinforcement learning still faces the difficulty of planning collision-free paths for agents. Most existing learning-based MAPF solvers tend to pause the movement of agents as an alternative action when potential collisions are predicted, and lack an effective coordination mechanism between agents, which may cause deadlock. The present invention is used to address this challenge. In addition, in order to reduce the incidence of deadlock in a high-density agent environment, the present invention designs a set of action detection and replanning strategies and also introduces an internal reward mechanism to encourage agents to explore the environment and accelerate their process of reaching the target position. Experimental verification shows that the proposed method significantly outperforms the existing advanced learning MAPF method in terms of accuracy, and performs comparable to solvers close to the optimal solution in multiple environments.

[0130] It should be appreciated that the method steps in the embodiments of the present invention can be implemented or implemented by computer hardware, a combination of hardware and software, or by computer instructions stored in a non-transitory computer readable memory. The method can use standard programming techniques. Each program can be implemented in a high-level process or object-oriented programming language to communicate with a computer system. However, if necessary, the program can be implemented in an assembly or machine language. In any case, the language can be a compiled or interpreted language. In addition, the program can be run on a programmed ASIC for this purpose.

[0131] Furthermore, the operations of the processes described herein may be performed in any suitable order unless otherwise indicated herein or otherwise clearly contradicted by context. The processes described herein (or variations and / or combinations thereof) may be performed under the control of one or more computer systems configured with executable instructions, and may be implemented as code (e.g., executable instructions, one or more computer programs, or one or more applications) that is executed collectively on one or more processors, by hardware, or a combination thereof. The computer program includes a plurality of instructions that may be executed by one or more processors.

[0132] Further, the method can be implemented in any type of computing platform that is operably connected to a suitable computer, including but not limited to a personal computer, a minicomputer, a mainframe, a workstation, a network or distributed computing environment, a separate or integrated computer platform, or in communication with a charged particle tool or other imaging device, etc. Various aspects of the present invention can be implemented in machine-readable code stored on a non-transitory storage medium or device, whether removable or integrated into a computing platform, such as a hard disk, an optical read and / or write storage medium, a RAM, a ROM, etc., so that it can be read by a programmable computer, and when the storage medium or device is read by the computer, it can be used to configure and operate the computer to perform the process described herein. In addition, the machine-readable code, or portions thereof, can be transmitted via a wired or wireless network. When such media includes instructions or programs that implement the steps described above in conjunction with a microprocessor or other data processor, the invention described herein includes these and other different types of non-transitory computer-readable storage media. When programmed according to the methods and techniques of the present invention, the present invention can also include the computer itself.

[0133] The computer program can be applied to input data to perform the functions described herein, thereby converting the input data to generate output data stored in a non-volatile memory. The output information can also be applied to one or more output devices such as a display. In a preferred embodiment of the present invention, the converted data represents physical and tangible objects, including specific visual depictions of physical and tangible objects produced on the display.

[0134] The above is only a preferred embodiment of the present invention. The present invention is not limited to the above implementation. As long as the technical effect of the present invention is achieved by the same means, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the scope of protection of the present invention. Within the scope of protection of the present invention, its technical scheme and / or implementation method may have various modifications and changes.

Claims

1. A communication multi-agent path planning method based on priority replanning, applied to a communication multi-agent path planning device based on priority replanning, the communication multi-agent path planning device based on priority replanning comprising a host computer and at least one agent, the agent works on a plane map, each agent can perceive the local environment of its position on the plane map, each agent is electrically connected to the host computer, It is characterized in that The communication multi-agent path planning method based on priority replanning comprises the following steps: S100, initializing the plane map environment and assigning different starting points and end points to all agents; S200, acquiring the perception information of the intelligent agent, and decomposing the perception information of the intelligent agent into obstacle position information, other intelligent agent position information and target point position information in the local field of view of the intelligent agent; S300, based on the A* algorithm, calculating the position coordinates of the first step in the future, the second step in the future, and the third step in the future when the agent moves from the current position to the target position; S400, the obstacle position information, other agent position information, target point position information, the position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively input into the Q network structure, and the Q network structure extracts the feature information of the agent's perception information to obtain feature information S500: feature information of the agent and its neighboring agents Input into the communication network, the communication network calculates the characteristic information The correlation is the feature information of neighbor agents Assign weights to obtain weighted feature information of neighboring agents, aggregate the weighted feature information of all neighboring agents to obtain aggregated feature information, map the aggregated feature information into upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value through the Q network structure, and the agent selects the action with the largest Q value among the upward action Q value, downward action Q value, left action Q value, right action Q value and stationary action Q value as the predicted action; S600: Perform an invalidity check on the predicted action. If the predicted action passes the invalidity check, the agent executes the predicted action.

2. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that The step S200 also includes: The obstacle position information, other agent position information and target position information in the local field of view of the agent are converted into binary matrix forms respectively; Among them, the size of the agent's perception information is a 1X1 observation map; The obstacle position information is recorded in the obstacle map, the other agent position information is recorded in the other agent map, and the target point position information is recorded in the target point map; in the obstacle map, the coordinate value of the position with obstacles is set to 1, and the coordinate value of the position without obstacles is set to 0; in the other agent map, the coordinate value of the position with other agents is set to 1, and the coordinate value of the position without other agents is set to 0; in the target point map, if the target point is within the field of view of the current agent, the coordinate value of the position where the target point is located is set to 1, and the coordinate values ​​of other positions are set to 0; if the target point is not within the field of view of the current agent, the coordinate value of the projection position of the target point at the boundary of the field of view of the current agent is set to 1, and the coordinate values ​​of other positions are set to 0.

3. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that The step S300 includes: The position coordinates of the first step in the future, the position coordinates of the second step in the future, and the position coordinates of the third step in the future are respectively expressed in the form of binary matrices; Among them, the coordinate positions corresponding to the position coordinates of the first step in the future, the second step in the future, and the third step in the future are marked in the obstacle map, other intelligent agent map, and target point map, and the coordinate values ​​of the corresponding positions in the next three steps are set to 1, and the coordinate values ​​of other positions are set to 0.

4. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that In step S500, The communication network is constructed between multiple agents based on GATv2, and is used to obtain feature information after time series processing. Wherein, the communication network calculates characteristic information The correlation is: e(h i h j )=a T LeakyReLU(W·[h i ||h j ]) Among them, h i and h j There are two agents a i and a j The characteristic information of e(h i ,h j ) is h i and h j , a and W are learnable parameters, and LeakyReLU is the activation function.

5. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that In step S500, when the Q network is trained, an internal reward mechanism is included to motivate the agent to explore in the direction of the target point. The internal reward mechanism is: in, δ = 1 or 0, If dist(π i [t-1],t i )>dist(π i [t],t i ), δ=1, otherwise, δ=0; π i [t] represents agent a i The coordinates at time t, s i and t i Respectively represent agent a i The starting point and end point, dist(π i [t-1],t i ) represents agent a i The distance between the coordinate at time t-1 and the end point, dist(π i [t],t i ) represents agent a i The distance between the coordinate at time t and the end point, dist(s i ,t i ) represents agent a i The distance between the starting point and the end point.

6. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that In the step S600, it is determined whether the agent is in a deadlock based on the buffer. If the agent is in a deadlock state, for the deadlocked agent, the predicted action will be reselected based on the random strategy and the state of the current agent will be updated.

7. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that In step S600, re-planning the predicted action includes: S610, sequentially search for the adjacent position C of the current agent i All agent nodes v, and each adjacent position C i The agent node v is based on the target point position g corresponding to the agent j The distances are sorted, among which, C i =Neigh(a i ), Neigh(a i ) is the agent a i The set of all neighboring agents within the field of view; S620, if there is an intelligent agent node v∈C i Conflicting Agents j , then skip the node. If there is a node with a lower priority than agent a at the position of agent node v i Agent a j , then for a j Call replan (a j ); S630, if replanning Replan (a j ) returns valid, then move a i , otherwise continue searching, if successful move a i , then replan Replan(a i ) returns valid; S640, otherwise if Replan (a j ) returns invalid and resets the agent's state to the state at the previous moment.

8. The communication multi-agent path planning method based on priority replanning according to claim 1, It is characterized in that In step S600, If the predicted action will cause the agent to cross the boundary, collide or deadlock, the action will be reselected; if the predicted action will conflict with other agents, the predicted action will be replanned to bring the agent into a new state.

9. A communication multi-agent path planning device based on priority replanning, used to implement the communication multi-agent path planning method based on priority replanning as claimed in any one of claims 1 to 8, It is characterized in that The communication multi-agent path planning device based on priority re-planning comprises: A host computer and at least one intelligent agent, wherein the intelligent agents work on a plane map, each intelligent agent can sense the local environment of its position on the plane map, and each intelligent agent is electrically connected to the host computer. 10 . A computer-readable storage medium having program instructions stored thereon, wherein the program instructions are executed by a processor to implement the method according to claim 1 .

Citation Information

Cited By

  • Multi-agent conflict coordination method and device, equipment and medium

    CN120579575A

  • Multi-agent conflict coordination method and device, equipment and medium

    CN120579575B

  • Multi-agent cooperation method and device based on MCP mechanism and medium

    CN120893590A

  • Robot cluster collaborative collision avoidance method and device for electric power system inspection

    CN121165716A