## 3 The Robots and the Communication
### Separable Natural Evolution Strategies  
The parameters of the CTRNN of the neural controller are evolved using natural evolution strategies (see [15]). Natural Evolution Strategies (NES) are a family of evolutionary computation algorithms that, instead of directly evolving the population of individuals or genotypes, it updates a parametrized search distribution that is used to sample genotypes. NES algorithms maximize the expected fitness with respect to the search distribution parameters, as in Equation (7),  
\[\operatorname*{argmax}_{\boldsymbol{\theta}}\{\mathbb{E}_{\boldsymbol{\theta }}[f(\mathcal{G})]\} \tag{7}\]  
where \(f\) is the fitness function evaluating genotypes \(\mathcal{G}\). Genotypes are sampled from the search distribution, \(\pi(\boldsymbol{\theta})\) generically speaking (see Equation (8)).  
\[\mathcal{G}\sim\pi(\boldsymbol{\theta}) \tag{8}\]  
In particular, Separable Natural Strategies (SNES) are used in this paper to evolve the parameters of the CTRNN controllers. SNES (see [18]) is a natural evolution strategy specifically suitable when dealing with large dimensional problems, such as in neuroevolution. It restricts the search distributions to multivariate normal distributions with diagonal covariance matrix \(\boldsymbol{\Sigma}=\boldsymbol{\sigma}\,\mathbf{I}\), with \(\boldsymbol{\sigma}\in\mathbb{R}_{>0}^{d}\). Therefore, the parameters to be evolved are \(\boldsymbol{\mu}\) and \(\boldsymbol{\sigma}\), both of the same dimension \(d\) (genotype length).  
\[\mathcal{G}=\begin{pmatrix}\hat{\mathbf{w}}\\ \hat{\boldsymbol{\phi}}\\ \hat{\boldsymbol{\tau}}\\ \hat{\boldsymbol{\beta}}\end{pmatrix} \tag{9}\]  
The genotypes (see Equation (9)) are vectors bounded in \([0,1]^{d}\) resulting from the vector concatenation of normalized synapse weights (\(\mathbf{w}\)), neuron gains (\(\mathbf{g}\)), time constants (\(\boldsymbol{\tau}\)) and biases (\(\boldsymbol{\beta}\)). In order to constrain the search space to the hypercube \([0,1]^{d}\), these variables are normalized as in Equation (10), fixing the corresponding upper and lower bounds of the variables. On the contrary, when converting genotypes to CTRNN phenotypes to be evaluated, the variables are inversely denormalized as in Equation (11).  
\[\hat{\mathbf{w}}=\frac{\mathbf{w}-w_{min}}{w_{max}-w_{min}} \tag{10}\] \[\hat{\mathbf{g}}=\frac{\mathbf{g}-g_{min}}{g_{max}-g_{min}}\] \[\hat{\mathbf{\beta}}=\frac{\mathbf{\beta}-\beta_{min}}{\beta_{ max}-\beta_{min}}\] \[\hat{\mathbf{\tau}}=\frac{\log(0.5\cdot\mathbf{\tau})-\tau_{min}}{ \tau_{max}-\tau_{min}}\]  
\[\mathbf{w}=\hat{\mathbf{w}}\cdot(w_{max}-w_{min})+w_{min} \tag{11}\] \[\mathbf{g}=\hat{\mathbf{g}}\cdot(g_{max}-g_{min})+g_{min}\] \[\beta=\hat{\mathbf{\beta}}\cdot(\beta_{max}-\beta_{min})+\beta_{ min}\] \[\tau=2\cdot 10^{\frac{\mathbf{\tau}}{\tau}(\tau_{max}-\tau_{min})+ \tau_{min}}\]  
It should be mentioned that the same phenotype is used as neural controller for all robots in the experiments (homogeneity principle of swarm robotics). Finally, Table 1 exposes the search space bounds of each variable vector subject to evolution. The \([-1,\,0.75]\) range of \(\mathbf{\tau}\) is mapped to \([2\times 10^{-1},\,2\times 10^{0.75}]=[0.2,\,11.25]\) seconds. Equivalently, this search space of time constants allows the existence of a variety of neuronal regimes. For example, low time constants allow the rapid reaction to abrupt changes in the input stimuli, while large time constants permit the formation of working memory at a much slower time scale.  
In the tasks addressed in this paper, SNES algorithm is executed during 1000 generations with a population size of 100. Each genotype is evaluated in a total of 5 independent trials or episodes and each trial is composed by 300 simulation steps.