Multi-agent path planning method and device based on improved ant colony algorithm and medium
By improving the negative feedback and crossover removal strategies of the ant colony algorithm, the multi-agent path planning is optimized, solving the problems of slow convergence speed and easy getting trapped in local optima in the path planning of the ant colony algorithm, and achieving more efficient path planning.
Patent Information
- Application Number
- CN202311841200.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-28
- Publication Date
- 2026-02-03
AI Technical Summary
Existing ant colony algorithms suffer from slow convergence speed and a tendency to get trapped in local optima in multi-agent path planning.
An improved ant colony algorithm based on negative feedback and crossover removal strategy is adopted. The next node is selected by combining the pheromone update mechanism with the roulette wheel method. During the iteration process, the pheromone concentration on the longest path is reduced, and the crossover removal strategy is used to optimize the path.
It improves the efficiency of multi-agent path planning, ensures that the optimal path is obtained in a shorter time, avoids path intersections and local optima, and improves the practicality of the algorithm.
Smart Images

Figure CN121453077A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of multi-agent path planning technology, and specifically to a multi-agent path planning method, device and medium based on an improved ant colony algorithm. Background Technology
[0002] With the continuous development of artificial intelligence and robotics technologies, multi-agent systems have been widely applied in industrial production, logistics delivery, and smart agriculture, showing broad market application prospects. Today, multi-agent path planning has become an important part of multi-agent research. Multi-agent path planning refers to planning an optimal path from the starting node to the target point in a target area, enabling the facility to reach the target point quickly and safely. Based on the characteristics of path planning algorithms, they are divided into classical algorithms and intelligent optimization algorithms. Classical algorithms include A* algorithm, artificial potential field algorithm, Dijkstra's algorithm, and fast search random tree algorithm, while intelligent optimization algorithms include ant colony optimization, gray wolf algorithm, genetic algorithm, differential evolution algorithm, and particle swarm optimization algorithm. Among these, the ant colony optimization algorithm, as a population-based probabilistic selection algorithm, has stronger robustness and dynamic search capabilities in iterative solution performance compared to other intelligent optimization algorithms, and it is relatively easy to combine with other intelligent optimization algorithms. Therefore, the ant colony optimization algorithm has been widely used in the field of path planning. However, the ant colony optimization algorithm also has some drawbacks, such as slow convergence speed, susceptibility to local optima, and deadlock. Summary of the Invention
[0003] The present invention proposes a multi-agent path planning method, device and storage medium based on an improved ant colony algorithm, which can at least solve one of the technical problems in the background art.
[0004] To achieve the above objectives, the present invention adopts the following technical solution:
[0005] A multi-agent path planning method based on an improved ant colony algorithm specifically includes the following steps:
[0006] (1) Initialize the parameters of the improved path planning method by combining the initial positions of the multi-agents and the target endpoint;
[0007] (2) Based on the current position of the multi-agent and the allowable passage range, calculate the nodes that the ant can pass through at its current position, and calculate the state transition probability of these nodes and the corresponding heuristic function value.
[0008] (3) Select the next node and move it using the roulette wheel method to perform local pheromone updates;
[0009] (4) When the current position point is the multi-agent moving target point and the current ant serial number is equal to the number of the ant population, update the pheromone on each node globally according to the negative feedback and de-crossing strategy;
[0010] (5) When the maximum number of iterations is reached, the iteration stops and the optimal path of the multi-agent is obtained.
[0011] Furthermore, the process of initializing the parameters of the improved ant colony path planning method in step (1) is as follows:
[0012] The expression of the multi-agent in the two-dimensional space is (X, Y), and the value ranges of the abscissa X and the ordinate Y are 1 to 10, with the unit of m. 40 task points are randomly distributed in this two-dimensional space, and the agent randomly selects a point as the task starting point. 5 agents cooperate to complete the task, and they randomly select a point as the task starting point. The path planning process is as follows:
[0013] Furthermore, initialize the variables, and clear the taboo table taub and the pheromone matrix τ. The probability that the i-th ant visits the location k at the location j is:
[0014]
[0015] where τ ij in formula (1) represents the pheromone concentration between task point i and task point j. η ij represents the heuristic factor of the ant colony algorithm In the ant colony algorithm, in order to prevent ants from repeating the same task point, a taboo table will be added. Tabu represents the taboo table of the ant colony algorithm, and the taboo table Tabu will add the task points that have been passed. Allow represents the set of task points remaining after removing the taboo table Tabu from the task points. When Allow is emptied, it means that the ants have completed all tasks and can perform the next operation. Calculate the path length length passed by the ants and compare it with Best_length. If length < Best_length, then update the lengths length and Best_length.
[0016] Based on the traditional ant colony algorithm, adopt the update method of the ant colony algorithm with a reinforced negative feedback mechanism, and add a pheromone increment matrix τ ij and the corresponding pheromone decrement matrix δ ij , which is used to reduce the pheromone of the task points on the longest path in this loop.
[0017]
[0018] In the formula (φ - δ ij ) γThis represents the negative feedback calculation factor. φ is a constant. γ is the negative feedback calculation factor. δ ij It is a negative feedback pheromone concentration matrix.
[0019] When the ant colony algorithm only has positive feedback pheromone adjustment, the pheromone update between task point i and task point j is as shown in (3).
[0020]
[0021] Positive feedback pheromone increment Δp ij As shown in (4), when the ant colony algorithm only has positive feedback pheromone adjustment.
[0022]
[0023] The pheromone update between task point i and task point j when the ant colony algorithm only has positive feedback pheromone adjustment is shown in (5).
[0024] δ ij (k+1)=(1-ρ)·δ ij (k)+ΔN ij (5)
[0025] Negative feedback pheromone increment Δp ij As shown in (6), when the ant colony algorithm only has negative feedback pheromone adjustment.
[0026]
[0027] Worst_length corresponds to the longest path length found by the ant in the loop and the optimal path length of Best_length.
[0028] To minimize the time required for the swarm of intelligent agents to complete tasks simultaneously, it is necessary to determine the maximum flight path distance for each individual agent and reduce its flight distance. Therefore, the problem can be abstracted as optimizing local paths. A path with an intersection is definitely not optimal. This conclusion leads us to believe that if we find and solve paths with intersections, we can shorten the overall path distance.
[0029] Suppose that in the intersecting paths, the four points of these two paths are A(x) a ,y a ), B(x) b ,y b ), and C(x c ,y c ), D(x d ,y d And their intersection point is O(x) o ,y o Therefore, we have the following system of linear equations:
[0030]
[0031] Wherein:
[0032]
[0033] According to the system of linear equations, for this system of equations to have a solution, the coefficient matrix If the equation meets this requirement, then the solution of this system of equations can be obtained. The formula for calculating the solution of the system of equations:
[0034]
[0035] Another way is to judge whether there is a crossover by judging the path length:
[0036] (d ac + d bd ) < (d ab + d cd ) (10)
[0037] Where d in formula (10) ac represents the distance between point A and point B. The same applies to others.
[0038] The code principle of the decrossing strategy
[0039] For i = 1 to n - 2;
[0040] For j = i + 2 to n - 1;
[0041] If d(i + j) + d(i + 1, j + 1) < d(i, i + 1) + d(j, j + 1), it means there is a crossover. Next, replace the previous paths (i, i + 1) and (j, j + 1) with the new paths (i, j) and (i + 1, j + 1).
[0042] j = j + 1, goto (2);
[0043] i = i + 1, goto (1);
[0044] End.
[0045] On the other hand, the present invention also discloses a computer-readable storage medium storing a computer program, which when executed by a processor causes the processor to execute the steps of the above method.
[0046] On yet another hand, the present invention also discloses a computer device including a memory and a processor, the memory storing a computer program, which when executed by the processor causes the processor to execute the steps of the above method.
[0047] As can be seen from the above technical solution, the purpose of this invention is to improve the traditional ant colony algorithm by adopting a pheromone update strategy based on negative feedback and crossover removal, thereby providing a multi-agent path planning method based on the improved ant colony algorithm, so as to ensure that the multi-agent obtains the optimal path in a shorter time.
[0048] In summary, the multi-agent path planning method based on the improved ant colony algorithm of this invention addresses the shortcomings of the basic ant colony algorithm in the path planning problem of agent clusters, which is slow in convergence and prone to getting stuck in the search. It proposes to improve the practicality of the ant colony algorithm by adding a crossover removal strategy based on c.
[0049] This invention discloses a multi-agent path planning method based on an improved ant colony algorithm. The method initializes parameters by combining the initial movement positions and target endpoints of the multi-agents. Based on the current positions of the multi-agents and the permissible movement area, it calculates the traversable nodes at the current ant's position and calculates the selection probability and corresponding fitness value of these nodes. By using a negative feedback pheromone update rule to reduce the pheromone at the task point of the longest path in each iteration, it effectively reduces the risk of straying from the optimal path. Simultaneously, a pheromone removal strategy is adopted to ensure that the time required for the entire swarm of agents to complete their tasks simultaneously is minimized, and the maximum flight path distance for individual agents is determined and reduced. The main content addresses the shortcomings of the basic ant colony algorithm in agent swarm path planning problems, which is slow to converge and prone to search stagnation. An improved ant colony algorithm based on enhanced negative feedback and a cross-crossing removal strategy is proposed. By improving the pheromone update method of the ant colony algorithm and adding a cross-crossing removal strategy, the efficiency of path planning is improved. Attached Figure Description
[0050] Figure 1 The flowchart for the improved ant colony algorithm;
[0051] Figure 2 This is the optimal path output by the basic ant colony algorithm after 100 iterations;
[0052] Figure 3 The optimal path output by the ant colony algorithm after 100 iterations is obtained by introducing a negative feedback crossover removal strategy.
[0053] Figure 4 This is the optimal path output by the basic ant colony algorithm after 100 iterations;
[0054] Figure 5 The optimal path output by the ant colony algorithm after 100 iterations is obtained by introducing a negative feedback crossover removal strategy. Detailed Implementation
[0055] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.
[0056] The multi-agent path planning method based on the improved ant colony algorithm described in this embodiment specifically includes the following steps:
[0057] (1) Initialize the parameters of the improved path planning method by combining the initial positions of the multi-agents and the target endpoint;
[0058] (2) Based on the current position of the multi-agent and the allowable passage range, calculate the nodes that the ant can pass through at its current position, and calculate the state transition probability of these nodes and the corresponding heuristic function value.
[0059] (3) Select the next node and move it using the roulette wheel method to perform local pheromone updates;
[0060] (4) When the current location is the target point for multi-agent movement and the current ant number is equal to the number of ants in the ant population, the pheromone on each node is updated globally according to the negative feedback and crossover removal strategy.
[0061] (5) When the maximum number of iterations is reached, the iteration stops and the optimal path of the multi-agent is obtained.
[0062] Furthermore, the process of initializing the parameters of the improved ant colony path planning method in step (1) is as follows:
[0063] Multi-agent systems are represented in a two-dimensional space as (X, Y), where the x-coordinate (X) and y-coordinate (Y) range from 1 to 10, with units of meters (m). Forty task points are randomly distributed in this two-dimensional space, and each agent randomly selects one point as its starting point. Five agents collaborate to complete the task, and each agent randomly selects one of the starting points. The path planning process is as follows:
[0064] Initialize the variables, clearing the tabu list taub and the pheromone matrix τ. The probability that the i-th ant visits location k from location j is:
[0065]
[0066] In equation (1), τ ij η represents the pheromone concentration between task point i and task point j. ij Heuristics representing ant colony algorithms In the ant colony algorithm, a taboo table is added to prevent ants from repeating the same task point. Tabu represents the taboo table of the ant colony algorithm, and the taboo table Tabu will add the task points that have been traversed. Allow represents the set of task points remaining after removing the taboo table Tabu from the task points. When Allow is emptied, it means that the ants have completed all tasks and can perform the next operation. Calculate the path length length passed by the ants and compare it with Best_lenght. If length < Best_length, then update the lengths length and Best_length.
[0067] Based on the traditional ant colony algorithm, the ant colony algorithm update method with a reinforced negative feedback mechanism is adopted, and an additional pheromone increment matrix δ is added ij The corresponding pheromone decrement matrix δ ij , which is used to reduce the pheromone of the task points on the longest path in this loop.
[0068]
[0069] In the formula, (φ - δ ij ) γ represents the negative feedback calculation factor. φ is a constant. γ is the negative feedback calculation factor. δ ij is the negative feedback pheromone concentration matrix.
[0070] When the ant colony algorithm only has positive feedback pheromone regulation, the pheromone update between task point i and task point j is shown in (3).
[0071]
[0072] The positive feedback pheromone increment Δp ij When the ant colony algorithm only has positive feedback pheromone regulation, it is shown in (4).
[0073]
[0074] When the ant colony algorithm only has positive feedback pheromone regulation, the pheromone update between task point i and task point j is shown in (5).
[0075] δ ij (k + 1) = (1 - ρ)·δ ij (k) + ΔN ij (5)
[0076] The negative feedback pheromone increment Δp ij When the ant colony algorithm only has negative feedback pheromone regulation, it is shown in (6).
[0077]
[0078] Worst_length is the longest path found by the ant in the loop, corresponding to Best_length, the optimal path length.
[0079] To minimize the time required for the swarm of intelligent agents to complete tasks simultaneously, it is necessary to determine the maximum flight path distance for each individual agent and reduce its flight distance. Therefore, the problem can be abstracted as optimizing local paths. A path with an intersection is definitely not optimal. This conclusion leads us to believe that if we find and solve paths with intersections, we can shorten the overall path distance.
[0080] Suppose that in the intersecting paths, the four points of these two paths are A(x) a ,y a ), B(x) b ,y b ), and C(x c ,y c ), D(x d ,y d And their intersection point is O(x) o ,y o Therefore, we have the following system of linear equations:
[0081]
[0082] in:
[0083]
[0084] Given a system of linear equations, to have a solution, the coefficient matrix... If the equations satisfy this requirement, then the solution to this system of equations can be found. The formula for calculating the solution to a system of equations is:
[0085]
[0086] Another way is to determine whether there is an intersection by judging the path length:
[0087] (d ac +d bd )<(d ab +d cd (10)
[0088] In equation (10), d ac This represents the distance between point A and point B. The same logic applies to other points.
[0089] The code principle of the cross-linking strategy
[0090] For i = 1 to n-2;
[0091] For j = i + 2 to n - 1;
[0092] If d(i + j) + d(i + 1, j + 1) < d(i, i + 1) + d(j, j + 1), it means there is a crossover. Next, replace the previous paths (i, i + 1) and (j, j + 1) with the new paths (i, j) and (i + 1, j + 1).
[0093] j = j + 1, goto (2);
[0094] i = i + 1, goto (1); End.
[0095] Generally speaking, the main content of the embodiments of the present invention is aimed at the disadvantages of the basic ant colony algorithm, such as slow convergence speed and easy to fall into search stagnation in the path planning problem of the agent cluster. A de - crossing strategy based on c is proposed to improve the practicability of the ant colony algorithm.
[0096] The following is an example for illustration:
[0097] Embodiment 1: To verify the correctness and rationality of the present invention, use the simulation software MATLAB R2018b to simulate the motion environment of multiple agents in a 10×10 (m) two - dimensional environment model, simulate the two - dimensional path planning algorithm, conduct the path planning simulation training of multiple agents, and compare it with the traditional ant colony algorithm. 40 task points are randomly distributed in the two - dimensional space, and multiple agents randomly select points as the task starting points. 5 agents cooperate to complete the task. The experimental parameters are set as follows in the table.
[0098]
[0099] Figure 2 and Figure 3 are the optimal paths output by the basic ant colony algorithm and the improved ant colony algorithm with the de - crossing strategy after 100 iterations. It can be seen from the figure that there are obvious cases of route intersections in the path of the ant colony algorithm without the de - crossing strategy, and the total distance is 86.8286, while there are no cases of route intersections in the improved ant colony algorithm with the de - crossing strategy and the total distance is 82.7788.
[0100] Example 2: Optimal path planning for an intelligent logistics vehicle (agent) in a 2D grid map scenario to illustrate the implementation process of this invention. The experiment selected "logistics transportation" as the implementation environment for multi-agent path planning. 2D grid map scenarios are typically used to represent and simulate the movement and perception of robots, drones, or other mobile devices in a planar environment. In this design, the unmanned logistics vehicle's working environment is a 20×20 two-dimensional planar space, including three main parts: the logistics vehicle, the package (item), and the target location. The logistics vehicle is the intelligent agent to be controlled in this invention; it can detect obstacles within its perception range and return signals to itself. The package is an item to be picked up in the environment; the logistics vehicle successfully picks up the package and delivers it to the designated location.
[0101] like Figure 1 As shown in the figure, the multi-agent path planning method based on the improved ant colony algorithm described in this embodiment specifically includes the following steps:
[0102] (1) Initialize the parameters of the improved path planning method by combining the initial position of the logistics vehicle and the target destination;
[0103] (2) Based on the current location of the logistics vehicle and the allowable passage range, calculate the nodes that the ant can pass through at its current location, and calculate the state transition probability of these nodes and the corresponding heuristic function value.
[0104] (3) Select the next node and move it using the roulette wheel method to perform local pheromone updates;
[0105] (4) When the current location is the target point for the logistics vehicle and the current ant number is equal to the number of ants in the population, the pheromone on each node is updated globally according to the negative feedback and cross-crossing strategy.
[0106] (5) When the maximum number of iterations is reached, the iteration stops and the optimal path of the logistics vehicle is obtained.
[0107] Furthermore, the process of initializing the parameters of the improved ant colony path planning method in step (1) is as follows:
[0108] In a 2D grid map, a logistics vehicle is represented as (X, Y), with the x-coordinate (X) and y-coordinate (Y) ranging from 1 to 20. Multiple task points are randomly distributed across this grid map, and each logistics vehicle randomly selects one point as its task starting point. Five logistics vehicles collaborate to complete the task, and each vehicle randomly selects a point as its task starting point. The path planning process is as follows:
[0109] Initialize the variables, clearing the tabu list taub and the pheromone matrix τ. The probability that the i-th logistics vehicle visits location k from location j is:
[0110]
[0111] where τ in formula (1) ij represents the pheromone concentration between task point i and task point j. η ij represents the heuristic factor of the ant colony algorithm In the ant colony algorithm, in order to prevent the logistics vehicle from repeating the same task point, a taboo list will be added. Tabu represents the taboo list of the ant colony algorithm, and the taboo list Tabu will add the task points that have been passed. Allow represents the set of task points remaining after removing the taboo list Tabu from the task points. When Allow is emptied, it means that the logistics vehicle has completed all tasks and can perform the next operation. Calculate the path length length passed by the logistics vehicle and compare it with Best_length. If length < Best_length, then update the lengths length and Best_length.
[0112] In the present invention, an ant colony pheromone update method with a reinforced negative feedback mechanism is adopted, by adding a pheromone decrement matrix δ ij corresponding to the pheromone increment matrix τ ij , which is used to reduce the pheromone of the task points on the longest path in this cycle.
[0113]
[0114] In the formula, (φ - δ ij ) γ represents the negative feedback calculation factor. φ is a constant. γ is the negative feedback calculation factor. δ ij is the negative feedback pheromone concentration matrix.
[0115] In the present invention, when there is only positive feedback pheromone regulation, the pheromone update between task point i and task point j is as shown in (3).
[0116]
[0117] The positive feedback pheromone increment Δp ij in the ant colony algorithm when there is only positive feedback pheromone regulation is as shown in (4).
[0118]
[0119] When there is feedback pheromone regulation, the pheromone update between task point i and task point j is as shown in (5).
[0120] δ ij [[ID=四十九]](k + 1) = (1 - ρ)·δ ij (k) + ΔN ij (5)
[0121] The negative feedback pheromone increment Δp ijAs shown in (6), when the ant colony algorithm only has negative feedback pheromone adjustment.
[0122]
[0123] Worst_length corresponds to the longest path length found by the logistics vehicle in the loop and Best_length corresponds to the optimal path length.
[0124] To minimize the time required for logistics vehicles to complete tasks simultaneously, the maximum distance of the logistics vehicle (agent) route must be determined, abstracting the problem into optimizing local paths. A path with an intersection is definitely not optimal. This conclusion prompts us to shorten the overall route distance if we find intersecting paths. Assume that the four points of the two intersecting paths are A(x... a ,y a ), B(x) b ,y b ), and C(x c ,y c ), D(x d ,y d And their intersection point is O(x) o ,y o Therefore, we have the following system of linear equations:
[0125]
[0126] in:
[0127]
[0128] Given a system of linear equations, to have a solution, the coefficient matrix... If the equations satisfy this requirement, then the solution to this system of equations can be found. The formula for calculating the solution to a system of equations is:
[0129]
[0130] Another way is to determine whether there is an intersection by judging the length of the transportation route:
[0131] (d ac +d bd )<(d ab +d cd (10)
[0132] In equation (10), d ac This represents the distance between point A and point B. The same logic applies to other points.
[0133] The code principle of the cross-linking strategy
[0134] For i = 1 to n - 2;
[0135] For j = i + 2 to n - 1;
[0136] If d(i + j) + d(i + 1, j + 1) < d(i, i + 1) + d(j, j + 1), it means there is an intersection. Next, replace the previous paths (i, i + 1) and (j, j + 1) with the new paths (i, j) and (i + 1, j + 1).
[0137] j = j + 1, goto (2);
[0138] i = i + 1, goto (1); End.
[0139] In summary, the experimental results are as Figure 4 and Figure 5 shown. By comparing algorithms, the optimal action path of the logistics vehicle on the two - dimensional plane grid map is found. The main content of the embodiment of the present invention is aimed at the disadvantages of the basic ant colony algorithm, such as slow convergence speed and easy to fall into search stagnation in the path planning problem of intelligent logistics vehicles. A strategy of removing intersections based on enhanced negative feedback is proposed to improve the practicality of the ant colony algorithm, so that it can be applied to real - time scenarios to calculate the optimal transportation path of the logistics vehicle and complete the designated task of delivery.
[0140] On the other hand, the present invention also discloses a computer - readable storage medium storing a computer program. When the computer program is executed by a processor, the processor is made to execute the steps of the above - mentioned method.
[0141] On yet another hand, the present invention also discloses a computer device including a memory and a processor. The memory stores a computer program. When the computer program is executed by the processor, the processor is made to execute the steps of the above - mentioned method.
[0142] In yet another embodiment provided by the present application, a computer program product containing instructions is also provided. When it runs on a computer, the computer is made to execute any one of the multi - agent path planning methods based on the improved ant colony algorithm in the above - mentioned embodiments.
[0143] It can be understood that the system provided by the embodiment of the present invention corresponds to the method provided by the embodiment of the present invention. The explanations, examples and beneficial effects of the relevant content can refer to the corresponding parts in the above - mentioned method.
[0144] The embodiment of the present application also provides an electronic device including a processor, a communication interface, a memory and a communication bus. Among them, the processor, the communication interface and the memory complete communication with each other through the communication bus.
[0145] The memory is used to store a computer program;
[0146] When the processor executes the program stored in memory, it implements the multi-agent path planning method based on the improved ant colony algorithm described above.
[0147] The communication bus mentioned in the aforementioned electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc.
[0148] The communication interface is used for communication between the aforementioned electronic devices and other devices.
[0149] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.
[0150] The processors mentioned above can be general-purpose processors, including central processing units (CPUs), network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components.
[0151] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented using software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in the embodiments of this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line (DSL)) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk (SSD)).
[0152] It should be noted that, in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0153] The various embodiments in this specification are described in a related manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0154] The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to limit it. Although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A multi-agent path planning method based on an improved ant colony algorithm, characterized in that, Specifically, the following steps are included: S1. Combine the initial positions of the multiple agents and the target destination to initialize the parameters of the improved ant colony path planning method; S2. Based on the current position of the multi-agent and the allowable passage range, calculate the nodes that the ant can pass through at its current position, and construct the optimal path for the multi-agent to reach the next target point. S3. Select the next node using the roulette wheel method and move it to perform a local pheromone update; S4. When the current point is the target point for multi-agent movement and the current ant number is equal to the number of ants in the ant population, the pheromones on each node are updated globally and locally according to the reinforcement negative feedback and cross-crossing strategy. S5. Once the maximum number of iterations is reached, the iteration stops, and the optimal path for the multi-agent system is obtained.
2. The multi-agent path planning method based on the improved ant colony algorithm according to claim 1, characterized in that: The method for initializing and improving the ant colony in step S1 is as follows: The multi-agent system is represented in a two-dimensional space as (X,Y), where the values of the horizontal coordinate X and the vertical coordinate Y range from 1 to 10, and the unit is m. In this two-dimensional space, 40 task points are randomly distributed. Each agent randomly selects a point as the starting point of the task. Five agents work together to complete the task, and each agent randomly selects a point as the starting point of the task.
3. The multi-agent path planning method based on the improved ant colony algorithm according to claim 1, characterized in that: The implementation process of step S2 is as follows: After initializing the variables, clearing the taboo list Tabu and the pheromone matrix τ, the probability that the i-th ant visits location k from location j is: In equation (1), τ ij η represents the pheromone concentration between task point i and task point j. ij Heuristics representing ant colony algorithms The importance of alpha pheromones and beta heuristic factors are used in ant colony optimization (ACO) to prevent ants from repeating the same task. Tabu represents the tabu list of ACO, which includes previously visited task points. Allow represents the set of task points remaining after removing the tabu list Tabu. When Allow is cleared, it means that the ant has completed all tasks and can proceed to the next operation.
4. The multi-agent path planning method based on the improved ant colony algorithm according to claim 1, characterized in that: The implementation process of step S4 is as follows: Based on the traditional ant colony algorithm, an ant colony algorithm update method with reinforcement negative feedback mechanism is adopted, and a pheromone increment matrix τ is added. ij The corresponding pheromone reduction matrix δ ij This is used to reduce the pheromones of task points on the longest path in this loop; In the formula (φ-δ ij ) γ Represents the negative feedback calculation factor; φ is a constant, γ is the negative feedback calculation factor; δ ij It is a negative feedback pheromone concentration matrix.
5. The multi-agent path planning method based on the improved ant colony algorithm according to claim 1, characterized in that: The implementation process of step S5 is as follows: Suppose that in the intersecting paths, the four points of these two paths are A(x) a y a ), B(x) b y b ), and C(x c y c ), D(x d y d And their intersection point is O(x) o y o Therefore, we have the following system of linear equations: in: Given a system of linear equations, to have a solution, the coefficient matrix... If the equations satisfy this requirement, then the solution to this system of equations can be found. The formula for calculating the solution to the system of equations is as follows: Another way is to determine whether there is an intersection by judging the path length: (d ac +d bd )<(d ab +d cd ) (10) In equation (6), d ac This represents the distance between point A and point B; pseudocode of the basic principle of cross-linking strategy For i = 1 to n-2; For j = i + 2 to n - 1; If d(i+j)+d(i+1,j+1)<d(i,i+1)+d(j,j+1), it means there is an intersection. Next, replace the previous path (i,i+1), (j,j+1) with the new path (i,j), (i+1,j+1). j = j + 1, goto(2); i = i + 1, goto(1); End.
6. A computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.
7. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as claimed in any one of claims 1 to 5.