*5.1.* STOP

Figure 3 (left) shows the performance of TuttiFrutti and EvoColor in STOP. In this mission, TuttiFrutti performs significantly better than EvoColor.

From visual inspection, TuttiFrutti produced control software that effectively uses the capabilities of the robots for displaying and perceiving colors. The swarm first disperses and homogeneously covers the arena—aiming to rapidly detect the stop signal. If a robot detects the stop signal, it stands still and disseminates the information by emitting a signal of an arbitrary color. When other robots perceive the signal emitted by their peer, they also transition to a standstill behavior and relay the signal. The process continues until all robots in the swarm are standing still. We consider that this behavior shows the potential of TuttiFrutti for producing event-handling collective behaviors. The swarm collectively transitions from coverage to standstill when the stop signal appears. As we expected, TuttiFrutti produces control software that establishes communication protocols by correctly pairing the color of the signals that robots emit and the behavior other robots must adopt when they perceive them—similarly to the results obtained by Hasselmann et al. [14] with Gianduja.

EvoColor, unlike TuttiFrutti, designed collective behaviors that do not respond to the stop signal. The swarm adopts a rather simplistic behavior in which robots move until stopped by the walls. They remain then in a standstill behavior because they persistently push against the walls—no reaction can be appreciated in the swarms when the stop signal appears. This behavior was observed too in the experiments with physical robots, and in many cases, robots maintained standing-still behaviors by pushing against other robots too.

**Figure 3.** Performance obtained in the missions STOP (left), AGGREGATION (center), and FORAGING (right). The performance of TuttiFrutti is shown in white and the one of EvoColor in gray. Thin boxes represent results obtained in simulation and thick boxes the ones obtained with physical robots.

In the experiments with physical robots, both TuttiFrutti and EvoColor showed a significant drop in performance with respect to the simulations. However, the difference in mean performance between simulations and experiments with physical robots is larger for EvoColor than TuttiFrutti. Swarms deployed with the control software produced by TuttiFrutti showed the same collective behavior observed in simulation, although the rapidness in discovering the stop signal and disseminating the information decreased. In the case of EvoColor, robots often do not reach the walls and they push against each other to remain still in place.

Figure 4 shows an example of the control software produced by TuttiFrutti for STOP. Robots start in REPULSION with no color displayed (*γ* = ∅). They transition to STOP and turn yellow (*γ* = *Y*) when COLOR-DETECTION is triggered either by a green wall (*δ* = *G*) or by yellow robots (*δ* = *Y*). In this sense, robots change their behavior when they either perceive the stop signal or the yellow signals that other robots emit.
