# Multi-Population Parallel Wolf Pack Algorithm for Task Assignment of UAV Swarm
## 2 Basic Knowledge and Literature Review
### The Basics of WPA
#### 2.3.2 The Optimization Mechanism of the WPA  
The optimization process of the WPA is shown in Figure 1. There are three searching processes for the optimal solution in one iteration.  
Step 1: Walking behavior. Except the leader wolf, \(S\) (\(S=randint\left[\frac{N}{\alpha+1},\frac{N}{\alpha}\right]\)) best wolves become exploring wolves and explore the solution space by individual mutation, as Equation (9) and Figure 2 show. Then, the new position of wolf \(i\) will be the one that determines the objective value minimum, as expressed in Equation (10). Any exploring wolf better than the leader wolf will become the new leader wolf, then go to the next Step, otherwise Step 1 will be repeated. For the walking behavior, this step is repeated \(T_{max}\) times at most.  
\[X_{i,temp}^{p}=F_{1}(X_{i},step_{a}),p=\{1,2,\cdots,h\} \tag{9}\]  
\[X_{i,new}=\left\{\begin{array}{ll}\underset{X_{i,temp}^{p},p\in h}{\argmin} &J\left(X_{i,temp}^{p}\right),&if\min/\left(X_{i,temp}^{p}\right)<J(X_{i})\\ X_{i},&else\end{array}\right. \tag{10}\]  
where \(h\) (\(h=randint(h_{min},h_{max})\)) means the number of variants of \(X_{i}\) and \(J(\cdot)\) is the objective function.  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Parameters** & **Meaning** & **Parameters** & **Meaning** \\ \hline \(I_{\max}\) & Maximum iterations & \(d_{near}\) & Threshold distance for calling behavior \\ \hline \(N\) & Size of population & \(\alpha\) & Scale factor of exploring wolves \\ \hline \(step_{a}\) & Walking step & \(\beta\) & Scale factor of wolf population update \\ \hline \(step_{b}\) & Raid step & \(h_{\min}\) & Minimum walking directions \\ \hline \(step_{c}\) & Siege step & \(h_{\max}\) & Maximum walking directions \\ \hline \(T_{\max}\) & Maximum cycles of walking behavior & & \\ \hline \hline \end{tabular}
\end{table}
Table 1: Parameters of WPA and PSO-GA-DWPA.  
Step 2: Calling behavior. \(M\) (\(M=N-S-1\)) wolves are fierce wolves and copy part of the leader wolf's position, as shown in Equations (11) and (12) and Figure 3. Any fierce wolf better than the leader replaces the leader wolf and Step 2 is repeated. Otherwise, the next step involves continuing to copy the position of the leader wolf until the distance to the leader wolf (d) is less than the threshold (\(d_{near}\)).  
\[X_{j,temp}=F_{2}\big{(}X_{j},X_{leader},step_{b}\big{)} \tag{11}\]  
\[X_{j,new}=\begin{cases}X_{j,temp},&if\min\big{(}X_{j,temp}\big{)}<J\big{(}X_{ j}\big{)}\\ X_{j},&else\end{cases} \tag{12}\]  
Figure 1: The optimization process of the WPA.  
Figure 2: Operation in walking behavior. \(F_{1}(X_{i},step_{a})\) randomly selects \(step_{a}\) columns in \(X_{i}\), the values of the first row in these columns are randomly selected from \([1,N_{V}]\), while the values of the second row are randomly exchanged.  
Step 3: Sieging behavior. Except for the leader wolf, all wolves copy little of the leader wolf's position, as shown in Equations (13) and (14). The operation is similar to that of the calling behavior and the difference is that \(step_{c}\) is much less than \(step_{b}\).  
\[X_{i,temp}=F_{2}(X_{i},X_{leader},step_{c}) \tag{13}\]  
\[X_{i,new}=\begin{cases}X_{i,temp},&if\min\!\big{/}(X_{i,temp})<J(X_{i})\\ X_{i},&else\end{cases} \tag{14}\]  
Step 4: Updating the wolf population. The \(R\) (\(R=randint\!\left[\frac{N}{\beta+1},\frac{N}{\beta}\right]\)) worst wolves are removed and replaced with new wolves that are generated randomly.