# Multi-UAV Conflict Resolution with Graph Convolutional Reinforcement Learning
## 4 Experimental Setup
### Data Generation  
Algorithm 1 describes the procedure to generate the training scenarios. In this work, we consider compound conflicts with 3 and 4 UAVs. To create the multi-UAV conflict, first, a reference aircraft is initialized, with a heading sampled from a uniform distribution from \(0^{\circ}\) to \(360^{\circ}\). Then, this aircraft is added to the set of created aircraft. To generate the rest of the conflicting UAVs, we sample from the set of the created ones. Then, a conflict angle is chosen from the list \([0^{\circ},45^{\circ},90^{\circ},90^{\circ},135^{\circ},180^{\circ},-135^{ \circ},-45^{\circ}]\). Next, to add some variance to the intrusion headings, a variance in the range \([-10^{\circ},10^{\circ}]\) is added to each case. After that, the severity of the conflict is decided by sampling from a uniform distribution between 0.1 and 1. Finally, we set the time the new aircraft enters in conflict with the randomly chosen aircraft to 15 s. The CRECONF function is taken from the BlueSky simulator, and it provides the location and speed of a new conflicting aircraft. However, as compound conflicts have temporal boundaries, no accidental conflicts are added in one look-ahead time, which is set to 8 s. This is checked by the CONFLIICT function, also taken from BlueSky. To define the metrics for self-separation, we follow a similar approach as in [45; 46]. This threshold depends on the UAV maneuverability and its maximum airspeed. Whereas the innermost layer will be modeled according to the Near Mid Air Collision concept, as a circle with radius: \(R_{NMAC}=2\times\) Maximum Wing Span + Total System Error (TSE). The self-separation can be calculated by (10).  
```
procedureGENERATE(\(target,spd_{min},spd_{max},t_{loss},t_{la}\)) created \(\leftarrow\)\(\emptyset\) \(\mathit{hdgs}_{\mathit{conflict}}\leftarrow[0,45,90,135,180,-45,-135,-90]\) var \(\leftarrow\)10 \(\mathit{lat}_{\mathit{ref}}\leftarrow\) 41.4 \(\mathit{lon}_{\mathit{ref}}\leftarrow\) 2.15 \(\mathit{spd}_{\mathit{ref}}\leftarrow\)UNIFORM(\(\mathit{speed}_{min},\mathit{speed}_{max}\)) \(\mathit{hdg}_{\mathit{ref}}\leftarrow\)UNIFORM(\(1,360\)) \(\mathit{ac}_{\mathit{ref}}\leftarrow\)AIRCRAFT(\([lat_{\mathit{ref}},\mathit{lon}_{\mathit{ref}},\mathit{spd}_{\mathit{ref}},\mathit{hdg}_{ \mathit{ref}})\) created \(\leftarrow\) created \(\cup\) ac\({}_{\mathit{ref}}\) whileSIZE(\(\mathit{created}\)) \(<\) target do accepted \(\leftarrow\) False while accepted \(\leftarrow\)  False do \(\mathit{hdg}\leftarrow\)SAMPLE(\(\mathit{hdg}_{\mathit{conflict}}\))+UNIFORM(-\(\mathit{var},\mathit{var}\)) severity \(\leftarrow\)UNIFORM(0.1,1) \(\mathit{cpa}\leftarrow\mathit{threshold}-(\mathit{threshold}\times\mathit{severity})\) chosen \(\leftarrow\)SAMPLE(\(\mathit{created}\)) \(\mathit{ac}_{\mathit{proposed}}\leftarrow\)CRECONF(\(\mathit{hdg},\mathit{cpa},\mathit{tloss},\mathit{chosen}\)) \(\mathit{in}_{\mathit{conf}}\leftarrow\)CONFLIICT(\(\mathit{created},\mathit{ac}_{\mathit{proposed}},t_{la}\)) if\(\mathit{in}_{\mathit{conf}}\) is False then accepted \(\leftarrow\)True \(\cup\) ac\({}_{\mathit{proposed}}\) endif endwhile endwhile returncreated endprocedure
```  
**Algorithm 1** Data Generation Algorithm  
\[R_{t}=R_{NMAC}+V_{m}\times t_{m}+\frac{V_{m}}{\omega_{m}} \tag{10}\]where \(V_{m}\) and \(\omega_{m}\) are maximum airspeed and maximum yaw rate, respectively, while \(t_{m}\) is the time needed for the UAV to make an avoidance maneuver. The self-separation threshold was set to 240 m, taking into account \(R_{NMAC}\) = 4 m, maximum airspeed 15 m/s, and a maximum yaw rate of 90\({}^{\circ}\)/s As we are attempting to solve conflicts at the tactical level, a duration of 1 min per scenario was deemed suitable. The time metrics (i.e., tactical CD&R maneuver and look-ahead time) mentioned above are synthesized from the state of the art of CD&R in small UAS [12, 47, 48].