Abstract
To address the problems of weak search ability, easily falling into local optimal solutions and poor path quality of sparrow search algorithm in AGV path planning, a multi-strategy improved sparrow search algorithm (MISSA) is proposed in this paper. MISSA improves the global search ability by improving the discoverer position update operator and introducing the sine cosine algorithm; adopts the adaptive number of vigilantes and adaptive adjustment step size to improve the convergence speed; introduces the Levy flight variation strategy to reduce the probability of falling into any local optimal solution; optimizes the boundary handling mechanism to prevent the loss of population diversity at a later stage; finally, uses the large-scale neighborhood search strategy and path smoothing mechanism for path optimization to further improve the path quality. The superiority-seeking ability of MISSA was verified by 12 standard test functions, and then 30 simulation experiments were conducted in grid maps with two specifications of 20×20 and 30×30. The experimental results showed that, by using MISSA, the path length was reduced by 44.1% and 63.1%, the number of turns was reduced by 68.4% and 78.4%, and the risk degree was reduced by 61.3% and 77.2%, which verifies the superiority of MISSA in path planning. Finally, MISSA was ported to the QBot2e mobile robot for physical verification to prove its feasibility in practical applications.
Introduction
Path planning is one of the crucial issues in the work of Automated guided vehicles (AGVs) [1]. The objective is to find the best and collision-free path from the starting point to the target point in a given environment [2]. The path-finding algorithm is the key to solving the path-planning problem [3]. Among them, the algorithm’s ability to find the best path and the quality of the searched path are critical indicators to evaluate the path-finding algorithm.
The traditional path-finding algorithms are the A* algorithm [4], Artificial potential field method [5, 6], Dijkstra algorithm [7], etc. Among them, A* algorithm and Dijkstra’s algorithm are mostly used for global path planning, and artificial potential field method is mostly used for local path planning. With the development of artificial intelligence technology, many intelligent bionic algorithms are widely used in path planning problems, such as the sparrow search algorithm (SSA) [8],genetic algorithm [9], ant colony algorithm [10, 11], gray wolf optimization algorithm [12], and hybrid path planning algorithms [13]. Among them, SSA has good search accuracy, convergence speed, and stability [14] and has been widely used in many fields, such as fault diagnosis, image processing, and UAV trajectory planning in recent years. For example, Fang [15] et al. proposed a new method for LightGBM fault diagnosis based on the optimization of the elite opposite sparrow search algorithm, Wu [16] et al. proposed an image threshold segmentation method based on an improved sparrow search algorithm, Yang [17] et al. apply the sparrow search algorithm to UAV trajectory planning.However, SSA suffers from weak global search capability [18], easily falling into local optimum [19], and poor path quality [20] in solving the AGV path planning problem. To address these problems, many scholars have made improvements. Among them, Li [21] used the K-medoids clustering method to enhance the population exchange and used the adaptive factor to improve the algorithm’s optimality finding ability; Zhang [22] et al. solved the problems of early convergence and population diversity reduction of the algorithm by using FDB selection and progressive search, and verified the excellent performance of the algorithm in path planning applications; Chen [23] et al. fused the A* algorithm with the sparrow search algorithm and used the ray method and Bessel curves to improve path smoothing; Ouyang [24] et al. used the adaptive spiral flight method to reduce the probability of the algorithm falling into a local optimal solution and applied it to robot path planning. Although various improved sparrow search algorithms have been applied to the path planning field, there is still much room for improving the quality of the paths searched for different environmental maps.
In this paper, in order to solve the problems of weak global search capability, easy to fall into local optimum, and poor path quality of sparrow search algorithm in AGV path planning, the sparrow search algorithm is improved from two aspects. On the one hand, the performance of the sparrow search algorithm itself is improved in the following way: Improving the global search capability of the algorithm with a new finder position update operator and fused sine-cosine algorithm; Adopting adaptive number of vigilantes and adaptive step size to accelerate the convergence speed of the algorithm; Introducing Levy flight variation to reduce the probability of falling into a local optimum solution; By optimizing the boundary processing mechanism, prevent the loss of population diversity in the later stages of the algorithm;
On the other hand, the path quality is improved in the following way:
Using large-scale neighborhood search after obtaining the complete path strategy and path smoothing mechanism is used to improve the path quality and smoothness.
Then we verified the optimization ability of this paper’s algorithm by comparing and analyzing the 12 standard test functions with other intelligent optimization algorithms, and carried out grid map simulation experiments by using MATLAB to verify the superiority of this paper’s algorithm in path planning. Finally, the proposed algorithm was ported to QBot2e mobile robot for physical verification, which proved the feasibility of the improved algorithm in practical applications.
The rest of the paper is organized as follows: The second part introduces the SSA. The third part presents the details of the MISSA improvement. The fourth part verifies the merit-seeking capability of MISSA by 12 standard test functions. The fifth part conducts path planning simulation experiments on different environment maps and performs physical verification. The sixth part summarizes the work of this paper and the outlook.
The basic sparrow search algorithm
SSA is proposed based on sparrows’ foraging and anti-feeding behavior. The entire sparrow population consists of three types of individuals: discoverers, joiners, and vigilantes. Among them, discoverers account for 20% of the entire population, responsible for finding food and providing feeding directions for other sparrows; the other 80% are joiners, who use the discoverers to obtain food; and the vigilantes, who can be both discoverers and joiners, account for 10–20% of the whole population. SSA is to find the optimal value of the optimization problem by continuously adjusting the positions of these three sparrows.
In SSA, the discoverers position update formula is:
The joiners position update formula is:
The vigilantes position update formula is:
This section optimizes SSA for the problems of SSA in path planning. There are two aspects of optimization. One is to improve the performance of SSA itself, including global search capability, convergence speed and reducing the probability of falling into a local optimum solution; the other is to improve the path quality. In addition, we provide pseudocode to allow simulation platforms to test MISSA.
Improved discoverer position update formula
In SSA, if R2 < ST, the discoverers position is updated by the
where, t denotes the current number of iterations, M denotes the maximum number of iterations, and l is a random number between [–1,1].
The range of values of the new operator is shown in Fig. 1. As the number of iterations increases, the value of the operator is slowly increased. This ensures the search range in the early stage, and at the same time has good search accuracy in the later stage.

The range of values of the new operator.
If R2 > ST, the discoverers are updated by adding a normally distributed random number to each dimension. This method affects the convergence speed of the algorithm in applications with an extensive search range, and the update method does not refer to the positions of other individuals, which is not conducive to the exchange of information between populations [26]. The sine cosine algorithm increases the communication between populations when individuals are updated, and has better global optimization ability [27]. Therefore, this paper combines the sine cosine algorithm to update the discoverer position when R2 > ST, which is given by:
The formula for updating the position of the improved discoverer is as follows:
In SSA, 10% – 20% of the sparrows will become vigilantes. Their role is to help the population find a better solution and prevent the population from falling into a local optimum solution [28]. If the number of vigilantes is large, it would improve the global search capability of the algorithm and reduce the probability of falling into local optimal solutions, but the stability and convergence speed of the algorithm would be affected; if the number of vigilantes is small, it would increase the convergence speed and stability of the algorithm, but it might increase the probability of falling into a local optimum [29]. In SSA, the number of vigilantes is fixed, and this kind will affect the convergence speed and the optimality-seeking ability of the algorithm. Therefore, this paper adopts the method of an adaptive number of vigilantes as follows:
In Equation (3), the vigilantes should move quickly to the optimal individual when f
i
> f
g
, thus speeding up the algorithm’s convergence. However, in SSA, the step size is random, so in order to speed up the convergence speed and convergence accuracy of the algorithm, the adaptive step size adjustment is used in this paper as follows [30]:
The adaptive step size variation is shown in Fig. 2.

Step length variation.
In Fig. 2, the adaptive step size gradually increases with the number of iterations at the beginning of the algorithm and starts to decrease gradually in the middle and later stages, which could speed up the convergence speed in the early and late stages of the algorithm and reduce the risk of falling into local optimal solutions in the middle stage.
SSA has the drawback of easily falling into local optimal solutions. In order to reduce the probability of the algorithm falling into an optimal local solution, this paper introduces the Levy flight variant strategy into the sparrow search algorithm. Levy flight [31] are random step wanderings that obey the Levy distribution and can switch between short and occasionally long steps. The step length of Levy flight can be simulated according to the Mantegna algorithm, and the step length can be expressed as:
At the end of each algorithm iteration, individuals with poor adaptation are selected for Levy flight variation. The update is performed as follows:
After each algorithm iteration, sparrow individuals would exist beyond the search range. In SSA, the sparrow individuals beyond the search range would be arranged on the boundary of the search range, which would cause a large number of sparrow individuals to gather on the search boundary at the later stage of the algorithm, resulting in the loss of population diversity and seriously affecting the convergence speed of the algorithm [32]. To solve this problem, the original boundary handling mechanism of the algorithm is optimized in this paper as follows:
If the new location of the individual sparrow is still out of the search range, the location of the sparrow is updated using a random distribution to ensure further that the location of the individual sparrow is within the search range in the following manner:
To address the problem of the low search capability of SSA in solving path planning problems, the large-scale neighborhood search strategy (LNS) [33] is introduced in this paper. In this paper, after each iteration of the algorithm, LNS is performed on the optimal individual to further reduce the fitness. The schematic diagram is shown in Fig. 3 (with a 10-dimensional path as an example). Firstly, the path points of the original path are randomly deleted by using the damage operator; then, new path points are reinserted by the repair operator, which is the set of all possible path points in the damaged dimension. The new path obtained after the repair is called the neighborhood solution. The fitness of the neighborhood solution is calculated, and if it is better than the original solution, it isretained.

Schematic diagram of large neighborhood search strategy.
After the complete path is obtained by using SSA, there are often some redundant points, resulting in poor smoothness of the path, which leads to too many turns in practical applications and seriously affects the efficiency of the AGV [34]. Therefore, it is necessary to smooth the path searched by the algorithm. In this paper, we introduce the idea of Dijkstra’s algorithm to optimize the paths. This algorithm is a typical algorithm for solving the shortest path, which is used to calculate the shortest path from a node to other nodes, eliminate the redundant points between two nodes and improve the smoothness of the path.
The schematic diagram of path smoothing in this paper is shown in Fig. 4. Firstly, point A and point C are taken as the i-th node and the i + 2-st node, respectively, with coordinates A (x
i
, y
i
) and C (xi+2, yi+2). Then, determine the obstacles that exist in the range surrounded by points A and C, and the coordinates of the center of the obstacles are D (x
z
, y
z
). Finally, calculate the distance d between point D and the line connecting point A and point C. If

Schematic diagram of path smoothing.
The effect of smoothing the path is achieved by traversing all the path points from the start of the path and removing the redundant nodes.
The result is shown in Fig. 5, where the original path searched by the algorithm is A → B → C → D. After the path smoothing process, the path becomes A → D. It can be seen that the path after smoothing process not only increases the smoothness but also shortens the path length.

Path smoothing result.
Algorithm 1 gives the MISSA pseudocode for path planning. Lines 1 through 21 show the iterative process of MISSA. Path smoothing is performed once after each sparrow obtains the latest position as a way to reduce the path length, and the condition is stopped and the optimal value is returned when the maximum number of iterations is reached.
Algorithm performance verification and result analysis
This section compares the optimization search results of MISSA with SSA, other improved versions of SSA, and three other intelligent optimization algorithms on 12 standard test functions, and verifies the superiority of MISSA performance through parameter statistics.
Test functions
In order to verify the optimization-seeking ability of MISSA, 12 standard test functions [35] are selected for simulation analysis in this paper. Table 1 gives the test function expressions, search range, dimensionality, and theoretical optimal values. MISSA is compared with other SSA improved versions (ISSA) [36], SSA, whale optimization algorithm (WOA) [37], gray wolf optimization algorithm (GWO) [38], and particle swarm optimization algorithm (PSO) [39]. The main parameter settings for each algorithm are given in Table 2. Considering chance in experimental results, the population size of each algorithm is set to 100 in this paper, the same initialized population, and each test function is run 30 times independently. The maximum number of iterations is 500, and the optimal value, mean, and standard deviation of the 30 experimental test functions are compared. Simulation environment: MATLAB R2019a, Win10 OS, processor AMD Ryzen5 3500U, CPU 2.40 GHz, memory 8GB.
Test functions
Test functions
Parameter setting
Table 3 shows the search results of the five algorithms on the 12 standard test functions. From the analysis of the optimization accuracy, MISSA,ISSA and SSA can find the theoretical optimal values on the seven test functions of F1 ∼ F4, F7 ∼ F9, and the optimization accuracy is significantly better than the other three algorithms, and MISSA does not find the theoretical optimal values on the three test functions of F5, F6, F11, but the optimization accuracy is 1 9 orders of magnitude higher than that of ISSA and SSA. From the average value obtained in 30 experiments, MISSA not only finds the theoretical optimal value in the four test functions of F2 ∼ F4, F8, but also the average value is 0, which is 190–280 orders of magnitude higher than that of SSA, and the average value in F5, F6, F11, F12, is also better than that of ISSA and SSA and other three algorithms. From the stability analysis, the standard deviation of MISSA on F5, F6, F11, F12 is better than that of ISSA, SSA and the other three algorithms, and the results on the other test functions are consistent with those of ISSA and SSA but better than those of the other three algorithms. Figure 6 shows the convergence curves of the function values of the five algorithms on the 12 test functions, and it can be seen that the convergence speed of MISSA on F1 ∼ F10 is better than that of SSA and the other three algorithms.
Experimental results
Experimental results

Convergence curve of test functions.
In a comprehensive analysis, the MISSA given in this paper outperforms SSA in terms of optimization accuracy, convergence speed and stability performance, and has better optimization capability.
The mean and standard deviation of the 30 independent runs alone do not fully illustrate the superiority of MISSA [40]; statistical tests are required. To reflect fairness, this paper uses Wilcoxon rank sum test to verify whether the results of each run of MISSA are significantly different from other algorithms at the p = 5% significance level. While p < 5%,indicating that there is a significant difference between the two algorithms; while p > 5%, indicating that the difference between the two algorithms is not obvious, i.e., the two algorithms are comparable in terms of their performance of optimization search.
From Table 4, it can be seen that most of the p-values between MISSA and the three algorithms GWO, WOA and PSO are less than 5% in the 12 standard test functions, indicating that there is a significant difference between MISSA and these three algorithms. p-values between MISSA and ISSA are less than 5% in three functions, and the significant difference in the other functions is not obvious, and the optimization performance is comparable. p-values between MISSA and SSA are less than 5% in the seven the p-value is less than 5% on the number of functions, indicating that the superiority of MISSA is statistically significant.
Wilcoxon rank test p values
This section utilizes the simulation results obtained by MISSA on two different specifications of grid maps to simulate and compare other algorithms by using three evaluation indicators. MISSA is then ported to actual AGV for practical application to verify the feasibility and superiority of the algorithm.
Environmental maps
In this paper, two sizes of grid maps, 20×20 and 30×30, are used as the experimental environment maps. As shown in Fig. 7. The length of each grid is 1, where the black area represents the obstacle, the white area represents the passable area, and the starting and ending points of the path are at the positions (0,0) and (20,20) or (30,30) respectively.
Path evaluation indicators
The most direct evaluation index of the path planning problem is the path length, but a single evaluation index does not indicate the superiority of the algorithm. Therefore, this paper adds three evaluation indexes, namely risk degree, number of turns, and turn angle.
The path planning problem calculates the path length by the fitness function. The expression of the fitness function is:

Environmental maps.
The number of turns and the angle of turns are the indicators to evaluate the smoothness of the path. A smooth path can increase the efficiency of AGV but also reduce the wear and tear of AGV itself.
In the traditional path planning problem, there would be a situation that the path intersects with the boundary of the obstacle area, and there would be a certain risk potential when the AGV carries out the trajectory tracking, so this paper introduces the risk degree as an index to evaluate the path safety. Risk degree refers to the number of times that the planned path intersects with the boundary of the obstacle area. In Fig. 8(a), the path intersects with the obstacle boundary once, which means the risk degree is 1; In Fig. 8(b), the path intersects with the obstacle boundary twice, which means the risk degree is 2. The lower the total risk degree of the whole path, the higher of the path safety.

Schematic diagram of risk degree.
In this paper, path search was performed on two maps using SSA, MISSA, and reference [8] algorithms (ISSA), respectively. To avoid experimental chance, each algorithm is executed 30 times and evaluated comprehensively according to the path evaluation metrics. Simulation environment: MATLAB R2019a, Win10 OS, processor AMD Ryzen5 3500U, CPU 2.40 GHz, memory 8GB. The parameter settings for each algorithm are shown in Table 5.
Parameter setting
Parameter setting
Figure 9 shows the shortest paths obtained by the three algorithms under the 20×20 environment map, and Fig. 10 shows the convergence of MISSA compared with ISSA. It can be seen from Fig. 9 that the paths searched by SSA are of low quality, with a high number of turns, too many redundant nodes, and high danger, which is not conducive to the practical application of AGVs. MISSA compares with the shortest paths obtained by SSA and ISSA. The path length obtained by MISSA is shorter, with fewer turns and lower risk, which shows the superior performance of MISSA.

Three algorithms for shortest path in 20×20 environment map.

Comparison of algorithm convergence curves.
Table 6 shows the results of 30 simulations of the 20×20 environment map. Table 6 shows that MISSA outperforms SSA and ISSA in terms of path length, number of turns, turn angle, and risk degree. By comparison, compared with SSA and ISSA, the path length obtained by MISSA is reduced by 44.1% and 1.9%, the number of turns is reduced by 68.4% and 17%, the turn angle is reduced by 79.1% and 7.0%, and the risk degree is reduced by 61.3% and 51.1%, respectively. The path quality obtained by MISSA is higher in comprehensive analysis.
Simulation results of 20×20 environment map
Simulation results of 30 × 30 environment map
In order to further verify the superiority of MISSA, an environmental map with higher complexity is used in this paper. Figure 11 shows the shortest paths obtained by the three algorithms on the 30×30 environment map. Figure 12 shows the convergence of MISSA compared with ISSA. From Fig. 11, it can be seen that SSA has the same disadvantages of poor quality of paths, more turns, too many redundant nodes and high danger in complex environment maps, and the paths obtained by MISSA have significantly better turns and risk than the paths of SSA and ISSA, with better path smoothness and higher safety factor.

Three algorithms for shortest path in 30 × 30 environment map.

Comparison of algorithm convergence curve.
Through comprehensive analysis of 30 simulation results compared with SSA and ISSA, the path length obtained by MISSA is reduced by 63.1% and 6.0%, the number of turns is reduced by 78.4% and 42.4%, the turn angle is reduced by 85.8% and 23.2%, and the risk degree is reduced by 77.2% and 65.3%, respectively. By comparing the simulation results of the two environment maps, it is proved that MISSA is superior in the complex environment map.
To demonstrate that MISSA is also feasible in a real-world environment, this paper applies MISSA to QBot2e, an open high-performance mobile robot designed by Quanser Canada.
This paper randomly places multiple obstacles as environment maps in an indoor laboratory, and path-planning and trajectory-tracking experiments are conducted. A grid map is first created so that QBot2e is aware of the obstacles around it. A depth map of the environment is generated using QBot2e’s Microsoft Kinect sensor and combined with the robot’s position and orientation for map construction, as shown in Fig. 13.

Experimental environment.
The depth map of the environment is processed into a raster map required for robot path planning using image processing techniques, and three algorithms, SSA, ISSA and MISSA, are ported to the mobile robot QBot2e, and finally the starting point and end point are selected for path planning. Figure 14 shows the planning results.

Actual environment map path comparison.
From the planning results, it can be seen that the paths obtained by MISSA outperform the SSA and ISSA in terms of path length, number of turns and turn angle, indicating that MISSA has certain superiority. The path points obtained from the algorithm planning are sent to the robot one by one, and by comparing them with the robot’s position, the robot is controlled to move using a PID controller to track the trajectory until the robot reaches the target point. Considering the small friction between the robot and the laboratory floor, in order to prevent the robot from slipping and generating position deviation during the trajectory tracking process, this paper limits the robot’s moving speed, but does not affect the overall operation effect. By tracking the path in Fig. 14, the actual running route is basically consistent with the algorithm planning route. The actual operation effect is shown in Fig. 15. The practicality of MISSA in practical situations is illustrated through physical experimental verification.

Actual operation effect.
In this paper, MISSA is proposed to address the shortcomings of SSA in AGV path planning. Firstly, the algorithm’s optimization ability is increased by improving the position updating formula, introducing the Levy flight variation strategy, and optimizing the boundary processing mechanism; then, the path quality is improved by adopting large-scale neighborhood search strategy and path smoothing mechanism. Through simulation experiments and physical verification, the feasibility and practical value of MISSA in the application of AGV path planning are proved, and it provides an effective solution to the AGV path planning problem.
The focus of this paper is mainly on global single-objective path planning, and in the future, it could be considered to be applied to multi-AGV coordinated path planning and multi-objective path planning, in addition, this paper does not involve the study of path planning in dynamic environments, and in the future, it could be considered to integrate this algorithm with local path planning algorithms, to realize the path planning that includes dynamic obstacles.
Footnotes
Acknowledgments
This work was supported by National Natural Science Foundation of China under Grant 62103127, Youth Natural Science Foundation of Hebei Province under Grant F2020201048, Funded by Science and Technology Project of Hebei Education Department under Grant BJK2023057 and Advanced Talents Incubation Program of the Hebei University under Grant 521000981366.
