# A Task Allocation Strategy of the UAV Swarm Based on Multi-Discrete Wolf Pack Algorithm
## 3 The Wolf Pack Algorithm
### Performance of MDWPA
#### 4.3.1 Efficiency
\begin{table}
\begin{tabular}{c c c c c c c} \hline \hline
**No.** & **Coordinate** & **Initial Value** & **Execution Time (s)** & **No.** & **Coordinates** & **Initial Value** & **Execution Time (s)** \\ \hline
0 & (13,41) & 80 & 8 & 13 & (90,22) & 92 & 15 \\
1 & (61,83) & 90 & 11 & 14 & (95,20) & 95 & 12 \\
2 & (79,12) & 40 & 3 & 15 & (81,86) & 93 & 12 \\
3 & (41,98) & 90 & 14 & 16 & (16,65) & 68 & 7 \\
4 & (23,65) & 95 & 22 & 17 & (85,51) & 82 & 9 \\
5 & (12,91) & 79 & 12 & 18 & (23,72) & 62 & 16 \\
6 & (68,54) & 73 & 17 & 19 & (70,83) & 60 & 18 \\
7 & (82,50) & 84 & 18 & 20 & (23,30) & 90 & 4 \\
8 & (20,50) & 81 & 3 & 21 & (65,30) & 60 & 16 \\
9 & (92,48) & 69 & 18 & 22 & (87,77) & 94 & 11 \\
10 & (69,59) & 71 & 10 & 23 & (93,18) & 83 & 12 \\
11 & (59,10) & 70 & 15 & 24 & (19,19) & 90 & 8 \\
12 & (12,51) & 62 & 20 & & & \\ \hline \hline \end{tabular}
\end{table} 
Table 5: The attributes of targets in Example 1.  
probability in the genetic algorithm is set to 0.8, and the mutation probability is set to 0.2. In order to ensure the accuracy of the results of the simulation experiment, each algorithm will be run 200 times on each instance individually, and the iterative effect analysis curve of each algorithm will be obtained. Figure 6 is the comparison of iterative curves of algorithms on test cases 1. In Figure 8, the blue, red, orange, purple, green, pink, and brown curves represent the iterative curves of MDWPA, GA, GPWPA, PSO, WPA, CJADE and EBOCMAR, respectively. The purpose of the comparison with the traditional WPA and PSO is to illustrate our efforts on solving discrete problems with traditional biological optimization algorithms. But unfortunately, direct reference to these continuous algorithms is not ideal for simulation results. Comparing MDWPA with the three algorithms for discrete problems, GA, CJADE and EBOCMAR, our proposed MDWPA has advantages on convergence speed and accuracy. GA is a traditional optimization algorithm for discrete problems, and the improved optimization algorithm CJADE and EBOCMAR are newer and can solve discrete problems very well. It is clear from the figure that the GPWPA algorithm has a fast convergence rate in the initial stage, but with the increase of the number of iterations, the algorithm falls into a local convergence state. Although the genetic algorithm has good optimization ability, the convergence speed of genetic algorithm becomes slow after 75 iterations, resulting in local convergence problem. Among them, CJADE can only solve discrete problems, into both continuous and discrete processing. However, the results are not as good as the improved wolf pack algorithm in dealing with the high-dimensional complex task assignment of UAV. As other algorithms deal with continuous problems, they are not effective in dealing with the discrete problem of task allocation for UAVs. Obviously, the MDWPA algorithm has a better convergence speed and assignment effect than other algorithms when dealing with the UAV task assignment model. This is mainly related to the new individual recruitment strategy. With a probability of 0.5, the mutation of the head wolf individual is used for the recruitment of new individuals, and the mutation of the individual with a higher fitness value is used for the recruitment of new individuals. In this way, the diversity of population is kept and the algorithm is prevented from falling into local optimum. This paper uses variance analysis and crunches other data to compare and analyze the performance of MDWPA and six other algorithms. We carried out the experiments in the first scenario of the model, and the parameters of each algorithm were set as they were in Table 3. A total of 30 independent repeated experimental samples were taken for each algorithm. The algorithm performance was analyzed by function mean, function standard deviation, function maximum, and mean time of each algorithm. The experimental results are shown in Table 7.  
Figure 8: Comparison of iterative curves of algorithms on test cases 1.