# 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
In all cases, the JPS-A* algorithm shows an average increase in path length of 14% or more compared to the shortest path, while ACO shows an increase of 4.25%. In contrast, the SSA-A* increases the path length by only 0.5% to 2.2%, enhancing its suitability for practical applications. ### Path Smoothing Algorithm Simulation Experiment

#### 4.2.1 Parameters for the Path Smoothing Algorithm Simulation Experiment

Python was used as the development environment, and grid maps of sizes 20 \(\times\) 20, 35 \(\times\) 35, and 50 \(\times\) 50 were selected. The obstacle density and distribution methods were set to high-density clustering and low-density random, respectively, to represent the entire environmental information. The maps were categorized into six groups according to the above standards, with each group consisting of 15 different maps for testing. In the maps, the green circle represents the start point, the blue circle represents the endpoint, the light blue line represents the initial path, the orange line represents the path after smoothing with the B-spline algorithm, and the red line represents the path after smoothing with the improved B-spline algorithm. The parameters for the B-spline algorithm used in the simulation experiment are shown in Table 4. \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter Name** & **Parameter Value** \\ \hline Smoothing Factor (s) & 0.1 \\ Number of Interpolation Points & 100 \\ \hline \hline \end{tabular}
\end{table} 
Table 4: Parameter settings of B-spline interpolation. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multicolumn{2}{c}{**Map Size**} & \multicolumn{2}{c}{**20**} & \multicolumn{2}{c}{**35**} & \multicolumn{2}{c}{**50**} \\ \hline \multirow{2}{*}{**Map Type**} & **Cluster** & **Random** & **Cluster** & **Random** & **Cluster** & **Random** \\  & **Map** & **Map** & **Map** & **Map** & **Map** & **Map** \\ \hline \multirow{3}{*}{Average Time Reduction in SSA-A*} & vs. A* (\%) & 30.79\% & 36.56\% & 57.45\% & 63.09\% & 62.82\% & 67.75\% \\ \cline{2-8}  & vs. [PERSON] (\%) & 27.89\% & 59.35\% & 64.69\% & 77.85\% & 75.94\% & 84.12\% \\ \cline{2-8}  & vs. ACO (\%) & 95.57\% & 96.92\% & 95.16\% & 96.16\% & 95.04\% & 97.61\% \\ \hline \multirow{3}{*}{Average Searched Nodes Reduction in SSA-A*} & vs. A* (\%) & 67.17\% & 72.52\% & 78.87\% & 83.08\% & 81.86\% & 86.10\% \\ \cline{2-8}  & vs. [PERSON] (\%) & 84.64\% & 91.01\% & 92.58\% & 95.19\% & 95.00\% & 96.73\% \\ \cline{2-8}  & vs. ACO (\%) & 64.32\% & 71.83\% & 78.03\% & 77.43\% & 79.37\% & 82.75\% \\ \hline \multirow{3}{*}{Average Distance vs. A* (\%)} & \multirow{3}{*}{1.62\%} & \multirow{3}{*}{1.46\%} & \multirow{3}{*}{1.48\%} & \multirow{3}{*}{2.18\%} & \multirow{3}{*}{0.58\%} & \multirow{3}{*}{1.82\%} \\ \cline{2-8}  & vs. JPS-A* (\%) & & & & & & \\ \cline{1-1} \cline{2-8}  & vs. JPS-A* (\%) & 14.85\% & 18.93\% & 22.24\% & 22.33\% & 15.00\% & 21.96\% \\ \cline{1-1} \cline{2-8} Reduction in SSA-A* & vs. ACO (\%) & 4.45\% & 4.72\% & 2.17\% & 3.76\% & 5.41\% & 5.00\% \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Comparison of the average performance of the SSA-A* and other algorithms. In B-spline interpolation, the smoothing factor is used to control the smoothness of the B-spline curve, while the number of interpolation points determines the accuracy and computational complexity of the B-spline curve. After repeated experiments, the smoothing factor was set to 0.1, and the number of interpolation points was set to 100. #### 4.2.2 Results and Analysis of the Path Smoothing Algorithm Simulation Experiment

Based on the aforementioned simulation environment and parameter settings, simulation experiments were conducted to calculate the smoothed paths for different algorithms. The results are presented for a high-density clustered map of size 20 \(\times\) 20 (in the upper part of Figure 8) and a low-density random map (in the bottom part of Figure 8).