A Robot Path Planning Method Based on an Improved Gray Wolf Optimization Algorithm
By combining the Grey Wolf Optimization Algorithm and the Harmony Search Algorithm, the robot path planning method is improved, which solves the problems of premature convergence and slow convergence speed of the Grey Wolf Optimization Algorithm in robot path planning, and achieves more efficient path planning.
Patent Information
- Application Number
- CN202310401194.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-13
- Publication Date
- 2025-10-28
- Estimated Expiration
- 2043-04-13
AI Technical Summary
Traditional gray wolf optimization algorithms are prone to premature convergence in robot path planning, and their convergence accuracy is low and their speed is slow when facing complex problems.
By combining the Grey Wolf Optimization Algorithm and the Harmony Search Algorithm, and through position update and path exchange mechanisms, the Grey Wolf Optimization Algorithm is improved to enhance the global search capability and convergence speed of path planning.
It effectively avoids premature convergence, improves the accuracy and speed of path planning, and ensures the diversity and reliability of path selection.
Smart Images

Figure CN116400702B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of optimization algorithm application technology, specifically a robot path planning method based on an improved gray wolf optimization algorithm. Background Technology
[0002] The development of robotics technology has become a hot topic across various industries, and path planning is a crucial step in autonomous robot movement. Traditional path planning algorithms suffer from drawbacks such as local optima and slow convergence speed. The Grey Wolf Optimization Algorithm (GFA) is a heuristic optimization algorithm with advantages such as global search and high performance, and has been widely applied in multiple fields. Researchers have begun to explore using the GFA to optimize robot path planning, but the algorithm still suffers from problems such as local optima and slow convergence speed, requiring improvements to enhance its performance. Summary of the Invention
[0003] The purpose of this invention is to provide a robot path planning optimization method based on an improved gray wolf optimization algorithm (i.e., a gray wolf optimization algorithm incorporating a harmony search algorithm), which effectively solves the problems that the gray wolf optimization algorithm is prone to premature convergence when used for robot path planning, and has low convergence accuracy and slow convergence speed when facing complex problems.
[0004] The technical solution adopted in this invention is: a robot path planning method based on an improved gray wolf optimization algorithm, comprising:
[0005] S1: Create a path map based on the robot's search needs, and establish the starting point and the target point;
[0006] S2: The gray wolf optimization algorithm is adopted. The total number of gray wolves in the population is placed at the starting point, which are the absolute core optimal wolf α, the second best wolf β, the worst wolf γ, and a group of δ wolves that update the position around α, β, and γ wolves. α, β, and γ wolves disperse in different directions to avoid obstacles and find paths to the next grid. In the solution space, they track and surround the target and move closer to it. δ wolves generate position update formulas that move closer to the target. Based on the guidance of α, β, and γ wolves, δ wolves finally use the average position guided by α, β, and γ wolves to move closer to the target position. The harmony search algorithm is used to mutate every two adjacent path solutions randomly selected twice. According to their respective retention probabilities, the paths selected by the optimal wolf α, the second best wolf β, and the worst wolf γ are randomly swapped with the path selected by the current wolf to obtain the optimal path.
[0007] S3: When all the gray wolves reach the designated target point, select the shortest feasible path from the total path lengths of all the gray wolves;
[0008] S4: Judge the number of iterations of the algorithm. If the maximum number of iterations is reached, stop the calculation and save the shortest feasible path. If the maximum number of iterations is not reached, go back to S4 and continue the iterative optimization calculation;
[0009] S5: Output the optimal path.
[0010] Preferably, in step S2, the paths selected by the optimal wolf α, the sub-optimal wolf β, and the worst wolf γ and the path selected by the current wolf are randomly exchanged according to their respective retention probabilities, and the calculation is as follows:
[0011] Let P_ij be the probability of exchanging the path of the i-th wolf and the path of the j-th wolf, then:
[0012]
[0013] where c1, c2, c3 (non-negative and the sum is 1, respectively representing the retention probabilities of the optimal wolf α, the sub-optimal wolf β, and the worst wolf γ;
[0014] In the search stage, for each gray wolf i, a random number r_i is uniformly generated from the interval [0,1]. For each pair of wolves i and j, compare r_i and P_ij as follows:
[0015] When r_i < P_ij, exchange the paths of wolves i and j; otherwise, keep their paths unchanged.
[0016] Preferably, during the search process, the balance between exploitation and exploration is adjusted by controlling c1, c2, and c3. Encouraging exploration of the search space by setting c1, c2, and c3 to equal values. For example, setting c1 to a higher value and c2 and c3 to lower values will make the search tend to utilize the best solutions found so far.
[0017] Preferably, in step S1, the method for creating the optimal search path map is:
[0018] Use a specific matrix composed of 0s and 1s to describe the road conditions on the map. 0 represents that the road is passable and is represented by blank, and 1 represents that the road has obstacles and is not passable and is represented by black shadow. Number the grid cells in sequence to make them correspond one-to-one with the rectangular coordinate system. The mapping relationship is:
[0019] N = x + 20y; or
[0020]
[0021] where mod represents the modulo operation and int represents the integer operation.
[0022] And establish the objective function accordingly:
[0023]
[0024] Assuming the grid side length is S, for this...
[0025]
[0026] For the above formula, Q is taken as the total length of the collision-free path from the starting point to the target point, where N is the total number of grids traversed by the robot.
[0027] This invention combines the Harmony Search algorithm with the Gray Wolf Optimization algorithm. On the one hand, the Harmony Search algorithm continuously avoids the premature convergence and local optima traps of the Gray Wolf Optimization algorithm during the optimization process. It continuously mutates during the optimization process and continuously optimizes in the global solution space, ensuring the diversity and reliability of the results. On the other hand, by improving the alpha wolf selection retention probability of the Gray Wolf algorithm, it effectively exchanges the current wolf's chosen path with the alpha wolf's chosen path, preserving the diversity of solutions and avoiding getting trapped in local optima. At the same time, it also improves the optimization accuracy and speed of the Gray Wolf Optimization algorithm, making it more applicable and superior for robot path selection. Attached Figure Description
[0028] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used in conjunction with embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings:
[0029] Figure 1 This is a schematic diagram illustrating the implementation process of an embodiment of this application;
[0030] Figure 2 A path planning comparison diagram of the Grey Wolf algorithm and the improved Grey Wolf optimization algorithm in the embodiments of this application;
[0031] Figure 3 This is a comparison graph showing the relationship between the fitness function values of the Grey Wolf algorithm and the improved Grey Wolf optimization algorithm in the embodiments of this application and the number of iterations. Detailed Implementation
[0032] Exemplary embodiments of the present disclosure will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present disclosure are shown in the drawings, it should be understood that the present disclosure may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the scope of the disclosure to those skilled in the art.
[0033] The robot path planning method based on the improved gray wolf optimization algorithm includes the following steps: S1: Create a path map with the robot's search needs as the objective, and establish the starting point and the target point.
[0034] The method for creating the optimal path-finding map is as follows:
[0035] A specific matrix of 0s and 1s is used to describe road conditions on the map. 0 represents a passable road (represented by a blank space), and 1 represents an impassable road (represented by a black shade). The grid cells are sequentially numbered to correspond one-to-one with a Cartesian coordinate system. The mapping relationship is as follows:
[0036] N = x + 20y; or
[0037]
[0038] Where mod represents the modulo operation and int represents the integer operation.
[0039] And based on this, establish the objective function:
[0040]
[0041] Assuming the grid side length is S, for this...
[0042]
[0043] For the above formula, Q is taken as the total length of the collision-free path from the starting point to the target point, where N is the total number of grids traversed by the robot.
[0044] S2: The gray wolf optimization algorithm is adopted. The total number of gray wolves in the population is placed at the starting point, which are the absolute core optimal wolf α, the second best wolf β, the worst wolf γ, and a group of δ wolves that update the position around α, β, and γ wolves. α, β, and γ wolves disperse in different directions to avoid obstacles and find paths to the next grid. In the solution space, they track and surround the target and move closer to it. δ wolves generate a position update formula that moves closer to the target. Based on the guidance of α, β, and γ wolves, δ wolves finally use the average position guided by α, β, and γ wolves to move closer to the target position. The harmony search algorithm is used to mutate every two randomly selected adjacent path solutions twice. According to their respective retention probabilities, the paths selected by the optimal wolf α, the second best wolf β, and the worst wolf γ are randomly swapped with the path selected by the current wolf, so as to obtain the optimal path.
[0045] First, parameter initialization is performed, including the population size, maximum number of iterations, and retention probabilities for the best, second-best, and worst wolves in the Gray Wolf algorithm, and the memory pool value retrieval probability, fine-tuning probability, and fine-tuning bandwidth in the Harmony Search algorithm. The Harmony Search algorithm is constructed as follows: the solution space range generated by the Gray Wolf algorithm is shown in Table 1, where... and These represent the upper and lower bounds of the solution space, respectively.
[0046] Table 1
[0047]
[0048] Within the solution space generated by the Grey Wolf algorithm, X different solutions are randomly selected to generate a solution set {HM}, as shown in Table 2.
[0049] Table 2
[0050]
[0051] The matrix representation is as follows:
[0052]
[0053] In the formula x 1 x 2 …represent each set of solutions in the solution set. These represent the next path node selected at each step in the Grey Wolf Algorithm, f(X) 1 f(X) 2 ) represents the fitness function value, which is the key factor in judging the quality of each solution in the solution set.
[0054] For the solution set {HM}, define the memory value probability HMCR, and randomly generate a variable rand1 between [0, 1], and compare rand1 with the HMCR initialized above.
[0055] If rand1 is less than HMCR, then a set of harmonies is randomly obtained from the harmonic memory bank initialized above; otherwise, a set of harmonies is randomly obtained from the solution space above.
[0056] Finally, a set of harmonies is obtained. If this set of harmonies is obtained from a harmonies library, it needs to be fine-tuned. A variable rand2 is randomly generated between [0, 1], which is the fine-tuning probability.
[0057] If rand2 is less than the initialized PAR, the harmony needs to be adjusted using the initialized fine-tuning bandwidth bw to obtain a new harmony. Otherwise, no adjustment is made.
[0058] As you can see, the above process involved two variations, ultimately resulting in a set of harmonies.
[0059] The paths of the best wolf α, the second-best wolf β, and the worst wolf γ are randomly swapped based on their respective retention probabilities, calculated as follows: Let P_ij be the probability of swapping the path of the i-th wolf with the path of the j-th wolf, then:
[0060]
[0061] Among them, c1, c2, and c3 respectively represent the retention probabilities of the optimal wolf α, the sub-optimal wolf β, and the worst wolf γ. c1, c2, and c3 are non-negative and their sum is 1. In the search stage, for each grey wolf i, a random number ri is uniformly generated from the interval [0, 1]. For each pair of wolves i and j, compare ri and Pij as follows:
[0062] When ri < Pij, swap the paths of wolves i and j; otherwise, keep their paths unchanged.
[0063] S3: When all grey wolves reach the specified target point, select the shortest feasible path from all the total path lengths run by all grey wolves;
[0064] S4: Judge the number of iterations of the algorithm. If the maximum number of iterations is reached, stop the calculation and save the shortest feasible path. If the maximum number of iterations is not reached, return to S4 and continue the iterative optimization calculation;
[0065] S5: Output the optimal path.
[0066] The basic implementation is as Figure 1 shown Figure 2 and Figure 3 shows the matlab simulation comparison between the basic grey wolf algorithm and the improved grey wolf algorithm. It can be seen that the improved grey wolf optimization method provided by this implementation effectively solves the problems of the basic grey wolf algorithm such as easy premature convergence, easy to fall into local optimum, and slow convergence speed, improves the calculation accuracy, and speeds up the calculation speed.
[0067] Obviously, those skilled in the art can make various changes and modifications to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalent technologies, the present invention is also intended to include these modifications and variations.
Claims
1. A robot path planning method based on an improved gray wolf optimization algorithm, characterized in that, include: S1: Create a path map based on the robot's search needs, and establish the starting point and the target point; S2: The gray wolf optimization algorithm is adopted. The total number of gray wolves in the population is placed at the starting point, which are the absolute core optimal wolf α, the second best wolf β, the worst wolf γ, and a group of δ wolves that update the position around α, β, and γ wolves. α, β, and γ wolves disperse in different directions to avoid obstacles and find paths to the next grid. In the solution space, they track and surround the target and move closer to it. δ wolves generate position update formulas that move closer to the target. Based on the guidance of α, β, and γ wolves, δ wolves finally use the average position guided by α, β, and γ wolves to move closer to the target position. The harmony search algorithm is used to mutate every two adjacent path solutions randomly selected twice. According to their respective retention probabilities, the paths selected by the optimal wolf α, the second best wolf β, and the worst wolf γ are randomly swapped with the path selected by the current wolf to obtain the optimal path. S3: When all the gray wolves reach the designated target point, select the shortest feasible path from the total path lengths of all the gray wolves; S4: Determine the number of iterations of the algorithm. If the maximum number of iterations has been reached, stop the calculation and save the shortest feasible path. If the maximum number of iterations has not been reached, return to S4 and continue the iterative optimization calculation. S5: Output the optimal path.
2. The robot path planning method based on the improved gray wolf optimization algorithm according to claim 1, characterized in that, In step S2, the paths chosen by the best wolf α, the second-best wolf β, and the worst wolf γ are randomly swapped with the path chosen by the current wolf based on their respective retention probabilities, as calculated below: set up It is the probability that the path of the i-th wolf is swapped with the path of the j-th wolf, then: Where c1, c2, and c3 are non-negative and sum to 1, representing the retention probabilities of the best wolf α, the second-best wolf β, and the worst wolf γ, respectively. During the search phase, for each gray wolf i, a random number is generated uniformly from the interval [0,1]. For each pair of wolves i and j, compare and as follows: when < If the conditions are met, swap the paths of wolf i and wolf j; otherwise, keep their paths unchanged.
3. The robot path planning method based on the improved gray wolf optimization algorithm according to claim 2, characterized in that, During the search process, the balance between development and exploration is adjusted by controlling c1, c2, and c3, and the exploration of the search space is encouraged by setting c1, c2, and c3 to equal values.
4. The robot path planning method based on the improved gray wolf optimization algorithm according to claim 1, characterized in that, In step S1, the method for creating the path map is as follows: a specific matrix of 0s and 1s is used to describe the road conditions on the map. 0 represents a passable road (represented by blank space), and 1 represents a road with obstacles (represented by black shading). The grid cells are sequentially numbered to correspond one-to-one with a Cartesian coordinate system. The mapping relationship is as follows: or Where mod represents the modulo operation and int represents the integer operation; And based on this, establish the objective function: Assuming the grid side length is S, for this... For the above formula, Q is taken as the total length of the collision-free path from the starting point to the target point, where N is the total number of grids traversed by the robot.