# 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
As shown in (a) and (e), the original path contains multiple dangerous points near obstacles, with the distance between the path and obstacles being too small, which could lead to collisions. In (b) and (f), after B-spline interpolation smoothing, the path becomes noticeably smoother and more continuous, with no sharp corners; however, the path still remains too close to the obstacles. As shown in (c) and (g), after smoothing with the improved B-spline algorithm, the path not only maintains a safe distance from the obstacles but also remains continuous and smooth. The performance of the original path, the path smoothed by the B-spline algorithm, and the path smoothed by the improved B-spline algorithm is evaluated below. The evaluation primarily focuses on two key metrics: the curvature of the path and the distance from the path to the nearest obstacle. The logic for calculating the degree of meandering is as follows: As shown in Figure 9, adjacent points in the path are connected to form two vectors. The angle between these

Figure 8: Smoothed paths of various algorithms. The first three figures are high-density maps with clustering. (**a**) represents the original path, (**b**) represents the path smoothed by B-spline, and (**c**) represents the path smoothed by the improved B-spline. The last three figures are low-density maps with random distribution. (**d**) represents the original path, (**e**) represents the path smoothed by B-spline, and (**f**) represents the path smoothed by the improved B-spline. vectors is calculated, and the rate of change in this angle is determined. This rate of change is defined as the degree of meandering. A smaller degree of meandering indicates a smoother path. The distance from the path to the obstacle is one of the important indicators for measuring the safety of the path. The greater the distance from the path to the obstacle, the higher the safety and reliability of the path. Here, the distance from each point on the path to the nearest obstacle is calculated to assess the safety of the path. In Figure 10, (a) and (b) compare the curvature of the paths and the distance from the paths to the nearest obstacle for each algorithm on the clustered map displayed above. (c) and (d) compare the curvature of the paths and the distance of the paths to the nearest obstacle for each algorithm on the random map displayed above. As can be seen from the figures, after smoothing with the improved B-spline algorithm, the path maintains the largest distance from the nearest obstacle, with a moderate curvature, thereby meeting the requirements. Figure 10: Performance comparison of each path. (**a**,**b**) represent the performance analysis of the high-density clustered map shown previously; (**c**,**d**) represent the performance analysis of the random low-density map shown previously. Figure 9: Method for calculating the degree of meandering. The following conclusions can be drawn:

In the high-density clustered map, the average minimum distance from the smoothed path of the improved B-spline algorithm to the nearest obstacle increased by 0.5142 compared to the initial path and by 0.4776 compared to the B-spline algorithm's smoothed path. The average distance from the improved B-spline algorithm smoothed path to the nearest obstacle increased by 43.05% compared to the initial path and by 39.82% compared to the B-spline algorithm smoothed path. The average curvature of the improved algorithm smoothed path decreased by 61.87% compared to the initial path. In the low-density random map, the average minimum distance from the improved B-spline algorithm's smoothed path to the nearest obstacle increased by 0.2137 compared to the initial path and by 0.2082 compared to the B-spline algorithm's smoothed path. The average distance from the improved B-spline algorithm's smoothed path to the nearest obstacle increased by 42.20% compared to the initial path and by 41.04% compared to the B-spline algorithm's smoothed path.