# Salp Swarm Algorithm Optimized A* Algorithm and Improved B-Spline Interpolation in Path Planning
## 2 Path Planning Algorithm
### Improvement of the A* Algorithm
#### 2.2.2 Optimization Using the SSA
The average curvature of the improved algorithm's smoothed path decreased by 59.96% compared to the initial path. Figure 11 shows the performance comparison of all maps in the test set, categorized by size. It presents line graphs of the minimum distance to the nearest obstacle, the average distance to the nearest obstacle, and the average curvature for two types of maps with a size of 20 \(\times\) 20. The same classification and visualization are applied to the other two map sizes. From the figure, it is clearly observed that the distance from the path smoothed by the improved B-spline algorithm to the nearest obstacle is always the largest, the average distance to the nearest obstacle is also the largest, and the average curvature is moderate, significantly reduced compared to the original path. ### Benchmark Tests

The tests were conducted using the city/street maps dataset from the MovingAI 2D Pathfinding Benchmarks, running on hardware with a Ryzen 7 6800H/RTX 3060 Laptop GPU configuration, with the algorithm implemented in Python 3.12. Figure 12 presents the results of benchmark tests on a 256 \(\times\) 256 map. (a) corresponds to the path generated by the SSA-A*. (b) corresponds to the path generated by the Classical A* Algorithm. (c) corresponds to the path generated by [PERSON]'s Algorithm. (d) corresponds to the path generated by the JPS-A* Algorithm. (e) corresponds to the path generated by ACO. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Map ID**} & \multirow{2}{*}{**Algorithm**} & \multicolumn{3}{c}{**Cluster Maps**} & \multicolumn{3}{c}{**Random Maps**} \\ \cline{3-8}  & & **MD** & **AD** & **AT** & **MD** & **AD** & **AT** \\ \hline \multirow{3}{*}{14} & A & 0.0000 & 0.9868 & 0.1636 & 0.0000 & 0.9388 & 0.3366 \\  & B & 0.0702 & 0.9931 & 0.0487 & 0.0606 & 0.9384 & 0.1163 \\  & C & 0.4245 & 1.2563 & 0.0641 & 0.1057 & 1.1389 & 0.1701 \\ \hline \multirow{3}{*}{15} & A & 0.0000 & 0.5984 & 0.2199 & 0.0000 & 0.5090 & 0.2618 \\  & B & 0.0365 & 0.6015 & 0.0754 & 0.0419 & 0.5247 & 0.0702 \\ \cline{1-1}  & C & 0.3309 & 0.9086 & 0.0961 & 0.2562 & 0.8942 & 0.1368 \\ \hline \hline \end{tabular}
\end{table} 
Table 5: _Cont._Table 6 presents the performance comparison results of various path planning algorithms in benchmark tests. The test results demonstrate that the SSA-A* reduces pathfinding time by 93.69% compared to the A* algorithm and by 93.30% compared to [PERSON]'s Algorithm. The paths planned by the SSA-A*, JPS-A* algorithm, and ACO exhibit increases of 4.08%, 30.75%, and 32.65%, respectively, relative to the shortest path, while their average runtime accounts for 6.31%, 352.38%, and 210.45% of the A* algorithm's runtime. This discrepancy arises because the JPS -A* algorithm incurs redundant computations due to its jump strategy in real-world scenarios with irregular obstacles, leading to inefficiency and longer planned paths. Meanwhile, the ACO tends to select suboptimal branches in early iterations due to randomness, resulting in circuitous paths. In contrast, the SSA-A* demonstrates superior performance in both path length and planning time. Figure 11: Performance comparison of the test set. (**a–c**) present line graphs of the minimum distance to the nearest obstacle, the average distance to the nearest obstacle, and the average curvature for two types of maps with a size of 20 \(\times\) 20, respectively; (**d–f**) present line graphs of the minimum distance to the nearest obstacle, the average distance to the nearest obstacle, and the average curvature for two types of maps with a size of 35 \(\times\) 35, respectively; (**g-i**) present line graphs of the minimum distance to the nearest obstacle, the average distance to the nearest obstacle, and the average curvature for two types of maps with a size of 50 \(\times\) 50, respectively. Figure 13 presents the benchmark test results of five path smoothing algorithms on a 256 \(\times\) 256 map.