**6. Conclusions**

In this paper, we introduced AutoMoDe-TuttiFrutti—an automatic method to design collective behaviors for robots that can perceive and communicate color-based information. We designed control software for swarms of e-pucks that comply with RM 3—e-pucks can use their LEDs to display colors and their omnidirectional vision turret to perceive them. The capability of the robots to act upon different colors translated into an increased variety of collective behaviors compared to previous instances of AutoMoDe. We assessed TuttiFrutti on a class of missions in which the performance of the swarm depends on its ability to use color-based information for handling events, communicating, and navigating.

We conducted experiments in simulation and with physical robot swarms performing three missions: STOP, AGGREGATION and FORAGING. In all cases, TuttiFrutti designed collective behaviors that effectively use color-based information. In STOP, the swarm collectively changes its behavior when a specific color signal appears. In STOP and AGGREGATION, the swarm exhibits communication behaviors in which robots pair the color signals they emit and the colors to which they react. In AGGREGATION and FORAGING, robots use the colors they perceive as a reference to navigate the environment. In FORAGING, swarms differentiate two sources of items and forage from the profitable one. Alongside the results obtained with TuttiFrutti, we assessed a method based on neuro-evolution: EvoColor. In STOP and FORAGING, EvoColor designed collective behaviors that do not use color-based information. In AGGREGATION, EvoColor designed collective behaviors in which robots use the colors they perceive to navigate the environment—likewise TuttiFrutti. The aggregated results showed that TuttiFrutti performs better than EvoColor in the class of missions we considered. Results with physical robots suggest that TuttiFrutti crosses the reality gap better than EvoColor—result partially sustained by the visual inspection of the behavior of the robots.

Automatic design methods can effectively produce control software for swarms of robots that can display and perceive colors. We demonstrated that TuttiFrutti establishes an appropriate relationship between the colors that the robots perceive and the behavior they must adopt. In our experiments, this relationship was established on a per-mission basis and responded to the specifications of each mission. Yet, the set of missions on which we assess TuttiFrutti is far from being exhaustive, and more research work is needed to define the limitations of the design method. Future work will be devoted to assess TuttiFrutti in a larger and more complex class of missions. It is our contention that TuttiFrutti can design collective behaviors to address missions that involve a larger number of features in the environment and time-varying conditions. As observed in STOP, robots can effectively transition between two collective behaviors. We foresee that this ability enables the design of swarms that can perform missions with two or more sequential tasks. To the best of our knowledge, the design of collective behaviors to address this class of missions has not been studied in the context of automatic off-line design of robot swarms.

**Supplementary Materials:** The code, control software and demonstrative videos are available online at http: //iridia.ulb.ac.be/supp/IridiaSupp2019-008.

**Author Contributions:** Implementations and experiments were done by D.G.R. The paper was drafted by D.G.R. and refined by M.B. The research was directed by M.B. All authors have read and agreed to the published version of the manuscript.

**Funding:** The project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 681872). M.B. acknowledges support from the Belgian *Fonds de la Recherche Scientifique*—FNRS. D.G.R. acknowledges support from the Colombian Administrative Department of Science, Technology and Innovation—COLCIENCIAS.

**Acknowledgments:** The authors thank Federico Pagnozzi and Jonas Kuckling for reading a preliminary version of this paper.

**Conflicts of Interest:** The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results.
