# Underwater Vehicle Path Planning Based on Bidirectional Path and Cached Random Tree Star Algorithm
## 4 Experiments
### Experiment Analysis
The results, as depicted in Figure 8, illustrate line graphs representing the runtime data derived from the aforementioned simulations. The two \begin{table}
\begin{tabular}{c c c c} \hline \hline  & \multicolumn{1}{c}{**Total Node Count**} & \multicolumn{1}{c}{**Total Path Node**} & \multicolumn{1}{c}{**Node Utilization/\%**} \\  & **Employed** & **Count Employed** & **Node Utilization/\%** \\ \hline Initial planning & 1902 & 42 & 2.20 \\ First & 1530 & 36 & 2.28 \\ Second & 1430 & 31 & 2.09 \\ Third & 1007 & 28 & 2.87 \\ Fourth & 871 & 24 & 2.86 \\ Fifth & 634 & 21 & 3.26 \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Node usage of path planning with path cache. Figure 6: Two-way expansion and path cache optimization RTT* algorithm effect diagram. The three-dimensional space depicted in the figure represents a synthetically simulated underwater environment. The variably sized reddish-brown spheres in the illustration simulate underwater obstacles. The thin red lines and green dots within the figure denote the exploration and planning processes. The thicker reddish-brown lines in the figure represent the ultimately planned optimal path. curves in Figure 8 reveal that, through numerous iterations of random obstacle experiments, the algorithm devised in this paper consistently requires fewer nodes to re-plan new paths when obstacles undergo changes. The enhanced algorithm incorporates a path cache offset to mitigate the likelihood of random sampling. This restriction on the number of nodes utilized curtails redundant calculations and diminishes memory consumption. Fundamentally, the execution time is predicated on the number of iterations, and therefore, a reduction in the quantity of nodes employed corresponds to a proportional diminution in running time. The RRT* algorithm introduces additional superfluous computations to attain improved outcomes. Nevertheless, the computational overhead incurred by this aspect has been partially mitigated via the utilization of path buffer offset sampling. Subsequently, the average computational  
Figure 8: The number of nodes in path planning before and after changes in obstacles. The figure depicts 100 iterations of repeated experiments with randomly changing obstacles. The orange curve represents the number of nodes in path planning before obstacles undergo changes, while the blue curve represents the number of nodes in path planning after obstacle modifications. Figure 7: Position change curve. Three curves represent the trajectory from the starting point to the endpoint in the three-dimensional coordinates of X, Y, and Z.  
time under both environments registered a 58.79% and 61.99% decline correspondingly. In general, the enhanced algorithm economizes around 60% of computation time, thereby demonstrating the interrelationship between node count and computation time. Additionally, since the quantum of calculations is directly proportional to the size of the random tree, declining node numbers further alleviates the dimensions of the random tree, culminating in a greater reduction in computation time relative to node count. To substantiate the efficacy of the design methodology proposed in this paper, empirical investigations were conducted utilizing three sophisticated optimization algorithms: the classical ant colony algorithm, the particle swarm algorithm, and the genetic algorithm. Comparative analyses were performed in simulated scenarios, examining performance metrics such as turning points and iteration counts. Figure 9 delineates the number of operations executed by the four algorithms to ascertain the optimal path. Despite the basic ant colony algorithm requiring 18 iterations for convergence, the particle swarm algorithm requiring 13 iterations, and the genetic algorithm necessitating 14 iterations, the optimization algorithm proposed in this study achieves convergence in only 8 iterations, vividly showcasing its prowess in identifying the shortest path. Table 3 presents a comparative analysis of simulation results for four algorithms.