A real-time feedback system stabilises the regulation of worker reproduction under various colony sizes

Social insects demonstrate adaptive behaviour for a given colony size. Remarkably, most species do this even without visual information in a dark environment. However, how they achieve this is yet unknown. Based on individual trait expression, an agent-based simulation was used to identify an explicit mechanism for understanding colony size dependent behaviour. Through repeated physical contact between the queen and individual workers, individual colony members monitor the physiological states of others, reflecting such contact information in their physiology and behaviour. Feedback between the sensing of physiological states and the corresponding behaviour patterns leads to self-organisation with colonies shifting according to their size. We showed (1) the queen can exhibit adaptive behaviour patterns for the increase in colony size while density per space remains unchanged, and (2) such physical constraints can underlie the adaptive switching of colony stages from successful patrol behaviour to unsuccessful patrol behaviour, which leads to constant ovary development (production of reproductive castes). The feedback loops embedded in the queen between the perception of internal states of the workers and behavioural patterns can explain the adaptive behaviour as a function of colony size.


Introduction
Various collective behaviours in social insects are regulated by self-organisation [1]. While many studies have addressed questions about how short-term (finite) collective behaviour (foraging, moving, etc., dynamics from the beginning to the end of behaviour) is autonomously controlled, there is relatively scant knowledge about the homeostatic mechanisms of societies. Namely, while the homeostatic mechanisms of individual organisms, such as breathing, thermoregulation, and osmoregulation have been thoroughly studied, how society is autonomously maintained has attracted less attention.
Each species or population of social insects may have a characteristic value in social traits such as colony size and caste ratios. However, the colony size can dramatically change over time as the colony grows (like in the body size of multicellular organisms [2]), and the caste composition and age composition also can show much shorter-term fluctuations [3][4][5]. The reproductive division of labour through suppression of worker reproduction, which is a hallmark of insect eusociality, is maintained even during such changes in the internal environment of the colony. This implies the existence of a size-free autonomous control mechanism, but their detailed mechanisms have not been clarified [6].
From a phylogenetic point of view, physical suppression via dominance behaviour is considered an ancestral state of insect eusociality and has changed to chemical suppression using the queen pheromone [7] as the colony size increases. The reason is likely due to a physical constraint since direct interference would be difficult if the colony size increased above a certain point. However, control problems could still arise as the colony size increases. There are also control problems which could arise during the process of colony development (colonial ontogeny) where physical suppression is still practical as a form of controlling worker ovary development.
So far, mechanisms of the reproductive division of labour, such as dominance behaviour, queen pheromones and worker policing, have been extensively studied [8][9][10], but less about the robustness and effectiveness of the regulation mechanisms against the increase in colony size [11][12][13][14].
Based on a computer simulation model, we examined how robust the regulation system for worker reproduction is when colony size changes. Workers in many Hymenoptera are prevented from laying eggs in the presence of the queen, instead engaging in non-reproductive work. For workers, this reproductive altruism is considered to be an adaptive tactic in terms of inclusive fitness optimisation [15,16].
In many species, when the queen dies or becomes absent for any reason, the worker's ovaries begin to develop and eventually lay male-destined haploid eggs. This switch in reproduction is triggered by the perception of the queen's presence. Therefore, the transmission of information on the existence of the queen is the key to understanding the mechanism of the reproductive division of labour [10,[17][18][19].
Information about the queen's existence has been considered to be transmitted by a chemical substance (queen pheromone). Empirical studies in recent years revealed that the main body of the queen pheromone is low volatility cuticular hydrocarbons (CHCs) that are conserved widely in social Hymenopteran taxa such as ants, bees and wasps [20]. Analogous solutions has also been found in termites in the form of 9-ODA [21,22]. In an environment where the queen pheromone has low volatility, its transmission is thought to require direct physical contact between the queen and her nest mates.
In this study, we focused on Diacamma ants as a model system [23]. Specifically the Japanese Diacamma, Diacamma.cf. Indicum, the only Japanese species. The information transmission mechanism of the gamergate worker of this species (known henceforth as the queen) has been well established [24]. This information is coded by CHCs and transmitted by direct contact between the queen and workers [25]. The queen is reported to exhibit specific behaviours to improve the information transmission efficiency of her presence. The locomotory activity of the ant queen in the nest is generally not as high as that of workers, but in the Japanese Diacamma, the queen frequently roams the nest (this is called patrol [26]).
Importantly, in large colonies, the queen's patrol is more active than that in small colonies [24]. In other words, the queen is buffering the possible decrease in the transmission efficiency (contact probability) of the queen pheromone to workers. Since in Diacamma the physiological effect (suppression of ovarian development of workers) of the queen pheromone can last only 3 hours or so [24], stable control of worker reproduction seems to require the perception of ever-changing colony size, thereby the queen can adjust her patrol effort. However, a question remains about how the queen obtains colony size information and reflects it in her actions.
In ants, the frequency of contacts between individuals is a local population-size proxy, and such contact frequency is used for behavioural switching in various contexts such as moving the nest [27,28]. Note, however, that the fundamental mechanisms which can link different types of perception such as the frequency of contacts, local density perception and colony size perception have been largely unclear.
In general, the feedback mechanism is essential for system stability and has been identified in various collective actions created by self-organisation [29][30][31]. In Diacamma, it is known that the queen acts aggressively towards reproductive workers and when she encounters an egg-laying worker during her patrol, she steals and destroys the egg (queen policing) [32]. Therefore, we assume the queen can detect the reproductive status of the worker when she contacts it during her patrol. There is at least some circumstantial evidence that the queen can detect the reproductive state of workers from Shimoji et al. [33]. The queen can suppress worker reproduction through dominance interactions. The ability to sense worker reproductive status is a necessary precursor to determine if and when these dominance interactions should take place.
Previous work by Sugawara et al. [34] theoretically suggested that a feedback mechanism could play a role in the colony size dependant patrol of Diacamma queens. Their model had three assumptions: (1) A worker that has lost contact with the queen for a significant period is released from the inhibitory effects of the queen pheromone; (2) such a worker starts ovarian development and also starts herself emission of the queen pheromone (or other chemicals associated with ovarian development); (3) when the queen, on patrol, comes into contact with a worker who emits such chemicals, the queen increases her future patrol effort according to the chemical concentration she perceives.
As the colony size increases, the contact efficiency of the queen decreases, and the workers have more chances to develop their ovaries and emit the associated chemicals. The colonysize-dependent behaviour of the queen would be a result of feedback mechanisms in response to changes in the worker's physiological condition (Fig 1).
Sugawara et al.'s model assumed that the queen contacts the workers at a constant rate (number of contacts per unit time), and as the colony grows, the contact rate with the queen per worker decreases linearly, increasing the patrol frequency of the queen (Fig 1). It is, however, not self-evident that the queen and workers have a constant contact rate. For instance, workers' behaviour may change as the density of workers in a given space increases. This itself is thought to be a response to changes in contact frequency to reduce the probability of contact between individuals [35].
However, the average individual density for a given space in the ant's nest may not change very much, even if the colony size changes. Franks et al. [36] found that ants changed the size of their nest space to fit with the colony size, making changes to the nest as required. Though others [37] found that the increase in nest space is slower than the increase in colony size, the largest variation in worker density occurred due to seasonal changes. Inter-individual distance also appears to be regulated [38]. Indeed in Diacamma the worker density per space in the nest remains almost constant (see the experimental results in Appendix 4, S4 Fig in appendix).
As the previous method by Sugawara et al. did not include the spatial aspect, our approach to this problem is to use an agent-based simulation in which the queen and workers can move around and interact in a defined space. Regardless of the colony size, the worker density per space (surface area) was assumed to remain constant. Thus, the queen was simulated under the condition that the absolute contact rate with other individuals (workers) would not be an indicator of colony size. The mathematical model by Sugawara et al. [34] focused only on the queen's patrol and did not investigate changes in worker reproductive status. We need to keep in mind that queen pheromones suppress worker reproduction, so the queen needs to evaluate the internal state of the workers. That is, if activated, the patrol behaviour of the queen results in the inactivation of the workers' ovaries, suppressing the development of ovaries. Furthermore, since the contact between the queen and the workers is a stochastic event, the contact interval tends to vary from individual to individual. Therefore, it is unclear whether a simple increase in patrol time or frequency is effective in limiting the reproduction of workers at a colony-wide level. This is the first time that an agent-based has been used to investigate the effectiveness of the queen's patrol behaviour via the tracking of the internal state of workers. Although simulations have been used in other biological contexts such as Boids. Boids are an agent-based simulation [39] that replicates the complex flight patterns observed in groups of flocking birds by simulating the interaction between the individuals of the flock. The agent-based simulation can also be used for predicting the behaviour of the flock given simple rules the individuals follow.

PLOS COMPUTATIONAL BIOLOGY
However, the Boids do not use feedback between individual agents to determine the flight path of the flock, instead, monitoring their neighbours.
Previous studies were also able to successfully simulate the nest quality assessment behaviour of ants. These include Şahin and Franks [40], which utilised a free mobile robot simulator to study nest assessment dynamics in a similar way to the current paper. Similar approaches were used by Perna et al. [31], Marshall et al. [41], and Shiraishi et al. [42] which were able to reproduce results observed in the literature for trail formation. For the agent-based simulation proposed in this paper, the agents have an internal state which modulates the behaviour of the agents and reacts to the mutual interactions which occur between agents to form a negative feedback loop. This leads to control over the division of reproductive labour in the colony.
Using an agent-based simulation has substantial advantages in studying our hypothesis of a negative feedback mechanism. As a result, it is possible to program an individual organism's behaviour and its interactions with other organisms with certain degrees of freedom, such as density. In other words, group behaviour arises as a result of the contact between agents and between the agents and their environment, rather than attempting to represent system-level phenomena [43,44]. Also, it gives other advantages such as allowing a closer examination of how the internal dynamics which characterise individual behaviour are coupled with the more complex group behaviour [45,46].
In this study, using an agent-based simulation, we investigated how the reproductive state (ovarian development) of the workers and the patrol behaviour of the queen are affected by the change in colony size. We set the condition that the individual density per nest space is constant even if the colony size changes. We also provide experimental evidence and results supporting the constant-density assumption and validating simulation results. We propose a feedback mechanism between the internal states and the patrol behaviour of the queen. We discuss how the feedback mechanism contributes to the stable suppression of worker reproduction as the colony size increases.

Maintenance and experimental procedure
The taxonomic status of species of genus Diacamma is still under revision. Since it is known that there are only one species of this genus in Japan that is very closely related to the Indian species Diacamma Indicum, we tentatively use the new name Diacamma cf. Indicum (from Japan) following Fujioka et al. [47](previously described as Diacamma sp. from Japan). The species has no morphological castes among females, that is, all females are wingless and monomorphic. In each colony, a single mated female (queen) functions as the reproductive queen that produces female eggs, whereas the other females play the helper-worker role [48].
New colonies are founded via colony fission. When the queen is absent after fission or due to queen mortality, among the cohort of newly emerged females the most dominant individual (usually the first emerged) copulates and becomes the next queen. In the field, colonies contain 20-300 workers, and alates (males) are produced in large queen-right colonies and orphan colonies [49,50]. Unmated workers can potentially lay male-destined haploid eggs. However, in colonies at the ergonomic (growing) stage (i.e., ones with fewer than 100 workers), worker reproduction is suppressed by queen pheromone and, queen and worker policing [25,32,50,51]. Whereas in colonies at the reproductive stage (containing 100 workers or more) such suppression is relaxed, and males are produced by worker reproduction [50].
We used colonies of Diacamma cf. indicum collected on the main island of Okinawa during 2001-2014. Those colonies were maintained in a laboratory at 25 ±1˚C with a light: dark cycle of 12 h:12 h. Each colony was kept in a plastic container (26.5 cm length × 18.5 cm width × 5 cm height) with a plaster floor (1.5 cm thick), however, in the natural environment, ants would explore the surrounding environments to expand the colony space whenever there is an opportunity. In the middle of the floor, a 13 × 9 cm depression (1 cm deep) covered with a glass plate was prepared for the ants as an artificial nest. Ants were fed honey water and mealworms ad libitum three or four times a week.
Ants were kept in the laboratory. First, all workers and the queen in each of the 15 colonies were marked with enamel paint for individual identification. The number of workers (colony size) was 58, 69, 81, 110, 125, 128, 131, 144, 149, 151, 162, 169, 174, 181, and 214, respectively (mean ± SD = 137.9 ± 42.7). For the video recording, each colony was moved to another artificial nest, which was a plastic container (26.5 cm length × 18.5 cm width × 5 cm height) with a plaster floor (1.5 cm thick). In the middle of the floor, a depression (8 cm length × 16 cm width × 1 cm depth) covered with a glass plate was prepared for the ants as an artificial nest. After acclimatisation for a day, we video-recorded each colony for 12h. By using that video data, we were able to track all queen-worker contacts.

Agent-based simulations
Overview. To validate our hypothesis of the negative feedback loop between the queen and workers, we ran the agent-based simulations in which the queen and workers move randomly within the grid space and contact each other. The internal state of the workers is defined as the hypothetical physiological condition, such as the hormone level, which controls the ovary development in workers and queen pheromone secretion in the queen. Within an ant colony, the queen's perception of the internal state via contact is largely dependent on the frequency of her contacts with workers as a function of time. Thus, along with the internal dynamics of the queen and workers, the spatial distribution of the workers and the queen as a function of time should play an important role in the patrol behaviour of queens and the reproductive behaviour of workers. Note that the density of workers was kept the same though the number of workers (colony size) increased. This can distinguish the mechanism based on the negative feedback loop from those dependent on the perception of density [35]. To include the spatial degree of freedom, we used an agent-based simulation to model the behaviour of the queen and individual workers within a certain space representing the nest.
We first assumed that the internal state of the workers and the queen would operate differently. For the worker, the internal state would represent their ovary development and demonstrate a steady increase over time. This could be suppressed by the queen via direct contact (perception of the queen pheromone). For the queen, the internal state would represent the probability to become active. That is, the likelihood that the queen will go from an inactive state to an active state, at which point she will begin to patrol the colony. The queen's internal state steadily decreases (increasing her resting period) but increases when interacting with workers. This increase is proportional to the internal state of the worker who has been contacted. Meaning, a worker with a low internal state has minimal effect on the queen's internal state but a worker with a high internal state increases the queen's internal state and therefore her likelihood to begin patrolling the colony.
The queen's movement [52,53] around the nest was based on her temporal behaviour: when she is in the active state, she moves around the space, whereas in the inactive state, she halts within the grid she had moved in. The contact behaviour of the queen depended on these temporal behavioural patterns of active-inactive cycles. In this case, the workers also have active-inactive cycles which determined their movement around the space and were determined a priori.
The movement of the queen and workers around the colony was a simple random walk around the nest space. The next position of the agents is generated randomly from one of 4 directions, North, South, East and West. The movements of the agents are asynchronous, with agents only moving when they are in an active state. The queen walks around the nest space to contact all workers in the colony to suppress their internal states. The duration of the simulation was determined by how long it took the queen to contact all workers at least once. The simulation was then terminated. Various variables were recorded for analysis, including the active and inactive period of the queen and the contacts between the queen and workers.
Internal state dynamics. The rhythmic cycle of the active-inactive state was simplified into the two time periods of the active time (t a ) and the inactive time (t r ). For the worker agents, t a and t r were kept constant (t a constant ¼ 20 steps, t r constant ¼ 100 steps). For the queen agent, t a was kept constant (t a constant ¼ 20 steps), but t r (t) was modulated by her internal state, I q (t), using the dynamics of: where t r constant and δ were constant (t r constant ¼ 100 steps, δ = 20.0). I q (t) represents the likelihood that the queen will transition to patrolling at time t. Increases in I q (t) lead to a decrease in the inactive time, t r (t), of the queen. If the queen has a prolonged period where her internal state is low, then t r (t) approaches t r constant .
To test our hypothesis about the feedback mechanisms of internal state and behaviour, we model the dynamics of the internal states of the queen and workers in the following manner. The dynamics of the internal state of the queen is given by: (1 − �) � I q (t) is a damping factor, where � = 0.01 and is constant. As the reproductive division of labour enables the queen to be the main producer of offspring in the colony, there is a compromise between patrolling the colony and laying eggs. As the internal state of the queen represents the likelihood she will become active, we use the damping factor to naturally decrease the queen's internal state over time. This allows the queen to move to a more restful state, where there is minimal patrol, assuming workers have a low internal state. The second term, a � dðx q ! ; x w �! Þ � I w ðtÞ, is an activation factor. The activation factor increases the probability of the queen becoming active when the queen contacts a worker with a high internal state. It is also proportional to the number of contacts with the workers. α = 0.1 and is constant. x g ! and x w �! denote the position of the queen and worker respectively. The term δ(r) denotes Kronecker's delta, i.e., its value is zero except when the distance between x q ! and x w �! is zero, then δ(r) =

1.
The dynamics of the internal state of the workers was given by: γ and β represent an activation factor that increases the internal state of the worker over time as a function of time. This levels off over time as I w (t) approaches 1. In this case, γ and β were set to 0.0001. Here we chose the constants of the activation factor to reflect the pace of ovary development in workers observed in previous work where the queen was removed from the colony [24]. The next term only functions to decrease the internal state of the worker, I w (t), when the worker is contacted by the queen with κ = 0.9009, representing an approximately 90% decrease in the worker's internal state.
Spatial behavioural dynamics. While we understand that the movement of ants in a real colony are less than random, for simplicity, we implemented spatial dynamics in the following way: 1. The virtual nest was set with a grid size of L × L (Fig 2A) with distance measured in arbitrary units (simply referred to as units). The ants (agents) were distributed randomly throughout the nest space at the start of the simulation. The size of the nest space was dependent on the colony size to keep the density (N/L 2 ) approximately constant (L was set proportional to the square root of N). For example, when N = 20, L = 100 units. We controlled L to keep the ant density per space constant (this assumption was based on empirical evidence as shown in Appendix 3 and Appendix 4).

2.
Each agent was set to be 5 units long. Every time step the agents move randomly in one of four directions: north, south, east, or west (Fig 2B) in the grid. The agents are prevented from going outside of the virtual nest space with a simple check of their next position vs the position of the boundaries of the space.

3.
Agents are unable to overlap each other within the single grid. PLOS COMPUTATIONAL BIOLOGY 4. A contact is determined when a worker is close to the queen, within the length of 5 units (see evidence of the ant's morphology Fig 2C). The queen can only contact one worker in each time step. Therefore we decided that the queen would not contact the same worker twice in a row. This is to decrease the prospect of a worker who has already been contacted recently monopolising contact with the queen despite other workers being in range in a short period of time. When the queen contacts the worker, the internal state of the queen and the worker increase and decrease respectively. The increase in the queen's internal state is proportional to the internal state of the worker, while the decrease in the worker's internal state is constant (approx. a 90% decrease).
Initial conditions and analysis. Conditions of workers and the queen were initialised with parameters that represent the position, direction, velocity and internal state. The internal states of the workers were randomly assigned a value between 0 and 0.5. The queen was given an initial internal state of 0.1. The number of ant workers, N, was predefined to sample the different colony sizes. The initial rest time of the queen is set to the maximum rest time (t r constant ¼ 100). The status of the workers and queen (whether it is active or inactive) were randomly assigned at the beginning of the simulation. Each agent, either a worker or the queen, has its internal state, I w and I q , respectively. I w , the internal state, is assumed to decrease when the worker contacts the queen but to increase otherwise (Eq 3). I q is assumed to increase when the queen encounters a worker with high I w and to decrease in the absence of such an encounter (Eq 2). The queen's internal state is assumed to be correlated with her patrol behaviour, i.e., a higher I q leads to a shorter resting time, t r .
The simulation ended when the queen had contacted all the workers in the colony at least once. The simulation was repeated 50 times for each of the colony sizes N = 20−200 increasing N in increments of 20. The colony size coincides with the range of natural Diacamma cf. Indicum colony sizes [24]. In every trial, the positions of the workers are reset to another random value (different initial conditions for spatial distributions of workers). The total time of the simulation, patrol frequency and length of the rest time were recorded. The internal states of the workers and the contacts between agents were recorded. Using these variables, the effect of the queen's patrol behaviour could be analysed by calculating the average internal state of workers over time, as well as the distribution of these internal states. Contact rates between the queen and workers were also calculated based on the number of contacts made between the queen and the workers within the simulation time. All variables used in the simulation are shown in Table 1.
We tested the robustness of our model in several ways. Firstly, we checked the initialisation of parameters. By increasing the initial internal of the queen, we assessed its effect on the system. We found that it had little affect and returned to similar values seen in our original initialisation (see Appendix 8, S8 and S9 Figs). We then standardised the time across the colony sizes which were investigated to mitigate possible effects due to the system not being in a steady state. We also found this to have little effect (possibly strengthening our results, see Appendix 9, S10 Fig). Finally, we increased β and γ to 10x their original values. While we found a significant difference in the results (see Appendix 10, S11 Fig), the dynamics of the system were unchanged.

Results
In the experimental results, overall in small colonies with fewer than 100 workers, the queen was able to contact more than 80% of workers in the 20 bouts of patrols, whereas, in large colonies with more than 100 workers, the queens' per worker contact frequency dramatically decreased (Fig 3). These results suggest that although the queen increased her patrol effort with increasing colony size, the efficiency of making contacts between the queen and workers dropped in the large colonies.
The first set of simulation results displays colony size dependent features of the queen's patrol behaviour. Fig 4 showed the patrol frequency and rest time of the queen with respect to  i.e., as the colony size increases, the queen increases her patrol effort to contact an increasing number of workers in the colony. The increase in patrol frequency does not lead to constant patrolling by the queen at large colony sizes, which would be impossible for a real queen due to physical restrictions. These results qualitatively agreed with the experimental data reported by Kikuchi et al. [24]. Kikuchi et al., through colony size manipulation, also showed that the queen increased her patrol effort with increasing colony size. This was also confirmed through our own experiments (Appendix 1, S1 Fig). As a next step, let us determine the effectiveness of the queen's patrol behaviour in controlling the internal state of workers in the colony.
To determine the effectiveness of the queen's patrol behaviour, distributions of worker internal states were calculated over time.

PLOS COMPUTATIONAL BIOLOGY
we could quantify the internal states as a function of time in the agent-based simulations, which cannot be obtained experimentally.
These results indicate that the real-time feedback model of the queen's patrol behaviour suppresses the internal states of the workers effectively with smaller variance than the case when there is no feedback. Results for a larger colony size, N = 120, show that the feedback model can be effective in controlling the internal state of workers when compared to no the feedback case (S5 Fig). However, there appears to be an increase in the mean internal state and the variance of the distribution. Therefore, as colony size increases, the effectiveness of the queen's patrol behaviour decreases.
The decrease in the efficiency of the queen's patrol behaviour can be shown more clearly in Fig 6 which shows the mean internal states of workers over time for different colony sizes This confirms that the suppression of the internal states was realised sufficiently via physical contact by the queen. This indicates that the feedback loops between the perception of the

PLOS COMPUTATIONAL BIOLOGY
internal states and the decrease of the rest time in patrol worked effectively. Also, in the spatial degree of freedom, the queen (through her random walk) was able to contact all the workers who were also walking around randomly even though the colony size increases.
When the colony size increases further, there appears to be an inflexion point, between N = 80 and N = 100 (Fig 6), where the mean internal state begins to increase rather than decrease as a function of time. This shows a decrease in the effectiveness of the queen's suppression of worker internal states or the start of the failure of the patrol behaviour. This can be seen more clearly in the larger colony sizes (N = 120 to N = 200). The lack of suppression at this stage is due to the contact between the queen and workers and not the physical limitation of the queen. While there is an increase in the mean internal state with colony size, there appears to be relative stabilisation in the mean after some time. As a next step, let us interrogate the mechanism in the spatial degree of freedom, namely the number of contacts from the queen to the workers, and vice versa.
By logging the number of contacts that occurred during the simulation, various contact rates could be calculated. These are the queen contact rate, the per-worker contact rate and the contact rate between workers. The contact rate is defined as the number of contacts per unit time. Therefore, the queen contact rate is the rate at which the queen contacts workers per unit time. While the per-worker contact rate is the average contact rate of a worker in the colony. The contact rate between workers is the rate workers contact any other worker in the colony. These values were calculated separately, with contacts logged for the queen and individual workers. Theoretically, assuming an even distribution of contacts between workers, the perworker contact rate is equivalent to the queen contact rate divided by the number of workers. However, the per-worker contact rate conveys the contact efficiency of the queen and, therefore, the effectiveness of the queen's patrol behaviour. Fig 7 shows various contact rates between the queen and workers as a function of the colony size. Fig 7A shows the overall contact rate for the queen increasing (black line) while the perworker contact rate decreases (blue line). Despite the increased patrol effort by the queen (shown in Fig 4), the contact efficiency of the queen decreases with colony size. This is due to the insufficient increase in the queen contact rate. Distinctions were made for the contact rate during the rest cycles ( Fig 7B) and patrol cycles (Fig 7C) of the queen. This was to demonstrate that the majority of the contacts by the queen were made when the queen was patrolling.
Note here that all the results obtained in the agent-based simulations were predicated on constant density. The results so far indicate that while the queen contacts more workers in larger colonies, based on more frequent patrols, the lower contact per worker leads to an increase in the mean internal state of workers in the colony due to the decrease in contact efficiency.
The loss of contact efficiency may be due to a colony size dependent effect on the patrol behaviour of the queen. This should not affect how workers contact each other. To test this, we quantified the contact rate between workers, shown in Fig 8. Similar to Fig 7A, the contact rate between workers increases as a function of colony size, but the per-worker contact rate between workers decreases. Note again that the results were obtained based on constant density. The per-worker contact rate decreases for the same reason it decreases for the queen. The contact efficiency is lost at larger colonies because the agent's movement is insufficient to cover the space. However, for the queen, we can relate this to her behaviour because her internal state is related to her movement.
In comparison, the worker's movement stays the same at all times. Hence, the loss in perworker contact rate between workers is likely more significant than the drop in per-worker contact rate with the queen. Although there are more workers than the queen and as the simulation ends once the queen has contacted every worker at least once, there is a more considerable drop in the per-worker contact rate with the queen in Fig 7A than in Fig 8. The workers do not have to have unique contact with other workers. In contrast, the queen does have unique contacts because she needs to address every worker individually.

Discussion
Our results from the agent-based simulations revealed that the real-time feedback system between a queen and workers can have an influential role in maintaining and stabilising the internal states of the workers under various colony sizes. The simulations showed that, with a constant density, the queen increased her patrol frequency as the colony size grew (Fig 4A), and as a result, she could suppress the internal states of workers effectively (Fig 5). The The overall queen contact rate and the per-worker contact rate. The overall queen contact rate increases with colony size. This reflects an increase in the patrol effort as well as the increase in colony size. However, the per-worker contact rate decreases with colony size, showing a decrease in the contact efficiency of the queen. (B) The queen contact rate and per worker contact rate during the rest cycles of the queen. While there is a slight increase in the queen contact rate, overall the trend is a decrease in both the queen and per-worker contact rate with colony size. This means leads to (C) The queen contact rate and per worker contact rate during the patrol cycles of the queen. There is an increase in the queen contact rate, showing that more workers are contacted during the patrol cycles of the queen than during the rest cycles. However, there is still a decrease in the perworker contact rate, similar to Fig 7A & 7B. https://doi.org/10.1371/journal.pcbi.1010840.g007

PLOS COMPUTATIONAL BIOLOGY
underlying feedback mechanism is as follows: When the average internal state of workers increases, the queen frequently perceives a larger internal state, leading to an increase in the queen's internal state (2). This increase in the queen's internal state in turn leads to an increase in the queen's patrol frequency by decreasing her resting time (1). In short, as the colony size increases, the per-worker contact rate (Fig 7A, blue line) decreases, which triggers an increase in the queen's patrol frequency (Fig 4A). Hence, the queen's sterility-maintaining behaviour in response to an increasing colony size is revealed. However, this was only the case until the colony reached certain colony sizes. In larger colonies, N = 120 to N = 200, the queen contact efficiency became low (Fig 7A), and consequently, the internal states of workers were no longer effectively suppressed, i.e., the average internal states increased as a function of time (Fig 6) and at the end of the run many workers were ready to perform self-reproduction.
This simulation result was qualitatively consistent with what was observed in real Diacamma colonies. Namely, a positive association between the queen patrol effort and colony size (Appendix 1, S1 Fig, see also [24]), and the effective suppression of worker reproduction in small colonies and less effective suppression in larger colonies [49,50]. The feedback loops through physical contact between queens and workers are sufficient to suppress the internal state of workers in small colonies (Fig 5). In theory, such colony size dependent worker reproduction is adaptive in terms of the inclusive fitness of workers in monogynous and monandrous hymenopteran colonies [16]. Suppression of worker's reproduction when the colony is small (ergonomic stage) contributes to rapid colony growth. When the colony is large (reproductive stage), worker-produced eggs are less policed and more likely to survive [50], which can imply that the selfish option (worker reproduction) may benefit workers.
We are the first to explicitly state a hypothetical proximate mechanism generating the colony size dependent character expression and the shift from ergonomic to reproductive stages. This is a general pattern in social insects. Contact rate between workers. The contact rate between workers (black line) increases with colony size. An increased colony means more workers so there will be more contacts in general. When looking at the per-worker contact rate (blue line), there is a decrease with colony size similar to that seen in Fig 7A. There appears to be a decrease in the contact efficiency not just between the queen and workers but also between workers. https://doi.org/10.1371/journal.pcbi.1010840.g008 More importantly, both the reproductive division of labour among a queen and workers and the switch in the colony stages (from ergonomic to reproductive) are simply achieved by the decision making of member individuals who just rely on personally acquired local information of recently encountered individuals. Decentralised control and self-organisation are thought to be the mechanisms that give rise to various adaptive functions of social insect colonies, such as the allocation of the workforce to various tasks that the colony needs, and selective recruitment of foragers to better food sources among the food sources available [54][55][56]. These theories commonly argue that single colony members have access to only limited "local" information, but they perform adaptively as a whole [57,58]. So far, the "overall" frequency of encounters with other individuals related to local density in a nest has been often discussed as a piece of effective colony-size information for each colony member to decide their behaviour [28,35]. However, in this study, we assumed that the individual density per nest space, thus the contact frequency with other individuals per time per individual, is constant even if the colony size changes. We consider that in real ants a positive correlation of individual density per space with colony size can occur. This can occur in situations in which ants have physical difficulty in expanding their own nest space. However, in the absence of such a spatial constraint, it would be more natural to assume that ants extend the housing architecture of the nest as the colony grows. For this reason, we consider that local density, or the simple frequency of encounters, does not generally serve as reliable information on total colony size. Actually, in Diacamma (Appendix 4, S4 Fig) individual density per nest space is likely regulated to be more or less constant. Also, in some ants, workers change their behaviours depending on density, thereby contact frequency does not linearly increase with density [35].
In this computational study, we show that even at a constant individual density per nest space, colony size dependent behaviours both in queens and workers emerged. This demonstrates that the behavioural changes caused by the feedback loop (which couples the internal state of the queen and workers) code the information regarding the contact rate of the individual worker by the queen. Note that in our simulations all the agents are assumed to exhibit a random walk, i.e., no grouping or clustering, in a constant individual density per space. This demonstrates that it is not the simple overall frequency of encounters, but instead, the two types of specific contact rates that play a role; the contact rate of the queen with reproductive workers and the contact rate of the worker with the queen. The former contact rate is a measure of the inverse of how completely the queen can make contact with workers. The latter is how often individual workers can be contacted by the queen. Due to the contact rate of the individual worker decreasing with colony size, the internal state of the worker increases. Through the resulting change in the internal states, the queen's patrol behaviour is controlled as if she perceives the colony size as discussed previously. Furthermore, the queen patrol efficiency decreases in very large colonies presumably due to some constraints (see later), which leads to the colony stage shifting from the ergonomic stage to the reproductive one, a general phenomenon considered to be adaptive. This discovery is quite novel in that it reveals a single real-time feedback system can control both suppression of worker reproduction in small colonies and its release in large colonies. In monogynous colonies when the queen pheromone is transmitted by direct physical contact between the queen and workers, we consider that this mechanism can generally operate. When these situations arise, the queen-to-worker ratio in the group can be of key importance. Now we consider the generality of the model presented in this paper in relation to both Diacamma cf. Indicum and other social insects. As we have shown, our model is able to replicate the patrol behaviour observed in the queen for Diacamma cf. Indicum, with increases in the patrol frequency as a function of colony size. Additionally, previous work [24] has shown the colony size distribution for Diacamma with most colonies containing less than 120 workers. From our results (Fig 6), we show that there is a transition between N = 80 and N = 120 where the queen's control on worker internal state weakens, with an increase in the internal state of workers. Thus, our model adds value in its explanation of the field observations of real Diacamma colonies. With regards to other social insects, the applicability of our model is dependant on the way information is transmitted across the colony. For Bumblebees and Honeybees [24] where queen presence is transmitted through low volatility CHCs, our model could be relevant and adapted to investigate the effectiveness of the queen presence in those colonies and the suppression of worker reproduction. Other eusocial insects such as Pachycondyla and Dinoponera use dominance interactions from the queen to control worker reproduction in the colony [59,60]. For such insects, our model could be applicable as a mechanism for the enforcement of the reproductive division of labour. However, for social insects with much larger colonies (such as leaf cutter ants) it would likely be impractical given decreases in queen patrol effectiveness shown in this paper. Queen patrol behaviour would have to be observed in such colonies and other mechanisms would have to be taken into account when determining the importance of such a behaviour in the dynamics of the colony.

Conclusion
A key assumption of our real-time feedback model is that the queen can perceive the reproductive status (an internal physiological state) of a worker when she contacts it. More importantly, the model also assumes that contact with a reproductive worker(s) leads to an increase in the frequency of queen patrols. These are, however, necessary to empirically demonstrate in experiments using Diacamma.
There is another issue that remains to be addressed. Why should the queen's patrol behaviour peak at a certain rate in real Diacamma colonies, even if the colony size expands further? The peak queen patrol time is only 20% to 30% of the total time available (S1 Fig), and thus, in principle, the queen could afford to increase her patrol effort further. If queens could significantly increase the frequency of their patrol behaviour, the suppression of worker reproduction would be achieved even in large colonies. To understand the adaptive strategies of queens, we must clarify the limiting factor of the queen's effort investment in patrolling large colonies. One hypothesis is that excessive investment in patrolling might have some fitness costs such as diminished survival and fecundity, which should also be empirically studied in the future.
Also, as to proximate mechanisms of reproductive division of labour in Diacamma, we have to take into account other mechanisms, such as dominance behaviour between workers and worker policing. Dominance behaviour is a worker-worker aggressive interaction over the right to produce own male offspring, which occurs both in the absence of the queen [26] and in the presence of the queen, and finally forms a linear hierarchy among workers [61,62]. Interestingly, similar to the patrol behaviour of queens, ritualised aggressive behaviours by dominant individuals can have an inhibitory effect on the reproductive physiology of subordinate workers [33]. The frequency of dominance behaviours is known to increase with colony size in queen-right colonies [24], which might have a complementary effect to suppress worker reproduction when the efficiency of queen patrol declines. Worker policing, destruction of worker-produced eggs and aggression to an ovary-developed worker by other workers exist in Diacamma [32,51], of which occurrence is also colony-size dependent [50]. Future studies need to develop a simulation model that involves these two mechanisms simultaneously operating. We believe that future research directions discussed above will further enhance our understanding of the mechanisms of the reproductive division of labour in social insects.
rapidly? To answer this, we increased the constants β and γ. From Eq 3, β and γ control the rate at which workers develop their internal state. By increasing their value to 10x the original value, S11 Fig showed that the effectiveness of the queen's patrol behaviour in this model is reliant on the rate that workers develop their internal state. The dynamics are similar, with weaker control as the colony size increases, but total loss of control occurs at smaller colony sizes. In the main results β and γ were set to approximate the development rate found in the previous work of Kikuchi et al. [24]. By running the simulation for a consistent period of time for each colony size, we guarantee a steady state for each. With this, we see greater control by the queen over the internal state of workers. There is still weakening in the effectiveness of the queen's patrol behaviour but the reversal of the suppression occurs much later at the largest colony sizes. (TIF) S11 Fig. Increasing β and γ. By increasing β and γ, the rate that workers develop their internal state, we showed that the queen has weaker control over the reproduction of workers. Loss of control begins even at smaller colony sizes such as N = 40. (TIF)