# Automatic Design of Collective Behaviors for Robots that Can Display and Perceive Colors
## 3 AutoMoDe-TuttiFrutti
### Robot Platform  
TuttiFrutti produces control software for an extended version of the e-puck [54; 55]--see Figure 1. The e-puck is a two wheeled, small, educational robot often used in swarm robotics research [8; 9; 10; 11; 14; 45; 46]. We consider a model of the e-puck endowed with a set of sensors and actuators defined by the reference model RM 3--see Table 1. We adopt the concept of _reference_model_[5] to formally characterize the platform for which TuttiFrutti can produce control software. RM 3 represents the capabilities of the robot both in real and simulated environments. The sensors and actuators available to the e-puck are proximity and ground sensors, a range-and-bearing board [56], an omnidirectional vision turret [16], right and left wheels, and RGB LEDs. The e-puck can detect nearby obstacles by its eight proximity sensors \((\textit{prox}_{i})\) distributed around its chassis. Three infrared ground sensors \((\textit{grad}_{j})\) allow the e-puck to differentiate between black, gray and white floor. By means of its range-and-bearing board, the e-puck knows the number of neighboring peers \((n)\) in a range of \(0.5\,\mathrm{m}\). A vector \((V_{n})\) represents an attraction force to the neighboring e-pucks--to which the robot is subject--following the framework of virtual physics [57]. \begin{table}
\begin{tabular}{l l l} \hline \hline
**Input** & **Value** & **Description** \\ \hline \(\textit{prox}_{i\in\{1,\ldots,8\}}\) & \([0,1]\) & reading of proximity sensor \(i\) \\ \(\textit{grad}_{j\in\{1,\ldots,3\}}\) & \(\{\textit{black,gray,white}\}\) & reading of ground sensor \(j\) \\ \(n\) & \(\{0,\ldots,20\}\) & number of neighboring robots detected \\ \(V_{n}\) & \(([0.5,20];[0,2]\;\pi\;\mathrm{rad})\) & their relative aggregate position \\ \hline \(\textit{amr}_{\in\{R,G,B,C,M,Y\}}\) & \(\{\textit{yes,no}\}\) & colors perceived \\ \(V_{c\in\{R,G,B,C,M,Y\}}\) & \((1.0;[0,2]\;\pi\;\mathrm{rad})\) & their relative aggregate direction \\ \hline
**Output** & **Value** & **Description** \\ \hline \(v_{k\in\{L\}}\) & \([-0.12,0.12]\;\mathrm{m}/\mathrm{s}\) & target linear wheel velocity \\ LEDs & \(\{\varnothing,C,M,Y\}\) & color displayed by the LEDs \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Reference model RM 3. Novelties with respect to RM 1.1 are highlighted in gray. They concern the capabilities of displaying and perceiving colors. Robots can perceive: red \((R)\); green \((G)\); blue \((B)\); cyan \((C)\); magenta \((M)\); and yellow \((Y)\). Robots can display no color \((\varnothing)\); cyan \((C)\); magenta \((M)\); and yellow \((Y)\). \(V_{c}\) is calculated likewise \(V_{n}\)—for each perceived color, the positions of color signals are aggregated into a unique attraction vector. Figure 1: Extended version of the e-puck. The picture indicates the set of sensors and actuators defined by RM 3. Alongside, we show the RGB blocks that we use in our experiments with TuttiFrutti. The omnidirectional vision turret allows the e-puck to perceive red, blue, green, cyan, magenta and yellow lights \((cam_{c})\) in a 360\({}^{\circ}\) field of view and within a range of about 0.5 m. For each color perceived, a unit vector \((V_{c})\) is associated, which represents a steady attraction to robots or objects that display the color. Finally, the control software of the robot can adjust independently the velocity of each wheel \((v_{k})\) between \(-0.12\) and \(0.12\) m/s, and, using the three RGB LEDs placed on the top of the e-puck, can display cyan, magenta or yellow. RM 3 is the first reference model adopted in the definition of a design method of the AutoMoDe family that includes the omnidirectional vision turret and the RGB LEDs of the e-puck platform. Vanilla, Chocolate and Maple are based on the simpler RM 1.1 [58]--the differences between RM 3 and RM 1.1 are highlighted in Table 1. [PERSON] introduced the reference model RM 2 [58], associated to e-pucks that can exchange binary messages using their range-and-bearing board.