Unmanned aerial vehicle and vehicle path planning method based on multi-agent deep reinforcement learning
By using a multi-agent deep reinforcement learning framework, collaborative decision-making and information sharing between drones and vehicles are achieved, which solves the shortcomings of traditional path planning methods in dynamic environments, generates efficient collaborative delivery paths, and reduces logistics operating costs.
Patent Information
- Application Number
- CN202611416601.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-14
- Publication Date
- 2026-11-27
AI Technical Summary
Traditional route planning methods struggle to cope with the dynamic changes and uncertainties of drones and vehicles in complex and ever-changing environments, resulting in low delivery efficiency.
A path planning method based on multi-agent deep reinforcement learning is adopted. Through encoder-decoder structure, attention mechanism and mask communication mechanism, collaborative decision-making and information sharing between UAV and vehicle are realized to avoid selection conflict. The policy gradient is optimized by combining centralized commentator network and baseline function.
It improves the coordination and solution quality of path planning, generates better collaborative delivery paths, reduces total delivery time, and lowers logistics operating costs.
Smart Images

Figure CN123180880A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of logistics and distribution, and in particular to a method for unmanned aerial vehicles and vehicle path planning based on multi-agent deep reinforcement learning. Background Technology
[0002] In the logistics and delivery sector, the application of drones and autonomous vehicles is becoming increasingly widespread with the continuous development of these technologies. However, achieving efficient collaboration between drones and vehicles has become a critical issue that urgently needs to be addressed. Traditional route planning methods often struggle to cope with dynamic changes and uncertainties in complex and ever-changing environments. For example, real-time changes in traffic conditions, temporary adjustments to delivery tasks, and interference from environmental factors all significantly reduce the effectiveness of traditional methods.
[0003] The rise of multi-agent deep reinforcement learning has provided new ideas and approaches to solving this problem. It enables multiple agents (drones and vehicles) to continuously optimize their behavioral strategies through mutual cooperation and learning in complex environments, thereby better adapting to various changing situations and improving delivery efficiency and overall performance. Summary of the Invention
[0004] The purpose of this invention is to solve the above problems by designing a path planning method for UAVs and vehicles based on multi-agent deep reinforcement learning.
[0005] This invention provides a path planning method for UAVs and vehicles based on multi-agent deep reinforcement learning, comprising the following steps: Step S1: Obtain environmental status information, which includes the warehouse location, the location of unserved customer nodes, the current location of each agent, and the remaining distance for each agent to reach its target node. Step S2: Configure the multi-agent task and distribute the environmental state information to each agent. The information obtained by each agent is its local observation value, which does not include the position information of other agents. Step S3: Each agent encodes its local observations and extracts hidden feature information; Step S4: Each agent calculates the selection probability of each candidate target node based on the implicit feature information according to its policy network, so as to determine the action strategy of the next target node. Step S5: All agents select the next target node according to their respective action strategies, and communicate with each other after selection to share the selected node information, so as to avoid multiple agents selecting the same node. Step S6: Based on the node sequence selected by each agent in each step, generate a complete collaborative delivery path that starts from the warehouse, traverses all customer nodes, and returns to the warehouse.
[0006] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, in the multi-agent task, each agent is considered to be making Markov decisions, and its observations are the set of nodes visited by any agent before time t. The target nodes of the truck and the drone at time t At time t, the truck and drone reach the previous node position before the target node. and The travel time required for the truck and drone to reach the target node at time t. and This means, that is: .
[0007] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, in step S5, each truck and UAV decides its next destination at each step. If it is still in transit and the remaining time is greater than 0, it cannot change its destination and can only continue to the destination selected at the previous moment. After all agents have made their actions, the remaining time required for each agent to reach its respective destination is calculated. / , Let be the time required for the i-th truck to reach its destination at time t. Let the minimum time required for the i-th drone to reach its destination at time t be taken as the travel time for that step.
[0008] Update the remaining time of other vehicles The set of nodes reached and vehicle target node .
[0009] Furthermore, in the aforementioned drone and vehicle path planning method based on multi-agent deep reinforcement learning, T is set as the total number of environmental updates during the period from the drone and truck departing from the warehouse, serving all customers, and returning to the warehouse, and the cost function is the total time spent in the entire transportation process:
[0010] Where C represents the total cost, t represents the index of the decision time step, and T represents the total number of environment updates. This represents the travel time at step t.
[0011] Furthermore, in the above-mentioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, an encoder-decoder structure is used to generate agent policies; The encoder part preprocesses the node coordinates and feeds them into L attention layers. Each attention layer contains a multi-head attention layer and a forward feedback layer. In the decoder section, each agent selects its own policy in turn and passes information to prevent nodes from being selected repeatedly. Each agent has the same but independent decoder structure and does not share parameters with other agents.
[0012] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, the encoder part performs a linear transformation on the node coordinates. Preprocessing is performed to obtain the initial embedding. :
[0013] in and These are learnable parameters; The initial embedding is passed to L attention layers. The attention mechanism is used to calculate the embedding value and graph embedding of each node. The average value of all node embeddings is used as the graph embedding of the graph.
[0014] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, the decoder part will process the previously selected node's... The embedded data is fed into the LSTM and processed according to the following formula:
[0015]
[0016] in , Let represent the hidden state and neuron state at time t, respectively, and p be the dropout probability. Then, using the LSTM hidden state, graph embedding, and travel time from the agent's current node to other nodes as input, the attention vector between node i and other nodes is calculated. :
[0017] Where i represents the current position coordinates of the agent. This represents the time it takes for the agent to travel from node i to other nodes in the graph. , and These are trainable parameters; Finally, the softmax function is used to define the state. The probability of selecting node j as the next node is obtained below. :
[0018] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, the multi-agent information exchange methods include: After one agent makes a choice, other agents update the mask selection mask and mark the selected node as unreachable. After all agents have made their selections, the environment is globally updated based on the decisions of all agents, changing the observations of each agent to reflect the latest state of the environment. During the centralized training phase, the critic network evaluates its own agent's solution based on the solutions of other agents to guide policy adjustments.
[0019] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, a random sampling strategy is adopted during the training phase to randomly select nodes according to their probability distribution, thereby enhancing the algorithm's search performance; during the formal evaluation phase, the node with the highest probability is selected as the decision result.
[0020] Furthermore, in the aforementioned UAV and vehicle path planning method based on multi-agent deep reinforcement learning, a loss function is defined. ,in, This represents the total time spent on path π. The REINFORCE gradient calculation method is used and a baseline is introduced. The loss function is optimized using gradient descent. It is the probability distribution of the path π generated by the policy network. The baseline value output by the commentator network:
[0021] In distributed execution and centralized training, the input to the critic network, in addition to the nodes it selects and the actual time cost, also includes nodes selected by other agents. It generates graph embeddings based on its own paths and those of other agents. The set is obtained by embedding and stitching together the graphs of all agents. The data is fed into a linear layer for prediction, and the network is updated based on the actual time cost.
[0022]
[0023] Where θ represents the policy network parameters, s represents the environmental state, and π represents the complete delivery path generated by the agent. This represents the total time consumed for path π. Policy network generation path The probability distribution, The baseline value output by the critic network. For the graph embedding of the i-th agent, The weighted sum of graph embeddings for all agents. , , , , , All of these are learnable parameters.
[0024] Compared with existing technologies, the advantages of this invention are as follows: This invention utilizes a multi-agent deep reinforcement learning framework to achieve collaborative decision-making and information sharing between drones and vehicles, effectively addressing dynamic changes and uncertainties in logistics delivery scenarios and solving the problem that traditional path planning methods struggle to adapt to real-time adjustment requirements. This invention employs an encoder-decoder structured policy network, combined with attention and mask communication mechanisms, to avoid multi-agent selection conflicts and improve the coordination and solution quality of path planning. The introduction of a centralized critic network and baseline function reduces the variance of policy gradient estimation and accelerates model convergence. Compared with traditional path planning methods, this invention can generate superior collaborative delivery paths in a shorter time, effectively reducing total delivery time and logistics operating costs, providing an efficient and feasible technical solution for drone and vehicle-based mixed delivery scenarios. Attached Figure Description
[0025] Figure 1 This is a flowchart illustrating the path planning method for UAVs and vehicles based on multi-agent deep reinforcement learning in an embodiment of the present invention. Detailed Implementation
[0026] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0027] Those skilled in the art will understand that, unless specifically stated otherwise, the singular forms "one," "an," and "this" used herein may also include the plural forms. It should be further understood that the terminology used in this specification includes the presence of features, integers, steps, operations, elements, and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and / or groups thereof.
[0028] The present invention will now be described in detail with reference to the accompanying drawings. Figure 1 As shown, the UAV and vehicle path planning method based on multi-agent deep reinforcement learning includes the following steps: Step S1: Obtain environmental status information, including warehouse location, location of unserved client nodes, current location of each agent, and remaining distance for each agent to reach its target node. Step S2: Configure the multi-agent task and distribute the environmental state information to each agent. The information obtained by each agent is its local observation value, which does not include the position information of other agents. Step S3: Each agent encodes its local observations and extracts hidden feature information; Step S4: Each agent calculates the selection probability of each candidate target node based on its policy network and hidden feature information to determine the action strategy of the next target node. Step S5: All agents select the next target node according to their respective action strategies, and communicate with each other after selection to share the selected node information, so as to avoid multiple agents selecting the same node. Step S6: Based on the node sequence selected by each agent in each step, generate a complete collaborative delivery path that starts from the warehouse, traverses all customer nodes, and returns to the warehouse.
[0029] Specifically, in this embodiment, the objective of the truck-drone delivery logistics problem is to have all truck-drone combinations cooperate to serve all customer nodes and return to the warehouse in the shortest possible time. The drones are limited by battery power and cargo capacity, and can only serve one node at a time. After completing their service, they need to return to the node where the truck is located to replace the battery and cargo (battery replacement, pickup, and customer service time are negligible). The problem can be broken down into the following three sub-problems: (1) Each agent must plan its own path from the starting point to the target point.
[0030] (2) The paths of each group of agents need to avoid selecting duplicate client nodes.
[0031] (3) The entire system time from the warehouse to the warehouse, after all agents have served all client nodes, needs to be minimized.
[0032] In multi-agent tasks, we treat each agent (truck and drone) as making Markov decisions, taking a single-step action based on the current observation and transitioning to a new state. The observations of each agent during the MDP process are represented by the following variables (using a combination as an example): Let represent the set of nodes that have been visited by any agent before time t. and Let represent the target nodes of the truck and the drone at time t, respectively. and Let represent the positions of the nodes preceding the target node at time t, respectively. and These represent the arrival times of the truck and the drone at the target node at time t, respectively. and The remaining travel time. This is the observation value for this group at time t. At t=0, all vehicles are in the warehouse (node 1). .therefore .
[0033] Every step, every truck and drone, determines the next destination. If during transportation, i.e. or When the value is greater than 0, it cannot change its destination and can only continue to the destination selected at time t-1, that is... Each agent selects its own action, and the set of all actions is used as the action at time t. .
[0034] As planned, at each step, at least one truck or drone will arrive at the destination, while the remaining vehicles are still en route. The time remaining to reach the destination is calculated based on the actions chosen by each truck and drone. and (The update methods for both are basically the same, therefore the following will be adopted.) (This is indicated) If the vehicle is still en route, then = If it starts exactly from node , then ; Obtain the time required for all vehicles to reach the target node. / ( Let be the time required for the i-th truck to reach its destination at time t. Let the time required for the i-th drone to reach its destination at time t be taken as the minimum of these times, and then take the travel time for that step. And update the remaining time for other vehicles. and the set of nodes reached. and vehicle target node .
[0035] Let T be the total number of environmental updates during the time it takes for the drone and truck to depart from the warehouse and return to the warehouse after serving all customers. The cost function (with negative reward) is the total time spent in the entire transportation process. .
[0036] The model architecture designed in this invention employs an encoder-decoder structure to generate agent policies. In the encoder, node coordinates are preprocessed to obtain initial embeddings, which are then fed into L attention layers. Each attention layer contains a multi-head attention layer and a feedforward layer. The node embeddings and graph embeddings are then fed into the decoder structure. In the decoder, each agent sequentially selects its own policy and promptly transmits this information to other agents to prevent duplicate node selections. Each agent's decoder structure is identical but independent, and parameters are not shared with other agents. After all agents have made their selections, the reinforcement learning environment is updated based on the choices made by all agents.
[0037] Given a graph G with n nodes, let Represents a node The coordinates. To obtain an embedding of a fully connected graph, we start with the initial embedding of each node and apply a linear transformation to the node's coordinates. Preprocessing:
[0038] in and These are learnable parameters. After initializing and embedding these nodes, they will be passed through an encoder containing L attention layers. Each attention layer consists of two sub-layers: a multi-head attention layer and a fully connected feedforward layer.
[0039] The attention mechanism used in the encoder part of the network model embeds the preprocessed nodes. As input, each node is calculated. , , The three values are used to calculate the correlation between the current node and other nodes. With attention weight Ultimately passed and Weighted summation yields the embedding values of other nodes. And use the average of all node embeddings as the graph embedding of the graph. .
[0040] Obtain the embedding of each node output by the encoder and the graph embedding of the graph. Each agent selects a node using the decoder. First, the previously selected node (using...) is... (Representation) Embedded into the LSTM:
[0041] Here Let these represent the hidden state and the neuron state at time t, respectively. Then we... The neurons are randomly dropped using Dropout with a probability of p:
[0042] Next, the hidden state of the LSTM, the graph embedding, and the travel time from the agent's current node to other nodes are used as inputs to calculate the attention vector between node i and other nodes:
[0043] Where i represents the current position coordinates of the agent. This represents the time it takes for an agent to travel from node i to other nodes in the graph. , and The dimension is Furthermore, its parameters are trainable. After obtaining the attention vector, the softmax function is used to obtain the state... The probability of selecting node j as the next node:
[0044] This formula ensures that no agent is allowed to revisit a node, thus satisfying the problem setting, improving training efficiency, and not affecting the quality of the final solution.
[0045] When the state information of a problem instance is input into the policy network, the system calculates the probability of selecting each node based on this information. To determine node selection, the node with the highest probability is always chosen during formal evaluation. However, random sampling is used during the training phase, selecting nodes randomly according to their probability distribution. This enhances the algorithm's search performance, ensuring that each random sampling yields different results, thereby expanding the search capability within the solution space.
[0046] In this work, there are three ways in which multi-agent information exchange takes place: (1) In order to maintain the stability of the system and avoid potential selection conflicts, after an agent makes a choice, other agents will update their own mask selection mask and set the occupied nodes to 0, that is, mark them as unreachable. This mechanism effectively prevents multiple agents from choosing the same node, thereby reducing conflicts and improving the efficiency of the overall decision-making process.
[0047] (2) After all agents have made their choices, the environment will undergo a global update based on the decisions. This update will modify the agents' observations to reflect the latest state of the environment. During this update phase, agents can not only observe the results of their own choices, but also obtain information about the actions of other agents.
[0048] (3) During the evaluation phase, the critic network evaluates its own agent's solution based on the solutions of other agents. The evaluation results from the critic network guide the agent to adjust its strategy to better collaborate with other agents and achieve the common goal.
[0049] Given an instance s, through training, we can obtain a probability distribution. By continuously sampling, each agent can obtain the final path. To train our model, we define a loss function. ,in, Let π be the total time taken for the path, i.e., the time spent by the agent from departure to return to the warehouse. The loss function is optimized using gradient descent, the REINFORCE gradient calculation method is used, and a baseline b(s) is introduced. Here, b(s) represents the probability distribution of path π generated by the policy network, and b(s) is the baseline value calculated by the critic network.
[0050] In both distributed execution and centralized training, the encoder and decoder distribution for each agent is the same as in distributed training. The difference lies in the fact that the input to the critic network, in addition to the nodes it selects and the actual time cost, also includes nodes selected by other agents, generating graph embeddings based on its own and other agents' paths. The set is obtained by embedding and stitching together all the intelligent agent graphs. The data is fed into a linear layer for prediction, and the network is updated based on the actual time cost.
[0051]
[0052] Where θ represents the policy network parameters, s represents the environmental state, and π represents the complete delivery path generated by the agent. This represents the total time consumed for path π. Policy network generation path The probability distribution, The baseline value output by the critic network. For the first Graph embedding of agents, The weighted sum of graph embeddings for all agents. , , , , , All of these are learnable parameters.
[0053] Through the above routing algorithm, each node can obtain the route with the highest probability of secure transmission to other nodes in the network in a distributed and fast manner.
[0054] Any aspects not covered in this invention are applicable to existing technologies.
Claims
1. A path planning method for UAVs and vehicles based on multi-agent deep reinforcement learning, characterized in that, The method includes the following steps: Step S1: Obtain environmental status information, which includes the warehouse location, the location of unserved customer nodes, the current location of each agent, and the remaining distance for each agent to reach its target node. Step S2: Configure the multi-agent task and distribute the environmental state information to each agent. The information obtained by each agent is its local observation value, which does not include the position information of other agents. Step S3: Each agent encodes its local observations and extracts hidden feature information; Step S4: Each agent calculates the selection probability of each candidate target node based on the implicit feature information according to its policy network, so as to determine the action strategy of the next target node. Step S5: All agents select the next target node according to their respective action strategies, and communicate with each other after selection to share the selected node information, so as to avoid multiple agents selecting the same node. Step S6: Based on the node sequence selected by each agent in each step, generate a complete collaborative delivery path that starts from the warehouse, traverses all customer nodes, and returns to the warehouse.
2. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, In the multi-agent task, each agent is considered to be making Markov decisions, and its observations are determined by the set of nodes visited by any agent before time t. The target nodes of the truck and the drone at time t At time t, the truck and drone reach the previous node position before the target node. and The travel time required for the truck and drone to reach the target node at time t. and This means, that is: 。 3. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, In step S5, each truck and drone decides its next destination at each step. If it is still en route and the remaining time is greater than 0, it cannot change its destination and must continue to the destination selected at the previous moment. After all agents have made their actions, the remaining time required for each agent to reach its respective destination is calculated. / , Let be the time required for the i-th truck to reach its destination at time t. Let the minimum time required for the i-th drone to reach its destination at time t be taken as the travel time for that step. , Update the remaining time of other vehicles The set of nodes reached and vehicle target node .
4. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, Let T be the total number of environmental updates during the time it takes for the drone and truck to depart from the warehouse, serve all customers, and return to the warehouse. The cost function is the total time spent during the entire transportation process. , Where C represents the total cost, t represents the index of the decision time step, and T represents the total number of environment updates. This represents the travel time at step t.
5. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, An encoder-decoder structure is used to generate agent policies; The encoder part preprocesses the node coordinates and feeds them into L attention layers. Each attention layer contains a multi-head attention layer and a forward feedback layer. In the decoder section, each agent selects its own policy in turn and passes information to prevent nodes from being selected repeatedly. Each agent has the same but independent decoder structure and does not share parameters with other agents.
6. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 5, characterized in that, The encoder section transforms the node coordinates using a linear transformation. Preprocessing is performed to obtain the initial embedding. : , in and These are learnable parameters; The initial embedding is passed to L attention layers. The attention mechanism is used to calculate the embedding value and graph embedding of each node. The average value of all node embeddings is used as the graph embedding of the graph.
7. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 5, characterized in that, The decoder section will convert the previously selected node's... The embedded data is fed into the LSTM and processed according to the following formula: , , in , Let represent the hidden state and neuron state at time t, respectively, and p be the dropout probability. Then, using the LSTM hidden state, graph embedding, and travel time from the agent's current node to other nodes as input, the attention vector between node i and other nodes is calculated. : , Where i represents the current position coordinates of the agent. This represents the time it takes for the agent to travel from node i to other nodes in the graph. , and These are trainable parameters; Finally, the softmax function is used to define the state. The probability of selecting node j as the next node is obtained below. : 。 8. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, Multi-agent communication methods include: After one agent makes a choice, other agents update the mask selection mask and mark the selected node as unreachable. After all agents have made their selections, the environment is globally updated based on the decisions of all agents, changing the observations of each agent to reflect the latest state of the environment. During the centralized training phase, the critic network evaluates its own agent's solution based on the solutions of other agents to guide policy adjustments.
9. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, During the training phase, a random sampling strategy is adopted to randomly select nodes based on their probability distribution in order to enhance the search performance of the algorithm. During the formal evaluation phase, the node with the highest probability is selected as the decision result.
10. The UAV and vehicle path planning method based on multi-agent deep reinforcement learning as described in claim 1, characterized in that, Define loss function ,in, This represents the total time spent on path π. The REINFORCE gradient calculation method is used and a baseline is introduced. The loss function is optimized using gradient descent. It is the probability distribution of the path π generated by the policy network. The baseline value output by the commentator network: , In distributed execution and centralized training, the input to the critic network, in addition to the nodes it selects and the actual time cost, also includes nodes selected by other agents. It generates graph embeddings based on its own paths and those of other agents. The set is obtained by embedding and stitching together the graphs of all agents. The data is fed into a linear layer for prediction, and the network is updated based on the actual time cost. , , Where θ represents the policy network parameters, s represents the environmental state, and π represents the complete delivery path generated by the agent. This represents the total time consumed for path π. Policy network generation path The probability distribution, The baseline value output by the critic network. For the graph embedding of the i-th agent, The weighted sum of graph embeddings for all agents. , , , , , All of these are learnable parameters.
