# An Improved Pied Kingfisher Optimizer for Maritime UAV Path Planning
## 2 Principle of the Improved PKO Algorithm  
### Pied Kingfisher Optimizer  
The Pied Kingfisher Optimizer (PKO) [22] is an innovative metaheuristic algorithm that draws inspiration from the unique hunting behaviors and mutualistic relationships observed in Pied Kingfishers. Similar to other swarm intelligence algorithms, the PKO generates random initial solutions during the initialization phase. \[ \begin{array}{l}X_{ij}=X_{LB}+(X_{UB}-X_{LB})\times r\\ i=1,2,\ldots,n;\ j=1,2,\ldots,m\end{array}  \tag{1}\]where \(X_{i,j}\) refers to the location of the ith individual at the jth dimension; r represents a random value between 0 and 1; \(X_{\mathit{U}B}\) and \(X_{\mathit{L}B}\) refer to the upper and lower bounds, respectively, of the search range. The positions of the pied kingfishers are iteratively updated using the following equation. The initial phase of the PKO algorithm is inspired by foraging techniques employed by pied kingfishers, which adaptively switch between perching and hovering strategies to catch prey, depending on environmental conditions. In the PKO, the search agents' locations emulate these avian feeding behaviors and undergo dynamic adjustments through the following formula:  
\[ \begin{array}{l}X_{i}(t+1)=X_{i}(t)+\alpha\times T\times(X_{j}(t)-X_{i}(t)), \\ i,\ j=1,2,\ldots,N\ \&\ j\
eq i\end{array}  \tag{2}\]  
where the variable \(X_{i}(t+1)\) signifies the prospective location of the pied kingfisher in the subsequent iteration, while \(X_{i}(t)\) corresponds to its present location. The term \(\alpha\) is a randomly generated number that adheres to a normal distribution. The parameter \(N\) denotes the total population size within the group. Meanwhile, the parameter \(T\) is assigned a value that fluctuates according to the adopted strategy, which can be either \"perching\" or \"hovering.\" The determination of \(T\) is customized for each strategy to guarantee optimal performance under varying operational conditions. The calculation of the parameter T in the perching strategy is as follows:  
\[T=(\exp(1)-\exp\left(\frac{t-1}{M}\right)^{\frac{1}{H}})\times\cos(2\pi r) \tag{3}\]  
where the upper limit of iterations is set to \(M\); the \(H\) denotes a constant value of 8, and \(r\) is a random value ranging from 0 to 1. The calculation of the parameter \(T\) in the hovering strategy is outlined as follows:  
\[T=B_{r}\times(\frac{t}{M})^{\frac{1}{H}} \tag{4}\]  
\[B_{r}=r\times(\frac{\mathit{fit}(j)}{\mathit{fit}(i)}) \tag{5}\]  
where the fitness of the \(i\)th and \(j\)th pied kingfishers are represented by \(\mathit{fit}(i)\) and \(\mathit{fit}(j)\), respectively. Upon detecting its aquatic prey, the pied kingfisher swiftly dives from a considerable height above the water's surface and employs rapid and precise bill movements to capture its prey. The mathematical representation of this behavior is presented below. \[X_{i}(t+1)=X_{i}(t)+H_{A}\times o\times\alpha\times(b-X_{best}(t)) \tag{6}\]  
\[H_{A}=r\times(\frac{\mathit{fit}(i)}{f_{b}}) \tag{7}\]  
\[o=\exp\left(-\frac{t}{M}\right)^{2} \tag{8}\]  
\[b=X_{i}(t)+o^{2}\times r\times X_{best}(t) \tag{9}\]  
where the \(f_{b}\) represents the global optimal fitness value, \(\alpha\) is a control parameter within the range of \(-1\) and \(1\). Consequently, others can effectively capture more fish with the assistance of birds in provoking fish out from their concealed locations. Conversely, kingfishers exploit the presence of otters by preying on fish that are flushed out as a result. This interdependent relationship between species implies a mutualistic arrangement, which is mathematically elucidated below:  
\[X_{i}(t+1)=\left\{ \begin{array}{ll}X_{m}(t)+o\times\alpha\times|X_{i}(t)-X_{n} (t)|,\;if&r>(1-PE)(a)\\ X_{i}(t)&,\;otherwise(b)\end{array} \right. \tag{10}\]  
\[PE=PE_{\max}-(PE_{\max}-PE_{\min})\times(\frac{t}{M}) \tag{11}\]  
where a pair of individuals is arbitrarily selected from the population, and their positions are designated as \(X_{m}\) and \(X_{n}\).