## 2 Models
### Adaptive Heuristic Function and Segment Parallel A*(SPA*)
 \tag{9}\]  
where \(\widetilde{f_{1}}\) and \(\widetilde{f_{2}}\) denote the row-column coordinate forms of the scalar risk and vector risk defined in 2.1, respectively; \((x_{i^{\prime}},y_{i^{\prime}})\) denotes the rank coordinates of the eight expandable grids around \((x_{i},y_{i})\); \(\alpha\) denotes the weight, with larger values indicating more emphasis on the minimization of \(f_{1}\); conversely, more emphasis on the minimization of \(f_{2}\). So traditionally, a static and dynamic approach would be taken to control the coefficients in Equation (9) to make \(g(cell_{i})\) and \(h(cell_{i})\) close to one magnitude, thus reaching the possibility of \(h(cell_{i})=h*(cell_{i})\). This way, A* can perform the best. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Number** & **Condition** & **Result** \\ \hline
1 & \(h(cell_{i})=0\) & A* degenerates to Dijkstra. The algorithm will expand the grids without difference until it expands to the end grid. \\
2 & \(h(cell_{i})\leq h*(cell_{i})\) & A* is guaranteed to find the shortest circuit. And the smaller \(h(cell_{i})\) is the more grids the algorithm will expand. This causes the algorithm to slow down. \\
3 & \(h(cell_{i})>h*(cell_{i})\) & A* is not guaranteed to find the shortest path, but the algorithm will be faster at this point. \\
4 & \(h(cell_{i})\gg h*(cell_{i})\) & A* is converted to breath first search (BFS). At this point the algorithm is very fast and will expand the grids as little as possible. \\ \hline \hline \end{tabular}
\end{table} 
Table 1: The effect of the setting for the A* heuristic function on the speed and accuracy of the path planning. The static approach is usually to let w be a constant value. Figure 2a,b shows the results obtained by making \(w\) 0.3 and 0.15, respectively. It can be seen that Figure 2a corresponds to Table 1 between cases 3 and 4, while Figure 2b corresponds to Table 1 between cases 1 and 2. The number of grids expanded in the former case is obviously not enough to support an optimal route. The latter expands the number of grids to ensure that it obtains an optimal track, and it expands too many useless grids. The dynamic approach usually searches fast in the first half of the algorithm and slows down the search in the second half of the algorithm. Figure 2c shows that the algorithm is designed so that \(w\) is 0.3 in the first 50% of the path and 0.15 in the second 50% of the path. It can be observed that the dynamic approach also does not achieve satisfactory results and does not get sufficient search in the first half of the path. In conclusion, it is difficult to achieve satisfactory results with the traditional mechanism of regulating w. It is possible to get a good value of \(w\) by continuously trying to take values of \(w\), but more often the cases of Figure 2a-c occur. Based on the above, we propose an adaptive heuristic function applicable to control scalar risk and vector risk in ship track planning, i.e., the following Equation (10). \[ \begin{array}{ll}\widetilde{h}(cell_{i},g(cell_{i}))&=h(cell_{i})\cdot g( cell_{i})\\ &=euclidean(cell_{i},\text{goalpoint})\cdot g(cell_{i})\\ &=g(x_{i},y_{i})\sqrt{\left(x_{i}-x_{g}\right)^{2}+\left(y_{i}-y_{g}\right)^ {2}},\end{array}  \tag{10}\]  
where \(\widetilde{h}(\cdot)\) is the adaptive heuristic function, which requires independent variables \(cell_{i}\) and \(g(cell_{i})\). \(euclidean(cell_{i},\text{goalpoint})\) denotes the Euclidean distance from the grid \(cell_{i}\) to the  
Figure 2: Comparison between the effect of adaptive heuristic function planning and the effect of traditional heuristic function. (**a**) \(w\) is 0.3; (**b**) \(w\) is 0.15; (**c**) the first half of the route \(w\) is 0.3, and the second half of the route \(w\) is 0.15. (**d**) \(w\) is adjusted by the adaptive heuristic function in this paper. endpoint. By changing the heuristic function of A* to \(\widetilde{h}(\cdot)\), we obtain the results in Figure 2d. Compared with Figure 2a-d, it is obviously closer to the target of \(h(cell_{i})=h*(cell_{i})\).