## 5 Results
### Experiment A: Leader Selection
There is no significant degradation up to swarm sizes of 30. Thereafter, there is a clear degradation as the number of robots increase. Moreover, this degradation is not only in terms of median degradation but also in terms of interquartile range increase. However, regarding the boxplots corresponding to swarm sizes of 40 and 50, we have observed that in more than 96% of the simulations there is a leader elected at some point of the simulation, albeit there is a high variability in the simulation time elapsed before leadership allocation. **Robustness**: In order to verify the system ability to react to unexpected perturbations during runtime, we incorporate the leader fault already introduced in Section 4.1. A leader becomes a faulty robot if it has been the unique leader during 50 consecutive time steps. A defective agent cannot claim leadership nor send its own messages. It can only relay incoming messages from its neighborhood in order to preserve graph compactness. Figure 7 shows the LED actions of each robot with failure perturbations. Again, black bars denote activated LEDs while blank spaces mean that the LED is turned off. It can be observed that agents are totally capable of reacting against leader fault. In this situation, an additional phase can be added to the negotiation to stablish a new leader. More precisely, after robot failure, there is a time gap of approximate duration of 10 time instants when all the robots are silent before noticing leader disconnection. Summarizing, in the shown simulation example, robots start with a negotiation as usual. After leader is settled and 50 time steps have elapsed without other leadership claims, the leader fails and the silent period starts. Thereafter, another negotiation is initiated and the process is repeated. The system is remarkably robust against the designed leader failure perturbation. Figure 5: Snapshots of different time steps of a leader selection simulation. Blue dots represent robots whose LED is deactivated and red balls indicate that the agent’s LED is turned on. Figures (**a-e**) correspond to negotiation phase while in (**f**) the leader is selected and stabilized. Remark: the simulation trial is not the same as the one exposed in Figure 4.  
**Communication**: To complement the behavior mechanics previously exposed and analyzed, the communication procedures that emerged from evolution to solve the task are studied. Firstly, in order to gain a general insight on the input variables that are actually harnessed to accomplish leader identification, we performed the following test: for each communication input being fed to the CTRNN, we inhibited the input variable and observed the consequent results. The process to inhibit neural stimulus is straightforwardly accomplished by replacing the input by zeros and each variable is inhibited one by one. Figure 8 shows the resulting performance of the solution in terms of percentage of time with elected leader when variables are inhibited. Interestingly, the algorithm uses the message content, albeit the orientation from where the message was received seems to be irrelevant. These results are utterly important as they reflect that the message reception orientation could have been omitted in the architecture. Figure 6: Assessment of the scalability capabilities of the evolved solution for the leader election task. For different swarm sizes, the figure shows the distribution of the percentage of the evaluation time that only one robot claims leadership. The sample of size 50 is represented by means of boxplots, where the orange line within the box is the median and each box encloses samples in between the first and third quantiles, also known as the interquartile range. The whiskers extend to the farthest data points that are within 1.5 times the interquartile range. Outliers are shown as white dots. Figure 7: LED actions of the robots in a swarm of size 20 as time elapses in the leader selection experiment with leader failure. Horizontal black bars denote that the LED is activated.