## 3 CPIO Algorithm with Cooperation-Competition Mechanism
### CPIO and Cooperative Search  
In biology, a population may divide into some subgroups [32; 33]. In the face of natural enemies, the subgroups will cooperate to resist. Nevertheless, they also compete with each other in the interests of food, mating, territory, and so on. Cooperation and competition make the population survive and evolve better. To simulate these natural behaviors, UAVs work together to complete the search task via information interaction, in the mean time UAVs compete with each other to search the specific vital cells. We propose a CPIO algorithm based on the cooperation-competition mechanism as the search algorithm for MUCS, as shown in Figure 3. In which, one subgroup pigeons is abstracted as one UAV. The cooperation-competition relationship between pigeons reflects the cooperative relationship between UAVs.  
MUCS based on CPIO is composed of three parts: CPIO, UAVs, and environment model. The principle of which is shown in Figure 4. In the CPIO module, the initial information of the environment, the environment information detected by the UAVs and the real-time pose signals of the UAVs are modeled as prior information. This information is then transmitted to the reward function \(J_{1}\). \(Subgroup_{i}\) transforms the optimal solution obtained by the cooperative-competitive mechanism into discrete flight signals. And these signals will be transmitted to \(UAV_{i}\) at each time step. Thus, the cooperation-competition mechanism can be described as follows:  
**Cooperation mechanism**  
* Get the maximum \(P_{e}^{m,n}(k)\) and the maximum \(\Delta\chi_{e}^{m,n}(k)\)
* Stay away from airports and search for more unknown regions
* Avoid searching locally highly remunerated cells  
**Competition mechanism**  
* Forbid UAVs to search for the same cell at the same time step
* Avoid UAVs repeatedly searching the same cell
* Stay away from other UAVs to search more unknown cells  
Under all constraints, the subgroup that maximizes the total rewards will win. Cooperation and competition are not entirely opposed to each other. The winning subgroup will search the controversial cell, and the other subgroups compete to search other cells. The result of the competition mechanism is consistent with the original intention of the cooperation mechanism.  
Let \(fitness(\cdot)=J_{1}\), thus Equation (15) can be transformed into:  
\[L_{center}^{v-1}=\frac{\sum\limits_{a=1}^{C_{a}^{v-1}}L_{k}^{v-1}\cdot J_{1}(L_{a }^{v-1})}{C_{2}^{v-1}\cdot\sum\limits_{a=1}^{C_{2}^{v-1}}J_{1}(L_{a}^{v-1})}. \tag{17}\]  
In the searching region, \(L_{a}^{u}\) and \(L_{a}^{v}\) are neighbor cells of \(L_{a}^{u-1}\) and \(L_{a}^{v-1}\), respectively. Under the constraint of Equation (6), the position (orientation) in the PIO algorithm can be expressed as:  
\[L_{a}^{u}=\{(L_{a}^{u-1}-1)\bmod 8,L_{a}^{u-1}\bmod 8,(L_{a}^{u-1}+1)\bmod 8\}, \tag{18}\]  
\[L_{a}^{v}=\{(L_{a}^{u-1}-1)\bmod 8,L_{a}^{v-1}\bmod 8,(L_{a}^{v-1}+1)\bmod 8 \}=L_{a}^{u-1}+rand\cdot(L_{center}^{u-1}-L_{a}^{u-1}). \tag{19}\]  
The MUCS process based on the CPIO algorithm can be expressed as Algorithm 1.  
Figure 4: Schematic diagram of MUCS based on cooperation-competition mechanism.  
Figure 3: CPIO algorithm for MUCS.  
```
0:Initializing environmental information and pose information of \(UAV_{i}\). Output: The searching trajectory of every UAV and its searching time steps \(T_{i,1}(k)\).
1:begin:
2:for\(k=1,...,T_{i}\)do
3: Predict N time steps in advance, and get the alternative paths.
4: Delete the paths that does not satisfy Equation (8).
5: Use the CPIO algorithm to find the path with the highest fitness value among the remaining paths.
6:while\(UAV_{i}\) receives the return order, \(UAV_{i}\) returns to the airport.
7: Record the searching trajectory and searching time steps \(T_{i,1}(k)\) when \(UAV_{i}\) returns.
8:endwhile
9:endfor
10:endfor
```  
**Algorithm 1** MUCS based on CPIO algorithm