## 3 Methodology
### Motion-Encoded Mechanism  
The particle's encoding in PSO determines how a solution is represented in the search space, and this encoding is typically tailored to the particular optimization issue in question. In the context of the UAV cooperative target search problem, a widely used method of representing the position of a particle is by defining it as a set of nodes that represent the path taken by the UAV during the search. Utilizing this encoding technique allows for a clear and intuitive representation of the desired search path, which is advantageous for evaluating adaptability. However, it may not adequately encompass the surrounding nodes throughout the search, resulting in the creation of erroneous paths. In addition, a method based on angle encoding has also been proposed in [25], which has achieved better results in dealing with path planning problems with specific constraints. However, the phase angle of the particle is constrained within a specific range, \([-\pi/2,\pi/2]\). Additionally, it is worth noting that the particle's search capability is also limited. To address the aforementioned issues, reference [13] proposed a motion-encoded particle swarm optimization algorithm (MPSO). It is assumed that the UAV can only move into the eight adjacent grid cells in each time step. The motion can be represented as a vector \(\gamma_{t}=(\phi_{t},\vartheta_{t})\), where \(\phi_{t}\) denotes the motion amplitude and \(\vartheta_{t}\) denotes the motion direction at time \(t\). Assuming that the UAV searches for a dynamic target in \(t\) time steps, the particle positions can be characterized accordingly as:  
\[S=\{\gamma_{1},\gamma_{2},\ldots,\gamma_{t}\},\ \ \ t=1,2,\ldots,T \tag{18}\]The search paths of multi-UAVs are coded simultaneously using motion encoding, as depicted in Figure 3. A search path, denoted as \(S_{i}\), comprises \(T\) motion segments representing the position of each population individual. Therefore, if we have information on the initial position of the UAV and the direction of movement for each successive step, we can accurately represent the UAV's search path, as depicted in Figure 4. The color of the grid is indicative of the probability of the target materializing at that particular position. The red dot represents the location of the UAV, while the white arrow in the top left corner indicates the direction of movement of both the UAV and the target towards the adjacent eight grid cells. In the process of updating the particles, it is essential to assess particle adaptation by mapping the motion vectors of each step to the search route nodes of the UAV. The method is as follows. Figure 4: Motion-encoded based search path representation. Figure 3: Motion-encoded population individuals. Firstly, the motion amplitude and motion direction are normalized:  
\[{\phi_{t}}^{\prime}=1 \tag{19}\]  
\[{\theta_{t}^{\prime}}=\frac{\pi}{4}\Big{\langle}{\theta_{t}}/\frac{\pi}{4}\Big{\rangle} \tag{20}\]  
where the motion amplitude is normalized to 1, \(\langle\cdot\rangle\) represents the rounding operator, and the motion direction is quantified as the direction from the current position to the 8 neighboring grids. Then, the position vector of the current moment is added with the normalized motion vector to get the position vector of the next moment:  
\[{\chi_{i,t+1}}={\chi_{i,t}}+{\gamma_{i,t}^{\prime}} \tag{21}\]  
\[{\gamma_{i,t}^{\prime}}={\phi_{t}}^{\prime}\big{(}\big{\langle}{\cos{\theta_{ t}^{\prime}}}\big{\rangle},\big{\langle}{\sin{\theta_{t}^{\prime}}}\big{\rangle} \big{)} \tag{22}\]  
In general, MPSO improves the movement and variety of the particle swarm in the search area by using a more adaptable encoding method, which ultimately enhances the algorithm's ability to do global searches. Furthermore, this method ensures that the spacing between adjacent nodes in the trajectory aligns with the UAV's maneuverability, thereby ensuring the reachability of the nodes in the path.