# Automatic Design of Collective Behaviors for Robots that Can Display and Perceive Colors
## 3 AutoMoDe-TuttiFrutti
### Set of Preexisting Modules
#### 3.2.1 Low-Level Behaviors  
In exploration, the robot moves straight until it detects an obstacle in front \((prox_{i})\). Then, it rotates for a number of control cycles determined by the integer parameter \(\tau\), in a range of  
\begin{table}
\begin{tabular}{l l l} \hline \hline
**Low-Level Behavior \({}^{*}\)** & **Parameters** & **Description** \\ \hline exploration & \(\{\tau,\gamma\}\) & movement by random walk \\ stop & \(\{\gamma\}\) & standstill state \\ attraction & \(\{\alpha,\gamma\}\) & physics-based attraction to neighboring robots \\ repulsion & \(\{\alpha,\gamma\}\) & physics-based repulsion from neighboring robots \\ \hline color-following & \(\{\delta,\gamma\}\) & steady movement towards robots/objects of color \(\delta\) \\ color-elusion & \(\{\delta,\gamma\}\) & steady movement away from robots/objects of color \(\delta\) \\ \hline
**Transition Condition** & **Parameters** & **Description** \\ \hline black-floor & \(\{\beta\}\) & black floor beneath the robot \\ gray-floor & \(\{\beta\}\) & gray floor beneath the robot \\ white-floor & \(\{\beta\}\) & white floor beneath the robot \\ neighbor-count & \(\{\zeta,\eta\}\) & number of neighboring robots greater than \(\zeta\) \\ inverted-neighbor-count & \(\{\zeta,\eta\}\) & number of neighboring robots lower than \(\zeta\) \\ fixed-probability & \(\{\beta\}\) & transition with a fixed probability \\ color-detection & \(\{\delta,\beta\}\) & robots/objects of color \(\delta\) perceived \\ \hline \hline \end{tabular} \({}^{*}\) All low-level behaviors display a color \(\gamma\in\{\varnothing,C,M,Y\}\) alongside the action described.  
\end{table}
Table 2: Set of TuttiFrutti’s modules. Novelties with respect to Vanilla are highlighted in gray. They concern to the capability of acting upon perceived colors. The modules operate according to RM 3, see Table 1.  
\(\tau{\in}\{0,\ldots,100\}\). stop maintains the robot standing still. In attraction and repulsion, the robot moves closer \((V_{d})\) or farther from \((-V_{d})\) neighboring peers, respectively. In both cases, the velocity of the robot is a function of the number of robots detected \((n)\) and the parameter \(\alpha{\in}[0,5]\). If the robot does not detect other robots, it moves straight. color-following and color-elusion move the robot with constant velocity towards \((V_{c})\) or away \((-V_{c})\) from robots or objects displaying specific colors \((cam_{c})\). The parameter \(\delta{\in}\{R,G,B,C,M,Y\}\) determines the color to which the behaviors react. Robots can display the colors \(\delta{\in}\{C,M,Y\}\), and other objects that might populate the environment can display the colors \(\delta{\in}\{R,G,B\}\). If the robot does not perceive the color determined by \(\delta\), it moves straight. attraction, repulsion, color-detection and color-elusion incorporate a physics-based obstacle avoidance [59]. In all the low-level behaviors, the parameter \(\gamma{\in}\{\varnothing,C,M,Y\}\) determines the color displayed by the RGB LEDs of the robot. The parameters \(\tau,\alpha,\delta\), and \(\gamma\) are tuned by the automatic design process.