## 6 Conclusions  
In this article, we have proposed the training and testing of six surrogate models to be used as predictors of the formation accuracy of swarms of three, five, ten, fifteen, and thirty UAVs. We have defined the formation problem, described by our distributed formation algorithm (DFA3), and proposed six predictors, five based on Gaussian processes (GPs) and one based on an artificial neural network (ANN). Then, we have calculated two datasets using real ARGoS simulations. The first was used to train the predictors and the second was used to test their accuracy in terms of the median square error (MSE) and the computation time. After that, we optimised a new scenario (different initial UAV positions) using our proposed hybrid evolutionary algorithm (HEA) to obtain optimal configurations for each UAV swarm. Finally, we tested the best configurations achieved on 30 unseen scenarios per case study to evaluate the robustness of the calculated configurations. Our results show that GP predictors using a neural network kernel achieved the best results in accuracy and they were also very competitive in terms of execution times, achieving speed increases of up to 3604 with respect to the ARGoS simulations. This allowed us to experiment with UAV swarms featuring up to 30 UAVs, which was impossible to do when we used only ARGoS simulations. During the optimisation process, the HEA converged in most of the runs (96.7% for 5 UAVs, 60% for 15 UAVs, and 100% for the rest). The main reason for not having 100% convergence was due to the lack of valid configurations in the initial population of the HEA, which were then difficult to produce during the evolutionary process. Finally, when testing the best achieved configurations, we obtained 100% successful formations for 3 and 5 UAVs, 70% for 10 UAVs, 56.7% for 15 UAVs, and 66.7% for 30 UAVs. These numbers can be further improved if needed,  
Figure 7: UAVs’ final positions for the five case studies (scenarios ending in stable formations). The UAVs in each scenario are represented by a different colour. after optimising a higher number of scenarios simultaneously, instead of just one as we have done during our optimisation approach. However, this would require more parallel evaluations as well as longer optimisation runs. All in all, we found that in the most difficult situation (only one optimisation scenario), our formation proposal based on the DFA3, surrogate models, and ARGoS simulations plus the HEA worked on 79% of the new, unseen scenarios where it was tested, reducing optimisation times by 920% on average. We have observed some limitations of the proposed method, including the need to train the predictors with a set of random scenarios, which may not be a good representation of the problem characteristics, the impossibility of including the scenarios that ended up in UAV collisions in the training sets, and although the majority of formations were stable, 21% of unstable formations were due to the UAVs not forming a virtual sphere around the rogue drone. In future work, we aim to pursue this research line, trying different training strategies, e.g., implementing \(k\)-fold cross validation to increase the model accuracy. We plan to validate our proposal using real UAVs, such as Bitcraze's Crazyflies. This would require increasing the number and diversity of optimisation scenarios to ensure that the DFA3 could be used for a variety of initial conditions. Conceptualisation, D.H.S. and G.D.; methodology, D.H.S. ; software, D.H.S. ; validation, D.H.S. ; formal analysis, D.H.S. ; investigation, D.H.S. ; resources, G.D.; writing--original draft preparation, D.H.S. ; writing--review and editing, D.H.S. and G.D.; visualisation, D.H.S. ; supervision, G.D.; project administration, G.D.; funding acquisition, G.D. All authors have read and agreed to the published version of the manuscript. This research was funded by the Luxembourg National Research Fund (FNR)--ADARS Project, ref. C20/IS/14762457. Not applicable.