## 2 Models
### Adaptive Heuristic Function and Segment Parallel A*(SPA*)
Why does it achieve this effect? First, it expands each grid while modulating the heuristic function values according to \(cell_{i}\) and \(g(cell_{i})\). This ensures its flexibility. Second, its unique tuning mechanism. Due to \(g(cell_{i})\), \(euclidean(cell_{i}\), goalpoint) can easily reach an order of magnitude with \(g(cell_{i})\). It is a prerequisite for maximizing the performance of A*, so now how to make \(\widetilde{h}(cell_{i})=h*(cell_{i})\). In discussing Figure 2c, we found that its first half of the journey is too much \(h(cell_{i})\) than \(h*(cell_{i})\) because w is too large, so it does not expand the necessary number of grids. But the adaptive heuristic function need not be a concern. The value of \(euclidean(cell_{i}\), goalpoint) is larger and \(g(cell_{i})\) is smaller in the first half of the journey; the value of \(euclidean(cell_{i}\), goalpoint) is smaller and \(g(cell_{i})\) is larger in the second half of the journey. Then \(\widetilde{h}(\cdot)\) satisfies the variation law of \(h*(cell_{i})\). And because \(\widetilde{h}(\cdot)\) is acted by \(g(cell_{i})\) to the order of magnitude of \(h*(cell_{i})\). So \(\widetilde{h}(\cdot)\) has the property of being closer to \(h(\cdot)\) than the traditional \(h*(cell_{i})\). Satisfying this property, A* will expand the grid appropriately, thus enhancing its speed and effectiveness. In conclusion, when A* is given a heuristic function that is suitable for the task scenario, it will significantly reduce the useless grid expansion and enhance the risk control capability of A*. Based on the adaptive heuristic function, we propose a segmented parallel A* for route planning, inspired by the efficient data processing model of \"allocate and run simultaneously\" in parallel computing. The specific steps are as follows:  
_Step 1_: Generate a standard path from the start point to the end point, denoted as \(path_{o}\). The default standard path is a terrain risk minimization path generated by A* loaded with adaptive heuristic functions. However, experimentally, any user-approved path from the origin to the destination (empirical path) is allowed by SPA*, which enables further detailed planning of the standard path. This paper provides one of the following ways to generate terrain risk data:  
1. Collect the ranks and coordinates of all navigable grids and non-navigable grids (islands or land) to form a matrix. 2. Calculate the Euclidean distance of each navigable grid to all non-navigable grids in turn. If there are \(m\) navigable grids and \(n\) non-navigable grids, then there are \(mn\) distance values. If the row is the navigable grid number and the row is the non-navigable grid number, then a \(m\times n\)-dimensional matrix can be formed. 3. Find the minimum value in each row and then delete the rest of the values in each row, leaving a \(m\times 1\)-dimensional vector. This vector retains the distance values of the nearest non-navigable grid for each navigable grid. 4. Normalize the \(m\times 1\)-dimensional vector in (c) by the maximum and minimum values. The values in the vector are then inverted. The inverse processing is performed using the circular arc function (Equation (11)). It simultaneously slows down its increase to 1 and makes the terrain risk data more reasonable. \[ \begin{array}{ll}f_{M}&=1-\sqrt{1-(z-1)^{2}},\\ &z=[z_{1},z_{2},\cdots,z_{m}]^{T},\ 0\leq z_{i}\leq 1,\ i=1,2,\cdots,m,\end{array} \] (11) where \(z\) represents the risk value that needs reverse processing; \(f_{M}\) represents terrain risk data. Applying the above (a)-(d) to the illustrated sea area, the topographic risk heat map shown in Figure 3 can be obtained. The redder the color, the greater the terrain risk, and the bluer the color, the smaller the terrain risk. In summary, the processed vector can quantitatively reflect the risk of reef cuts and groundings of vessels passing through the grid. The smaller the value of a row in the vector, the lower the terrain risk of the corresponding grid; conversely, the higher the terrain risk.