3.2.2. Transition Conditions

BLACK-FLOOR, GRAY-FLOOR and WHITE-FLOOR trigger a transition when the robot steps on a portion of the floor (*gndj* ) that is, respectively, black, gray or white. The parameter *β*∈[0, 1] determines the probability of transitioning. NEIGHBOR-COUNT and INVERTED-NEIGHBOR-COUNT are transition conditions that consider the number of neighboring robots (*n*). NEIGHBOR-COUNT triggers a transition with a probability *<sup>z</sup>*(*n*) <sup>∈</sup> [0, 1], with *<sup>z</sup>* (*n*) <sup>=</sup> <sup>1</sup> <sup>1</sup>+*eη*(*ξ*−*n*) . Conversely, INVERTED-NEIGHBOR-COUNT triggers a transition with a probability of 1 − *z*(*n*). The parameter *ξ*∈{0, ... , 10} determines the inflection point of the probability function *z*(*n*), the parameter *η*∈[0, 20] determines its steepness. FIXED-PROBABILITY triggers a transition with a fixed probability determined by *β*∈[0, 1]. COLOR-DETECTION is based on the colors perceived by the robot (*camc*). The parameter *δ*∈{*R*, *G*, *B*, *C*, *M*,*Y*} defines the color that triggers a transition with a probability *β*∈[0, 1]. Robots in the swarm can display the colors *δ*∈{*C*, *M*,*Y*}, and other objects that might populate the environment can display the colors *δ*∈{*R*, *G*, *B*}. The parameters *β*, *ξ*, *η*, and *δ* are tuned by the automatic design process.

EXPLORATION, STOP, ATTRACTION and REPULSION are modified versions of the original low-level behaviors of Vanilla. In TuttiFrutti, we add the ability to control the color displayed by the LEDs. All the transition conditions, with exception of COLOR-DETECTION, are implementations of the original modules of Vanilla. COLOR-FOLLOWING, COLOR-ELUSION, and COLOR-DETECTION are modules we introduce here for the first time.
