# B-Spline Curve Fitting of Hungry Predation Optimization on Ship Line Design
## 5 HPA Algorithm Test
### Comparison with Existing Research  
When we deal with the problem of knot placement, except for the method of combining optimization algorithm, B-spline curve fitting based on adaptive curve refinement using dominant points (DOM), KTP, NKTP, KRM etc. are the best representative methods, as shown in Table 1. Figure 11 is a comparison example of HPA in this paper and DOM method. [PERSON] compared related algorithms, as shown in Figure 12. Furthermore, we add the fitting results of GWO and HPA to Figure 12. Compared with related methods, HPA uses less control points under the same accuracy. As shown in Figure 11, the same face contour is fitted with the same 15 control points. From the fitting results, it can be seen that the HPA proposed in this paper can better \begin{table}
\begin{tabular}{c c c c c} \hline \hline  & \begin{tabular}{c} **Incremental Method** \\ **Using KTP or NKTP** \\ \end{tabular} & \begin{tabular}{c} **Knot Removal Method KRM** \\ \end{tabular} & \
\begin{tabular}{c} **Incremental Method Using** \\ **DOM** \\ \end{tabular} &
\begin{tabular}{c} **Adaptive Adjustment** \\ **Using HPA** \\ \end{tabular} \\ \hline Preprocessing & 1 Parameterization & 1 Parameterization & 1 Parameterization & 1 Parameterization \\  & 2 Interpolation of all points & 2 Selection of seed points & 2 Find feature points \\  & 1 Knot placement & 1 Knot placement & 1 Knot placement \\  & 2 Least-squares & 1 Selection of a candidate knot & 2 Least-squares & 2 Least-squares \\ Iteration process & 2 Least-squares & 2 Deviation check & 2 Deviation check & 3 Deviation check & 3 Comparative fitness \\  & 3 Deviation check & 3 Knot removal & 4 Selection of a new & 4 Knot adaptive \\ Ref. & [23; 30] & [31] & dominant point & adjustment \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Comparison of related fitting methods. Figure 11: Comparing (a) the face data points and the fitting results of (b) DOM and (c) HPA especially at 1–3 marked. Figure 12: Comparison of control point number used at the same fitting error with DOM, KTP, NKTP, KRM, GWO and HPA. represent the curve shape of face contour, especially at specially marked 1, 2 and 3 points, which are fuller at the tip of nose and more prominent at the chin compared with DOM. Operational efficiency is an important criterion for judging the pros and cons of an algorithm. However, due to the different research periods of each algorithm, there are differences in both software and hardware. It is not objective to simply compare the running time with previous literature. The optimization algorithms of the natural heuristic class take a similar time for each iteration, and it is fairer to compare the convergence of the same number of iterations. This paper selects six representative optimization algorithms for face contour fitting: Genetic Algorithm [40], Differential Evolution Algorithm [41], Grey Wolf Algorithm [42; 43], Whale Algorithm [44], Particle Swarm Algorithm [45] and Gravity Algorithm [46]. The search ability and convergence efficiency of HPA and other algorithms are compared when using 15 control points, as shown in Figure 13.  
It can be seen from the above experiments that after knot guidance technology, the algorithm can find a better solution in the first generation. Compared with other algorithms, HPA tends to have higher fitting accuracy and achieve faster convergence at the same number of iterations. Besides, DE, WOA and HPA demonstrate stronger search capabilities. The DE algorithm uses a greedy algorithm, which makes the entire calculation time approach twice that of other algorithms. The paper further selects the six models mentioned in the literature [19] for testing, as shown in Table 2, and compares them with the GWO method mentioned in the literature. The results of fitting the model are shown in Figure 14 and Table 3.  
It can be seen that the fitting results of the HPA method proposed in this paper for the six models are much better than GWO method at the same population size, iteration number, data points and number of knots.