# An Improved Pied Kingfisher Optimizer for Maritime UAV Path Planning
## 2 Principle of the Improved PKO Algorithm
### Improved PKO Diving Phase Update Formula
The dynamic adjustment of the helix factor facilitates a transition from initial global exploration to later-stage localized fine-tuning, attaining equilibrium between global exploration and local optimization. The mathematical model for determining the helix coefficient is presented as follows:  
\[\omega=\beta\times\cos(k\times l\times\pi) \tag{15}\]\[\beta=\left\{ \begin{array}{ll}1\,,t<\frac{M}{2}\\ e^{5\times l}&,\text{otherwise}\end{array} \right. \tag{16}\]  
\[l=1-2\times\frac{t}{M} \tag{17}\]  
where \(\omega\) represents the variable helix coefficient, a key parameter utilized to dynamically modulate the extent of the helix search for enhancing the algorithm's effectiveness at different search stages. In the initial stage, \(\omega\) is set to \(1\), allowing for an expanded coverage of the search path and thereby augmenting global search capability. As iterations progress in later stages, \(\omega\) gradually decreases, narrowing down the search range to improve the precision in local optimization. Parameter \(\beta\) functions as a control mechanism for spiral behavior, initially configured with a value of \(1\) during the early stages, with a gradual decrease occurring as the number of iterations increases in subsequent phases. \(k\) denotes the parameter representing the period of the spiral. Typically, parameter M/2 is defined as the variable that decreases linearly from \(1\) to \(-1\) as the iterations progress. Based on the analysis of the aforementioned equations, an improved update formula for the development phase of the Pied Kingfisher algorithm is proposed, incorporating the variable helix sine-cosine algorithm. This enhancement capitalizes on the robust exploitation capability of the sine-cosine algorithm to further reinforce the developmental phase of the Pied Kingfisher algorithm, while also employing oscillatory spirals to enable effective discovery and utilization of new areas within this algorithm. The updated formula for the Pied Kingfisher's development phase is presented as follows:  
\[X_{i}(t+1)=\left\{ \begin{array}{ll}\omega X_{i}(t)+H_{A}o\times\alpha\times r _{1}\sin(r_{2})\big{|}\,r_{3}P_{i}^{t}-b\big{|}&\text{if}r_{4}<0.5(a)\\ \omega X_{i}(t)+H_{A}\times o\times\alpha\times r_{1}\cos(r_{2})\big{|}\,r_{3 }P_{i}^{t}-b\big{|}&\text{if}\ r_{4}\geq 0.5(b)\end{array} \right. \tag{18}\]  
In Equation (18), all variables remain consistent with the preceding equations. The development phase of the Pied Kingfisher algorithm is relatively simple; therefore, so sine and cosine functions are used to generate candidate solutions for exploring the solution space. This algorithm achieves a balance between global and local search by leveraging the periodic oscillations of sine and cosine waves. However, fixed search step sizes and ranges can cause entrapment in local optima, especially in high-dimensional or multi-modal problems. To mitigate this limitation, the variable helix sine-cosine algorithm introduces variable helical paths during the search process. This approach combines spiral trajectories with sine-cosine functions, enabling dynamic adjustments to both the shape and direction of the search path. Figure 3: The schematic diagram of the sine\(-\)cosine algorithm with a weighting factor.