# Emergent Search of UAV Swarm Guided by the Target Probability Map
## 4 The Steps of ESUSTPM  
When UAV swarm executes the ESUSTPM algorithm, the environment information, the target information and the information of the nearby neighbors determine the profit of each UAV in the next step. Then, UAV agents calculate the next moving velocities. Thus, UAV swarm can achieve full coverage of the mission area, target search and reduction in environmental uncertainty as far as possible. The block diagram of ESUSTPM is shown in Figure 4.  
The steps of the proposed ESUSTPM algorithm are listed as follows:  
1. Build and initialize the environmental map, target existing information map, UAV coordinates, target coordinates. The target coordinates are unknown to the UAV agents at the initial time. Figure 3: The curves of the parameters in the local rules. (**a**) The curve of \(a_{i}(d_{i})\); **(b)** The curve of \(g_{i}(d_{i})\); **(c)** The curve of the proposed function \(\beta_{i}\). 2. Adopt Equations (6)-(9) to calculate the next velocity \(\overset{\rightharpoonup}{mvel}\) of each UAV agent; then, the UAV agent updates self-speed and position. 3. Update the target existing probability of the mission area; then, each agent performs the same operations in Equations (2) and (3) until UAV swarm covers the entire area or finds all targets. If there is no target in the environment, UAV agents will achieve full coverage of the mission area by the TEP guidance. Conversely, UAV agents will repeatedly visit the nearby grid with the highest TEP until the targets are finally identified. After the targets are found, the agents will continue to execute the coverage of the remaining area until the environmental uncertainty falls below the given threshold. In order to introduce the flow of the ESUSTPM algorithm guided by the target probability map clearly, the corresponding pseudocode of ESUSTPM is shown in Algorithm 1. ``` //Initialization Create and initialize environmental information map, target existing probability map \(TPM_{10\times 10}\), target coordinates, UAV coordinates \(P\) and UAV number M. Initialize the parameters \(c_{i}\), \(k_{i}\), \(\sigma_{i}\), \(t_{i}\), \(\delta_{i}^{\prime}\), time interval \(\Delta t\) and the simulation time cost \(T\). //Main loop For \(t=1\): \(\Delta t\):\(T\)  For \(i=1\):\(\mathrm{I}\):\(\mathrm{M}\)  Calculate the velocity \(v_{i}\) of the agent \(i\) according to Equation (6). \(P_{i+1}=P_{i}+v_{i}\Delta t\) \(\mathbf{m}^{\prime}\), \(\mathbf{n}^{\prime}=\) map(int, \(P_{i+1}\)) //Round the abscissa and ordinate of the monomer  if (\(\mathbf{m}^{\prime}\), \(\mathbf{n}^{\prime}\)) equals the coordinate of the grid that the target exists in {  Update the TPM[m'][n'] according to Equation (4)  jelseif (\(\mathbf{m}^{\prime}\), \(\mathbf{n}^{\prime}\)) equals the coordinate of the grid that the target does not exist in {  Update the TPM[m'][n'] according to Equation (5)  jelseif the grid cannot be visited {  According to Equation (3), the corresponding TPM of the grid cannot be updated } If the TEP of a grid is more than the given value, the target is discovered. End  If all targets are found or the environmental uncertainty is lower than the given value, the algorithm stops. End

Figure 4: The block diagram of ESUSTPM. ## 5 Simulation Experiment

To verify the feasibility and superiority of the proposed ESUSTPM method, three simulation scenarios are carried out in a rectangular area with a certain number of UAVs and targets. Four searching algorithms, including the classical random searching algorithm, the mower searching algorithm, the searching algorithm based on Boids model with guidance and the searching algorithm based on Boids model without guidance, are used for comparative experiments. Three criteria, including the visited grid number, the environmental uncertainty and corresponding statistical metrics, are used as the metrics to verify the effectiveness of the ESUSTPM algorithm.