# The Path Planning of Mobile Robots Based on an Improved Genetic Algorithm
## 4 Experimental Results and Analysis
### MATLAB Simulation Comparison  
This paper uses the Windows 11 operating system and MATLAB R2023a simulation platform to set up the experimental environment, where the improved algorithm is verified and compared through simulations. Experiments were conducted on a 20 \(\times\) 20 grid for the traditional genetic algorithm, the A* algorithm, the method in reference [26] and the algorithm presented in this paper. The goal was to validate the effect of improved population initialization and the overall performance of the improved genetic algorithm. In the experiment, the bottom-left node was set as the starting point, and the top-right node was the endpoint. Table 1 shows the parameter settings, where the values of \(n_{max}\), K, a and b are determined through extensive experiments using the method of controlling variables. Figure 6: Schematic of Bezier Curve. Figure 7: The algorithm flowchart of this paper. Through simulation experiments, it can be observed that the traditional algorithm exhibits numerous turning points and lacks smoothness. The algorithm proposed in [26] reduces the number of turning points to some extent. However, the proposed algorithm in this study achieves only three turning points in both Map 1 and Map 2, significantly improving path smoothness. The traditional genetic algorithm converges slowly, while the algorithm in [26] improves the convergence speed. Nevertheless, the proposed algorithm identifies a near-optimal path during the population initialization phase and rapidly converges to the optimal path as iterations proceed, resulting in a shorter average computational time. Although the A* algorithm does not require iteration and has the shortest computation time, the quality of the resulting path is relatively poor. The optimal path lengths obtained using the proposed algorithm are 28.312 m for Map 1 and 27.516 m for Map 2. Compared to the traditional genetic algorithm, A* algorithm and the algorithm in [26], the path length in Map 1 is reduced by 6.5%, 5.2% and 1.9%, respectively, while \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Algorithm**} & \multirow{2}{*}{**Map**} & \multicolumn{2}{c}{**Initial**} & \multicolumn{1}{c}{**Optimal Path**} & \multirow{2}{*}{**Run Time**} & \multicolumn{1}{c}{**Optimal Path**} & \multicolumn{1}{c}{**Total Angle of**} & \multicolumn{1}{c}{**Optimal Path**} \\  & & **Optimal Path** & & **Length (m)** & & **Turning Points** & **Rotation** & **Iteration** \\ \hline Traditional genetic & Map 1 & 73.333 & 30.161 & 1.481 s & 13 & 10.209 & 44 \\ algorithm & Map 2 & 82.883 & 29.251 & 2.082 s & 14 & 10.995 & 46 \\ A* algorithm & Map 1 & - & 29.794 & 0.422 s & 9 & 7.068 & - \\ Map 2 & - & 29.213 & 0.474 s & 9 & 7.068 & - \\ The algorithm in & Map 1 & 48.284 & 28.852 & 4.824 s & 5 & 2.609 & 21 \\ reference [26] & Map 2 & 54.276 & 28.627 & 6.364 s & 6 & 4.712 & 24 \\ The algorithm in & Map 1 & 28.908 & 28.247 & 1.525 s & 3 & 1.052 & 13 \\ this paper & Map 2 & 28.614 & 27.464 & 1.907 s & 3 & 1.007 & 12 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Comparison of the three algorithms on the data of Map 1 and Map 2. Figure 10: The iterative process of the optimal path for the three algorithms on Map 1 and Map 2. (a) Map 1; (b) Map 2. Ref. a refers to reference [26]. Figure 9: The optimal paths obtained by the four algorithms on Map 2. (a) Traditional genetic algorithm; (b) A* algorithm; (c) The algorithm in reference [26]; (d) The algorithm in this paper. in Map 2, the reductions are 6.3%, 6.2% and 4%, respectively. The proposed algorithm outperforms all other algorithms in terms of path optimization. The simulation results show that the dichotomy method and multi-step population initialization significantly improve the path planning performance.