Multi-agent path planning method based on deep reinforcement learning
By introducing the GRU module into the MADDPG algorithm, it captures the importance differences between agents, solves the problem of difficulty in capturing collaboration and long-term dependencies in multi-agent path planning, improves the efficiency and performance of path planning, and is suitable for complex environments. multi-agent systems in .
Patent Information
- Application Number
- CN202410586711.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-12
- Publication Date
- 2024-08-23
AI Technical Summary
It is difficult to capture the collaboration and long-term dependencies between agents in traditional multi-agent path planning tasks, resulting in poor performance in complex environments.
Integrate the gated recurrent unit (GRU) module into the multi-agent deep deterministic policy gradient (MADDPG) algorithm. The GRU module captures the importance differences between agents, dynamically adjusts agent behavior, and improves the efficiency and performance of path planning. .
It effectively captures the importance differences between agents, achieves more efficient multi-agent path planning, improves the performance and efficiency of the system, and is suitable for fields such as intelligent traffic management, collaborative robots and drone formations.
Smart Images

Figure FT_1 
Figure FT_2 
Figure FT_3
Abstract
Description
Technical Field
[0001] The present invention relates to the field of reinforcement learning, and in particular to algorithms and methods applied to multi-agent path planning tasks. Specifically, the present invention relates to a method for integrating a gated recurrent unit (GRU) module into a multi-agent deep deterministic policy gradient (MADDPG) algorithm to improve the performance and efficiency of a multi-agent system in path planning tasks. Background Art
[0002] Traditional multi-agent path planning tasks usually involve collaboration and communication issues between agents, as well as difficulties in capturing long-term dependencies. In such tasks, agents need to coordinate actions in complex environments to achieve common goals, such as avoiding collisions or reaching a destination. However, due to the dynamics of the environment and the mutual influence between agents, traditional path planning methods often have difficulty in dealing with them effectively.
[0003] In recent years, the development of deep reinforcement learning technology has provided a new way to solve multi-agent path planning tasks. Among them, the MADDPG algorithm is a commonly used method, which is based on the deep deterministic policy gradient (DDPG) algorithm and solves the cooperation problem in multi-agent systems through collaborative learning. However, the performance of the MADDPG algorithm is limited by the importance differences between agents, resulting in its poor performance in complex environments.
[0004] Therefore, a new method is needed to improve the performance of the MADDPG algorithm in multi-agent path planning tasks. The present invention aims to capture the importance differences between agents and achieve more effective multi-agent path planning by integrating the gated recurrent unit (GRU) module into the MADDPG algorithm. Summary of the invention
[0005] The present invention provides a reinforcement learning method for multi-agent path planning tasks, and a corresponding multi-agent deep deterministic policy gradient (MADDPG) algorithm model embedded with a gated recurrent unit (GRU) module. The method and model are designed to solve the communication and learning difficulties between agents in traditional multi-agent path planning tasks, as well as the problem of capturing long-term dependencies, thereby improving the performance and efficiency of the system.
[0006] Specifically, the key features of the present invention include: (1) Use sensors to obtain environmental information about the physical world, including the location of the agent, the location of the target, and the location of obstacles, in order to build an environmental model; (2) Abstract environmental information into mathematical expressions, construct state space and action space, and provide a basis for the decision-making of the intelligent agent; (3) Train the MADDPG algorithm model embedded with the GRU module, where the GRU module is used to capture the importance differences between agents and dynamically adjust the behavior of the agents based on these differences; (4) The MADDPG algorithm outputs the action trajectory of the agent to achieve coordination and path planning among multiple agents and ultimately achieve the goal of the system.
[0007] The method and model of the present invention overcome the challenges in traditional multi-agent path planning tasks and provide a more effective solution for the fields of intelligent traffic management, collaborative robots, drone formations, etc. By integrating the MADDPG algorithm with the GRU module, the present invention can better understand the importance differences between agents and achieve more efficient multi-agent path planning, which has important application prospects and commercial value. BRIEF DESCRIPTION OF THE DRAWINGS
[0008] The accompanying drawings are used to better understand the present solution and do not constitute a limitation of the present disclosure.
[0009] Figure 1 It is a flow chart for realizing the present invention;
[0010] Figure 2 This is a diagram of the architecture of the GRU module embedded in the present invention;
[0011] Figure 3 This is a diagram of the MADDPG algorithm training framework in the present invention; DETAILED DESCRIPTION
[0012] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only 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.
[0013] like Figure 1The implementation process of the present invention is shown. Step 1 Before starting training, it is necessary to use sensors to obtain environmental information of the physical world. This information includes the current position of the agent, the target position, and the possible obstacle position, etc. The environmental information obtained will be abstracted into mathematical expressions to construct the state space and action space. Step 2 Embed the GRU module in the MADDPG algorithm model to capture the importance differences between agents. The parameters of the entire model will be trained through back propagation and optimization algorithms. Step 3 The agent will be trained according to the current environmental state and adjust its strategy according to the reward signal. Through interaction with the environment, the agent will gradually learn the optimal action strategy to achieve the goal of the path planning task. Step 4 After a certain training cycle, the MADDPG algorithm will output the action trajectory of the agent, which is the best path planning solution obtained after optimization based on the agent's strategy and environmental state. These action trajectories will be used to achieve coordination and path planning between multiple agents.
[0014] In the implementation of step 1 above, it is assumed that there are n agents, and the position of each agent i is represented by a two-dimensional coordinate (x i ,y i ) means, where x i and i Represent the horizontal and vertical positions of agent i respectively. Therefore, the current position of agent i can be expressed as (x i ,y i ). The target position of each agent is usually set in advance, but can also be changed dynamically according to the task. The target position can be expressed as (x target-k ,y target-k ), where x target-k and target-k Represent the horizontal and vertical positions of target k respectively. There may be some obstacles in the environment that may affect the movement of the agent. Assuming there are m obstacles, the position of each obstacle j can be expressed in two-dimensional coordinates (x j ,y j ) means, where x j and j represent the horizontal and vertical positions of obstacle j respectively. Therefore, the position of obstacle j can be expressed as (x j ,y j ). Combining the above information, the entire environment can be represented by a tuple, including the current position of the agent, the target position, and the position of the obstacle, that is, the environment information = ((x i ,y i ), (x target-k ,y target-k ), (x j ,y j )).
[0015] like Figure 2 The GRU module in step 2 shown is embedded before the experience replay pool of the MADDPG model. The GRU module relies on the calculation of environmental information to identify agents that contribute more to the overall task in the multi-agent path planning task. This module determines the importance of each agent in the current environment using a specific algorithm or method by analyzing environmental information, including the agent's current position, target position, and possible obstacle positions. The importance partitioning module can evaluate factors such as the agent's position, the distance to the target position, and the interaction with other agents, and feed the results back to the MADDPG algorithm to adjust the agent's behavior strategy and priority, thereby maximizing the efficiency and performance of the entire task.
[0016] In the exploration and discovery phase of the MADDPG algorithm, the agent continuously interacts with the environment and stores the interaction results in the experience replay pool. At time t, the agent obtains an observation of the current state of the environment. Each agent takes an action based on its own observations and its current strategy. i .a i It will be transmitted in two directions. First, the action acts on the environment, and the state of the environment changes to time t+1. The state at this moment can still be observed by the agent, that is, On the other hand, in addition to the Actor network that generates actions based on environmental observations, each agent also has a Critic network that can evaluate the benefits of the current action. The Critic network receives observations of the environmental state at time t. and the action a taken by the agent on this observation i , generate the payoff r of the corresponding action at time t i .
[0017] In a time step t, the input data of the GRU network is the joint observation state O of the agent. t The output h of the previous time step t-1 It mainly consists of two different gate control units: reset gate r t With update gate z t The two rely on different weight values to decide to remember the output h of the previous time step. t-1 The output is shown in the following two equations: t =Sigmoid(W r ·[h t-1 , O t ]), z t =Sigmoid(W z ·[h t-1 , O t ]). Where W r and W zis the weight of the gating unit network, O t is the joint observation state of the agent, h t-1 is the GRU network output at the previous moment. The data output by the reset gate and update gate is re-integrated by the tanh neural network layer. The output of the tanh layer Where W represents the weight matrix, r t is the reset gate output, h t-1 is the output of the previous time step, O t is the joint observation state of the agent. The complete output of the GRU layer is determined by the joint output of the reset gate, update gate and tanh layer. Where z t is the update gate output, h t-1 is the output of the previous time step, is the output of the tanh layer. The weight matrix h of the GRU layer output t After adjustment by the fully connected layer, the output is the weight vector of the overall reward of each agent to the environment. The agent continuously interacts with the environment according to the current strategy until the termination state, during which the observation of the environment state at time t is The action taken by the agent a i , the benefit r of the corresponding action at time t i The five-tuple consisting of the generated t+1 time environment state observation and the agent importance vector output by GRU constitutes the data element of the exploration and discovery phase. The interaction between the agent and the environment ends at a certain agreed state. The whole process includes several steps, each of which forms a five-tuple data element. The data elements of all steps of an exploration round are recorded in order to form a data sequence. These data sequences will be stored in the experience replay pool for use in the next stage.
[0018] like Figure 3 The figure shows the model training phase of MADDPG. The agent no longer interacts with the environment, but only extracts data from the experience replay pool to update the neural network. Historical samples are randomly extracted from the experience replay pool, and the environmental observations at time t and the actions taken by the agent in history are separated from each piece of data, and submitted to the Actor network to generate new actions. The environmental observations at time t, the actions taken by the agent in history, and the observations after the state transition of the environment are separated from the historical samples, and the Critic network of the agent is updated. The updated Critic network evaluates the new actions generated by the Actor network, generates the benefits of the new actions, and uses this benefit to complete the update of the Actor network. The Actor network and the Critic network are repeatedly updated using a large number of historical samples until the two converge, completing the centralized training of the MADDPG model.
[0019] The critic network of each agent consists of two parts: the local critic network and the target critic network, which are used to receive and process the joint observation state O. t With joint action A t The loss function of the local critic network uses mean square error, which can be expressed as: Where t is the current time step, is the action value function, W i t is the current Critic network parameter, is the corresponding target value, expressed as: Where r i is the action reward value, and γ is the discount factor. Further, the stochastic gradient descent method is used to update the parameters of the local Critic network, which is expressed as: Where W i t+1 is the network parameter at time step t+1, and α is the network learning rate.
[0020] The target critic network is used to maintain the stability of the local critic network. The parameters of the target network are gradually updated to the parameters of the local network using a soft update method to reduce the mutation of the update. The update process can be expressed as: i t′ =τW i t +(1-τ)W i t′ . Where W i t′ is the target network parameter, W i t are the local network parameters, and τ is the update rate. First, the parameters of the target network are initialized to the same values as those of the local network. In each update step, the difference between the local network parameters and the target network parameters is calculated and weightedly integrated into the parameters of the target network at a certain update rate, so that the parameters of the target network are gradually brought closer to the parameters of the local network.
[0021] The Critic network of the agent is used to obtain the joint actions of the agent and output the corresponding value function. Even if the agent strategy changes, the stability is not affected. Similarly, each agent also has an independent Actor network, including a local Actor network and a target Actor network, to receive local observation states of the environment. Local Actor Network can take advantage of Output Action In the formula is the current Actor network parameter. Using the gradient ascent method, update the local Actor network parameters, expressed as: In the formula is the policy gradient of the current Actor network. Target Actor network parameters The role and update method of are similar to those of the target Critic network, expressed as: Where τ is a constant.
[0022] After training, each agent can Make decisions independently and achieve distributed execution in application scenarios.
[0023] Preferably, the structure of the Actor network includes an input layer, a hidden layer, a fully connected layer, and an output layer. The input layer obtains the agent's observation of the environment. The input layer is connected to the hidden layer, and the hidden layer contains three fully connected layers. Fully connected layer 1 is directly connected to the input layer, and fully connected layer 3 is connected to the output layer. Fully connected layer 1 and fully connected layer 3 have 100 neurons, and fully connected layer 2 has 200 neurons. The activation function of the hidden layer uses Relu. The activation function of the output layer uses tanh, which outputs the action taken by the agent under the current environmental observation.
[0024] Preferably, the structure of the Critic network consists of an output layer, a hidden layer and an output layer. The input layer inputs the observation of the current environment and the action of the agent generated by the Actor network. The hidden layer consists of three fully connected layers. The fully connected layer 1 contains 100 neurons, 50 of which are connected to the environmental observation of the input layer, and the other 50 are connected to the agent action. The fully connected layer 2 has 200 neurons, the fully connected layer 3 has 100 neurons, and the activation function of the hidden layer is Relu. The output layer outputs the reward for the action taken by the agent under the current environmental observation.
[0025] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered exemplary and non-limiting in all respects, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations falling within the meaning and scope of the equivalent elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A reinforcement learning method for multi-agent path planning tasks, characterized in that The following steps are involved: (1) Use sensors to obtain environmental information about the physical world, including the location of the agent, the target, and obstacles; (2) Abstract environmental information into mathematical expressions and construct state space and action space; (3) Training the Multi-Agent Deep Deterministic Policy Gradient (MADDPG) algorithm model embedded with the Gated Recurrent Unit (GRU) module; (4) The MADDPG algorithm outputs the action trajectory of the agent to achieve coordination and path planning among multiple agents.
2. The method according to claim 1, wherein the gated recurrent unit (GRU) module in the step is used to capture the importance differences between agents and adjust the behavior of the agents based on these differences.
3. The method according to claim 1 or 2, wherein during the training process, the agent updates its strategy based on the environment information and the output of the GRU module to maximize the expected reward.
4. The method according to any one of claims 1 to 3, wherein the action trajectory of the agent is based on the agent's strategy and environmental state, and the optimal path planning solution is obtained after optimization by the MADDPG algorithm.
5. A multi-agent deep deterministic policy gradient (MADDPG) algorithm model embedded with a gated recurrent unit (GRU) module, characterized by: (1) Includes an Actor network for decision-making by intelligent agents; (2) Includes a Critic network for evaluating the value of the agent; (3) Integrate the GRU module to capture the importance differences between agents; (4) During the training process, environmental information and the output of the GRU module are used to update the agent's strategy and value function parameters.
6. The model according to claim 5, wherein the GRU module receives the state and action of the agent as input and outputs an importance score to guide the behavior of the agent.
7. A model according to claim 5 or 6, wherein the Critic network is used to evaluate the value of the agent's action trajectory and provide feedback signals to the Actor network to optimize the agent's strategy.
8. A computer-readable storage medium storing a computer program according to any one of claims 5 to 7 of the multi-agent deep deterministic policy gradient (MADDPG) algorithm model, characterized in that When this computer program is executed, it is possible to implement a reinforcement learning method for a multi-agent path planning task.
Citation Information
Cited By
Logistics rapid distribution analysis system based on artificial intelligence
CN119809074A
A logistics rapid delivery analysis system based on artificial intelligence
CN119809074B
Formation train risk decision control method and system in partially observable environment
CN120069523A
