# Swarming Behavior Emerging from the Uptake-Kinetics Feedback Control in a Plant-Root-Inspired Robot
## 2 Materials and Methods
### Uptake-Kinetics Feedback Control
Considering that Michaelis–Menten parameters have been found to preserve the same ratios of nutrient requirement (N:P and K:P equal to 10 from [45]), points for fitting \(I_{max}\) and \(K_{m}\), for nutrient N and K, were estimated from the values known for nutrient P at different concentration as found in the literature [34]. Figure 3: Schematic of the uptake–kinetic feedback control. On the left, a detailed control diagram, and on the right, the workflow of the control showing the with sequential blocks of internal macro operations. Each root sends the quantity of each nutrient acquired from the environment to the shoot agent that redistributes values among all root agents. Internally, each root, after updating its memory, updates Michaelis–Menten parameters and nutrients’ priorities. On the second step, each root senses the environment and with the concentration perceived for each nutrient and its corresponding Michaelis–Menten parameters actuates the uptake and sends it to the shoot; with the same perception, each root performs also the evaluation of the next direction of growth that is obtained as combination between gravitropism and chemotropism. If a nutrient is completely lacking, its priority rises to 1. On the other hand, when the internal memory is full, or, as in our case, when it reaches a maximal filling threshold (we imposed a threshold equal to storeCapacity/4), this nutrient is no longer needed and its priority decreases to 0. \(P\) becomes negative when a nutrient is accumulated over the filling threshold, transforming that nutrient into a repulsive stimulus. For each stimulus perceived by receptor site \(i\), the corresponding trypic response (_Property 3_) is defined by the vector whose magnitude expresses the strength of attraction in that direction, similarly to [26], but here, unlike in [26], each nutrient \(j\) is weighted with its dynamic priority (\(P^{j}\)) obtained by Equation (6). In addition, while in [26], the instantaneous concentration value was considered, now due to _Property 4_, the variation in concentration of nutrient \(j\) perceived in direction \(i\) (\(\Delta_{i}^{j}(t)\)) is taken, obtained as the difference between the current concentration at time \(t\) with the averaged concentration among all directions at some previous time step (\(t-h\)). For each stimulus in each direction, the strength of attraction is defined as:  
\[u_{j}^{i}(t)=P^{j}\times\Delta_{i}^{j}(t). \tag{7}\]  
Vector of attraction for chemical stimulation towards each direction \(i\) is then defined by:  
\[\overrightarrow{s_{i}}(t)=\hat{i}\times\sum_{j=1}^{J}u_{j}^{i}(t), \tag{8}\]  
where \(\hat{i}\) represents the unit vector towards direction \(i\). Thus, for a generic nutrient \(j\) that has a positive priority \(P^{j}\), when the concentration of nutrient \(j\) decreases (\(\Delta_{i}^{j}(t)\) is negative), the chemotropic response becomes repulsive towards direction \(i\) for that nutrient, while it is attractive if the concentration increases (positive \(\Delta_{i}^{j}(t)\)). The directional resulting vector, representing the final chemotropic response, is obtained by:  
\[\overrightarrow{r}(t)=\sum_{i=1}^{S}\overrightarrow{s_{i}}(t). \tag{9}\]  
From \(\overrightarrow{r}\), the preferential direction of growth (10) and strength of attraction (11) can be extracted for the chemical stimulation:  
\[\alpha_{ch}=\tan^{-1}\left(\frac{r_{y}}{r_{x}}\right), \tag{10}\]  
\[\varnothing_{ch}= \begin{cases}\overline{\varnothing_{ch}}\sqrt{r_{x}^{2}+r_{y} ^{2}}&\overline{\varnothing_{ch}}\sqrt{r_{x}^{2}+r_{y}^{2}}\leq\overline{ \varnothing_{ch}}\\ \overline{\varnothing_{ch}}&\textit{otherwise}\end{cases} . \tag{11}\]  
In Equation (11), \(\overline{\varnothing_{ch}}\) represents a maximum threshold for the bending angle that can be induced and reached in one single time step by chemical stimulation, fixed in our implementation at 0.5\({}^{\circ}\).