# Underwater Vehicle Path Planning Based on Bidirectional Path and Cached Random Tree Star Algorithm
## 4 Experiments
### Experiment Analysis  
Figure 4 portrays the path obtained through the basic RRT* algorithm. Owing to the stochasticity of sampling, the trajectory generated may differ despite having identical obstacle attributes and locations on the map. Notably, p has been assigned a fixed value of 5 in this study. The ellipsoidal entity highlighted in a brownish-red hue represents an obstacle, while the corresponding path is depicted in a highlighted brownish color. The green depictions signify nodes, whereas the expansion of nodes leads to connections with other pre-existing nodes within the field, as represented by thin red lines. The figure above demonstrates that the RRT* algorithm, which utilizes random uniform sampling, produces points uniformly distributed in the free space. While this approach explores the entirety of the spatial region, a majority of the randomly sampled points are not helpful for final path computation. To address this issue, the RRT* algorithm employs parent node optimization at every sampled point, causing more nodes within the vicinity of the new node to undergo optimization as the random tree expands. This leads to a considerably higher computational complexity and greater memory consumption. As delineated in Figure 5, the crimson trace represents the preliminary planning trajectory swiftly acquired via a bidirectional expansion of the random tree approach, while the highlighted tawny contour corresponds to the supremum trajectory fine-tuned by means of the Dijkstra algorithm. In comparison with the initial trajectory, the trajectory generated by the Dijkstra algorithm manifests a reduced number of sampling nodes. Table 1 displays the computational performance comparison of diverse techniques within a Python-based simulation setting while maintaining an equal number and location of obstacles, and consistent starting and ending points. Each procedure was implemented in 50 repetitions, generating 50 unique datasets of trajectory length and time allocation values that were subsequently combined using mean averaging. The table reveals that the RRT algorithm is characterized by high computational overhead and low node utilization. In contrast, the advanced RRT* algorithm proposed in this study, while mitigating  
Figure 4: Experimental results of RRT* algorithm. 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. Based on the analysis of Figure 6 and Table 2, it can be observed that utilizing path cache in path planning results in a high level of consistency in generating effective paths. Additionally, by reducing the randomness during sampling, fewer useless nodes are explored. However, the number of nodes does not decrease with the number of replans; this is dependent on the distance between the expansion step and start/end points. Under equal conditions and a certain step length, the path's length and nodes cannot be reduced infinitely, but rather tend towards an optimal solution. Although the number of path nodes has experienced fluctuations, the effectiveness of node utilization has increased significantly attributable to the concomitant decrease in their application. According to the two-way path planning and cached RRT* algorithm employed by the underwater robot, the alterations of the coordinates pertaining to a specific addressing pathway are visually depicted in Figure 7.  
After a comprehensive understanding of the efficacy of the enhanced algorithms, we conducted 100 simulation experiments under randomly generated obstacle environments for both algorithms. Concurrently, we documented the usage of nodes to scrutinize their stability and other parameters.