## 4 Implementation of Autonomous Task Planning
### Expert Rule Model  
In order to fully stimulate the intelligent emergence of the mission UAV swarm, expert strategy is considered to control ground targets. Similar to the design of the reward function, the expert rules were also crafted with battlefield rules in mind. We employed the artificial potential field method to control the movement of ground targets. In this method, ground targets are treated as points within a potential field, and the relationships between targets and targets, as well as among targets themselves, are translated into potential field forces based on the battlefield situation.  
There are two main expert strategies, namely, \"nearby avoidance\" and \"collective collision avoidance\", which are transformed into potential field vectors to control the defensive UAV movement in turn. In Figure 4, there is a simple example of the evasion strategy for a ground target.  
Nearby evasion \(L_{1}\) means that when a ground target faces an invading swarm, it compares the relative position of each swarm with itself in sequence, aiming at removing the UAV with the strike path as quickly as possible. In the potential field, the potential field vector function is as follows:  
\[L_{1,i}=\min\big{[}\frac{(\left|P_{i,j}\right|+\beta)^{2}P_{i,j}}{\left|P_{i,j }\right|}\big{]},j\in 1,2,\ldots,N^{A} \tag{10}\]  
where \(L_{1,i}\) represents the escape vector of the \(i\)-th ground target, \(P_{i,j}\) represents the relative position vector between the \(i\)-th ground target and the \(j\)-th mission UAV, and the relative position vector \(P_{i,j}\) is transformed into the evasion vector \(L_{1_{i,j}}\) of ground target \(i\)-th relative to UAV \(j\)-th, and \(N^{\text{UAV}}\) represents the number of mission UAV. The larger the value of \(\beta\) is, the more likely the ground target is to quickly escape from the mission UAV. In the simulation, the value of \(\beta\) was set to 0.8.  
Collective collision avoidance \(L_{2}\) means that when any target escapes, it keeps safe collision avoidance with all other ground targets. The potential field vector function is as follows:  
\[L_{2,i}=-\frac{(\left|P_{i,k}\right|+\alpha)^{2}P_{i,k}}{\left|P_{i,k}\right| },i,k\in 1,2,\ldots,N^{D},k\
eq i \tag{11}\] \[L_{2,i}=L_{2,i_{1}}+L_{2,i_{2}}+\ldots+L_{2,i_{k}}\]  
Figure 4: Target evasion strategy.  
When the hit ground target moves, the relative position vector \(P_{i,k}\) between itself and other targets is calculated in real time, and the relative position vector \(P_{i,k}\) is transformed into the avoidance vector \(L_{2,i_{k}}\) of ground target \(i\)-th relative to ground target \(k\)-th. \(N^{\text{Target}}\) represents the number of ground targets. Finally, all the collision avoidance vectors except \(i\)-th relative to itself form the collision avoidance control vector \(L_{2,i}\); \(\alpha\) is the collision avoidance inclination adjustment parameter of \(i\)-th. The larger the value of \(\alpha\) is, the more conservative the ground targets are and the more inclined they are to maintain safe boundaries with each other. In the simulation, the value of \(\alpha\) was set to 0.5.  
The nearest-evasion potential field vector \(L_{1,i}\) and the collective-collision-avoidance potential field vector \(L_{2,i}\) together constitute the control vector \(L_{i}\) of the \(i\)-th target.