3.2.3. Speed Hormone

The speed hormone equation is as follows:

$$H\_{\rm s}(t) = \lambda\_{\rm s} H\_{\rm s}(t-1) + \gamma\_{\rm s1} D(t) - \gamma\_{\rm s2} H\_{\rm r} \tag{4}$$

where *Hs*(*t*) is the Speed Hormone, *λ<sup>s</sup>* is the decay rate for the system, *γs*<sup>1</sup> is the weighting for the stimuli and *γs*<sup>2</sup> is the weighting for the inhibitor. The speed hormone had two influencing factors. A stimulus, *D*(*t*) (Demand), and an inhibitor, *Hr*. With these features in place, higher demand would result in faster activity, consuming more energy but reducing the item demand. Conversely, the system would slow down robots in poor positions or in areas densely populated by other members of the swarm, consuming less energy while in a compromised position. It is worth noting that *Hr* was used in this case rather than *C* in order to smooth the response to collisions, rather than experiencing a sudden, large value inhibiting the system upon encountering a collision, *Hr* allows for the reduction to *Hs* to be smooth and gradual. This avoids the sudden loss of mobility in what could potentially be a one off collision.

While the speed of a robot does increase with the Speed Hormone, it doesn't have true direct control over the motor speed as has been seen in studies such as [8]. Instead, the Speed Hormone system allows the robot to operate at the optimal travelling speed for energy efficiency. To avoid deviation from this speed at low hormone levels, the speed hormone has no effect on speed until it exceeds the value of 10. Values below 10 in speed hormone would have very minimal effect on the actual speed of the robot while still reducing energy efficiency by deviating from the optimal speed. After the value of 10, the speed hormone effects the speed with the relationship shown in Equation (5), providing potential speeds ranging between 35, for *Hs* values below 10, and 50 when *Hs* is fully saturated.

$$S = 33.33 + \frac{H\_s}{6} \tag{5}$$

#### 3.2.4. Parameters

Parameter values for the hormone equations (shown in Table 1) were selected empirically using the context of the experiments to decide on appropriate time scales for decay, these time scales were then converted to decay values using Equation (6), taking values for *Hsat* (the numerical value at which the virtual hormone will saturate) and *Hfin* (the smallest value deemed relevant to the hormone system) as 100 and 1 respectively. The period of decay chosen for the sleep hormone was based on the amount of time it would take for an ideally operating robot to locate and retrieve two food items. i.e., the time it would take to reach the centre of available items and return twice, travelling in a straight line while operating at optimal speed. This meant that under ideal operation stimuli from the previous collection would still be present when returning for the second time, allowing the hormone value to build. The period for decay for the return hormone was calculated for only a single full collection and the collisions in a previous search period should have minimal bearing on that of the next.

$$
\lambda = \sqrt[n]{\frac{H\_{fin}}{H\_{sat}}} \tag{6}
$$

Stimuli coefficients were subsequently chosen to provide adequate response when interacting at expected minimum and maximum values of decay and rate of collision.



### *3.3. Comparison Systems*

In order to test how effective the designed hormone systems were, two additional systems were produced for comparison. The first had no adaptive element, keeping all robots at optimal speed (35 cm/s) while foraging. This system was not influenced by 'demand' and should highlight the point at which speed adaptation is required to obtain remaining items required in the collection. In order to keep environmental awareness consistent across the three systems, the return hormone

was implemented across all systems, allowing swarm members to return to the nest site should they encounter too many collisions.

The second comparison system featured an on-line adaptation method similar to reinforcement learning. This engineered adaptation was driven by the same function for demand as featured in the virtual hormone system. This style of online engineered adaptation has been used in the past to modify swarm traits, finding optimal partition lengths in [20] modifying travel distances based on success and failure of swarm individuals.

The adaptive system, designed for speed control, stepped the robot motor speeds up or down depending on the value of demand upon returning to the nest site. Positive demand values would increase speed, and negative values would decrease it. As with the hormone system, this would allow speed to be increased or decreased (and hence increase or decrease energy expenditure) in relation to collection requirements.

The increments and decrements made by the engineered system were influenced by demand, providing a variable adaptation to the system. A base change of 1 was applied based on the sign of the demand in addition to a change proportionate to the value of demand itself, increased by a coefficient of 20 to make suitable changes to the speed value. These values were tuned via iterative selection to produce strong rates of collection and energy efficiency across a wide variety of task demands.

The base change was used so that the swarm can catch up to the required collection rate even when demand is small. If this change was not implemented, increments based solely of demand would be too small to have a perceivable effect on robot speed. The same effect could not be achieved by increasing the coefficient of demand because the system could react too quickly to large disparities in current collection rate versus required rate and overcompensate by a large margin.
