Occupancy patterns in royalsocietypublishing.org/journal/rsos superorganisms: a spin-glass approach to ant exploration Javier Cristín1, Frederic Bartumeus2,3,4, Vicenç Méndez1 Research and Daniel Campos1 Cite this article: Cristín J, Bartumeus F, Méndez 1 V, Campos D. 2020 Occupancy patterns in Grup de Física Estadística, Departament de Física, Facultat de Ciències), superorganisms: a spin-glass approach to ant Universitat Autònoma de Barcelona, 08193 Bellaterra, Barcelona, Spain 2 Centre d’Estudis Avançats de Blanes (CEAB-CSIC), Carrer Cala Sant Francesc 14 17300 Girona, exploration. R. Soc. Open Sci. 7: 201250. Spain https://doi.org/10.1098/rsos.201250 3 ICREA, Institut Català de Recerca i Estudis Avançats, 08010 Barcelona, Spain 4 CREAF, Centre de Recerca Ecològica i Aplicacions Forestals, 08193 Barcelona, Spain JC, 0000-0003-2091-0346; FB, 0000-0001-6908-3797 Received: 14 July 2020 Emergence of collective, as well as superorganism-like, Accepted: 23 November 2020 behaviour in biological populations requires the existence of rules of communication, either direct or indirect, between organisms. Because reaching an understanding of such rules at the individual level can be often difficult, approaches carried out at higher, or effective, levels of description can represent a Subject Category: useful alternative. In the present work, we show how a spin- Physics and biophysics glass approach characteristic of statistical physics can be used as a tool to characterize the properties of the spatial occupancy Subject Areas: patterns of a biological population. We exploit the presence of ecology/complexity/computational biology pairwise interactions in spin-glass models for detecting correlations between occupancies at different sites in the media. Keywords: Such correlations, we claim, represent a proxy to the existence occupancy patterns, ant exploration, spin-glass of planned and/or social strategies in the spatial organization of the population. Our spin-glass approach does not only identify those correlations but produces a statistical replica of the system (at the level of occupancy patterns) that can be Author for correspondence: subsequently used for testing alternative conditions/ Javier Cristín hypothesis. Here, this methodology is presented and illustrated e-mail: javier.cristin@uab.cat for a particular case of study: we analyse occupancy patterns of Aphaenogaster senilis ants during foraging through a simplified environment consisting of a discrete (tree-like) artificial lattice. Our spin-glass approach consistently reproduces the experimental occupancy patterns across time, and besides, an intuitive biological interpretation of the parameters is attainable. Likewise, we prove that pairwise correlations are important for reproducing these dynamics by showing how a null model, where such correlations are neglected, would perform much worse; this provides a solid evidence to the existence of superorganism-like strategies in the colony. Electronic supplementary material is available online at https://doi.org/10.6084/m9.figshare.c. 5238501. © 2020 The Authors. Published by the Royal Society under the terms of the Creative Commons Attribution License http://creativecommons.org/licenses/by/4.0/, which permits unrestricted use, provided the original author and source are credited. 1. Introduction 2 royalsocietypublishing.org/journal/rsos Collective behaviour is an adaptive widespread mechanism in biology present at many different organization levels. Phenomena such as bacteria self-organization [1,2], bird synchronization [3,4], movement in groups [5] and human social networks [6] are paradigmatic examples where emerging macroscopic properties come out of microscopic interactions. Movement patterns, in particular, represent a common and relevant proxy to quantify classes of collective behaviour. Despite the great advances done in the field over the last decades, understanding how individual interactions yield collective patterns of foraging, home range dynamics, site-fidelity prevalences, or trail formation remains a productive and open challenge [7–10]. This is particularly relevant when trying to assess the idea of a superorganism, that is, a much more coordinated and coherent type of collective motion performed by cognitively limited interactive agents that ensures the survival as a whole (the superorganism) but not necessarily at the individual level [11,12]. Hence, the interactions between individuals should satisfy selection pressures and adaptability at the collective R. Soc. Open Sci. 7: 201250 rather than the individual level. In such cases, it is crucial to characterize the system as a whole, with macroscopic parameters that can quantify the overall metabolic rate (energy) and the dynamics of the interactions at the superorganism level. Variation in these parameters may help us to understand the constraints and plasticity of self-organized behaviour under different selective pressures. Nowadays, current high-resolution tracking and visualization technologies allow us to quantify much better behaviour [13], and more specifically the complexity of behavioural interactions among agents, offering us the opportunity to account for the challenges posed by biology when characterizing multi- agent systems. So far, many studies of collective motion have focused on informed-naive or leader- follower relative positions and behavioural relationships [14]. As a result, an increasing amount of experimental work is disentangling pairwise interaction rules for particularly simple cases of group dynamics, as is the case of fish schooling [15,16] or locust swarms [17,18]. Within this context, statistical physics represents a very convenient framework that provides powerful toolsets to ecologists to understand the theoretical foundations of emerging phenomena [19,20]. Specifically, statistical physics focus on revealing the minimal rules or models that are required to yield specific macroscopic properties out of interactions among individual entities. Ecologists can compare such minimal requirements to real interactions within the population to provide more detailed species- or case-specific analysis. One additional advantage of statistical physics, given its abstract nature, is that it can be easily adapted for application at many different scales or levels. This is specially convenient when dealing with complex systems, which are known to possess relevant information at different scales. For example, spike patterns in neuronal systems can be studied either at the level of single neurons or rather meaningful regions can be grouped together or clustered to simplify the analysis [21,22]. Then, if microscopic details of interaction between the individual units (e.g. organisms) are not clear or available, alternative strategies can consist of studying patterns at other (still meaningful) levels. We propose in the present work to apply such strategy for the study of collective movement patterns in populations. Despite the technological and methodological advances stated earlier, characterization of interactions between organisms at a fine level of detail, for most ecological situations and/or species, is still not possible. So one can still wonder if alternative levels of information exist that can be used and explored instead to study such collective effects. Our hypothesis here is that collective and social organization within groups (and superorganisms, in particular) should reflect in a non-trivial spatial use and, as a result, in complex space occupancy patterns. Then using spatial sites (not organisms) as the main units of interest and applying statistical physics tools at that level would represent a meaningful way to elucidate the existence of such complexity. The main objective of our work thus is to present a new methodology for studying these occupancy patterns. As has been already done for the study of other complex systems as in neuronal activity patterns [21,22] or in social networks [23], we use for this purpose a spin-glass approach (so named because it was originally proposed within statistical mechanics as a model for understanding disordered glasses consisting of elementary spins/atoms). This is known to be the minimal model (from the point of view of entropy maximization principles), which can reproduce the dynamics of a system when it is to be described just in terms of pairwise correlations between their fundamental units [24]. As we will show, we use the existence of those correlations (in our case, correlations between occupancies at different spatial sites) as a proxy to identify the existence of socially planned (that is, superorganism-like) strategies in the spatial patterns. To facilitate understanding of our methodology, we will present in the following its theoretical grounds (§§2 and 3) and will also show how to apply it for a particular situation of interest (§§4–7). (a) space discretization (b) network (c) node binary signal 3 1 royalsocietypublishing.org/journal/rsos 2 2 Ii 1 occupied 0 1 1 4 4 2 1 1 0 0 empty 1 time 3 3 3 0 0 20 40 60 80 100 time (s) Figure 1. Illustrative scheme of our approach to collective space use. (a) The biologically relevant regions of the space are considered as (b) nodes of a network structure. (c) The presence or absence of individuals at node i for a given time t is then understood as a binary signal Ii (t) representing occupancy of that region (with Ii (t) = 1 if occupied, and Ii (t) = 0 if empty). R. Soc. Open Sci. 7: 201250 For the latter, the occupancy signals of a colony of ants in an artificial arena (specially suited to fit our approach) will be used. Note that social insects represent an optimal model to test our approach as they have been claimed to represent a paradigmatic case of superorganism behaviour [25,26]. Task allocation in social insects [27–29] is a good example of how adaptive superorganism-like strategies emerge from individual interactions within the group. Ants, in particular, use simple communication rules ( pheromone deposition and/or antennae contacts, basically) to adjust (i) recruitment efforts [30– 32], (ii) the structure and intensity of foraging trails as a function of the resources available [33,34], and/or (iii) the amount of cooperative transport [35]. The analysis of our experiment, then, is focused on providing evidences of superorganism-like behaviour in ants from the comparison between the spin-glass approach and the experimental occupancy patterns by the colony. Other potential uses of our approach, however, are discussed in Discussion section for the sake of completeness. 2. Spatial networks and collective occupancy patterns Because the goal of our work is to present a methodology to analyse how groups explore and exploit collectively different regions of space (e.g. food spots, habitats), it is first convenient to interpret each of those regions as interacting units embedded within a spatial network structure. Networks have been widely used in biology [36,37] at many different levels before: prey–predator interactions [38], extinction dynamics in food webs [39] or hierarchical organization in social animals [40,41] are just a few examples. For these, the network nodes can be identified as the different species inside the same ecosystem (this can be useful to study species or population survival and functioning within ecosystems) or as the individuals within a given group (when the aim is to understand connections in a hierarchical group). Within our approach, however, nodes represent biologically meaningful regions or sites in space. In figure 1a,b, we illustrate the idea that even for the case of relatively homogeneous landscapes, the environment can be always properly discretized or partitioned according to some case-specific criteria. We stress that such kind of discretization is convenient in many biological studies and can be exploited at different levels. This happens for example when using the concept of patches in fragmented habitats [42], but also in metapopulation theory (where a population is fragmented in several groups) [43,44], in the context of polydomy (where a colony is established across multiple nest sites) [45], or in theoretical approaches as cellular automatas [46], to name a few. To characterize occupancy at each node of the spatial network, we will assume that a time-discrete occupancy signal I(t) = {I1 (t), I2 (t), I3 (t), …, IN (t)} is available experimentally. Here, Ii (t) (with i = 1, 2, …, N) will be taken for simplicity as a binary variable that tells us simply if the node i is occupied (Ii (t) = 1) at time step t or not (Ii (t) = 0), with N the total number of nodes in the spatial network. We note that more complicated versions of the approach could be proposed by relaxing this two-state (empty/occupied) hypothesis, while we prefer to focus on this case here to keep the notation and analysis simple. The overall signal I(t) (figure 1c) then carries the information about the occupancy patterns for a group of organisms. If the individuals within that group behave independently, then occupancy patterns at each site, or node, will be independent of each other. On the contrary, one should expect that in a superorganism-like system (that is, for strongly organized groups exploring space according to some interaction rules and a global strategy) correlations between sites will emerge. Accordingly, a minimal model able to capture such possible correlations would be convenient. Furthermore, for 4 predictive purposes and subsequent testing, such an approach should be able not only just to identify the statistical properties of occupancy signals I(t) but also to: (i) generate new artificial realizations of royalsocietypublishing.org/journal/rsos those occupancy patterns; and (ii) be flexible and meaningful enough to allow for introducing variations in the model as a way to inquire or predict its behaviour under different conditions. In the following, we illustrate how spin-glass approaches can fulfil these requirements. 3. Spin-glass approach for occupancy dynamics Spin-glass models can be seen as a generalized version of the ubiquitous Ising model from statistical physics. While the Ising model was originally aimed at deriving macroscopic properties of magnetic systems from elementary pairwise interactions, it has been subsequently extended in many different ways. In particular, introducing randomly distributed intensities for pairwise interactions has become R. Soc. Open Sci. 7: 201250 a paradigm for frustrated systems, spin glasses being a recurrent example. This idea has also pervaded many other areas of research, including biology, up to the point that recent works [47] sustain that the physical foundations for the origin of complexity in biology can be outlined within that framework of frustrated systems and spin glasses. Following the usual formulation of Ising-like systems, we will consider N interacting units or spins (which in our context correspond to the sites within the spatial network structure) whose individual dynamics is described by a binary signal si (t), with si (t) = ±1, so the overall state S of the system is characterized by a specific realization of each, and it is S = {s1, …, si, …, sN}. The spins are assumed to interact through pairwise (both short and long range) interactions with intensities Jij and are subject to external fields of intensity hi, such that the resulting Hamiltonian for the spin glass reads X N X H(S) ¼  hi si  Jij si s j , (3:1) i¼1 i,j where the second sum extends over all possible pairs of spins in the system. As stated elsewhere (see, for example [24] for a comprehensive discussion), this Hamiltonian also admits an interpretation from information-theoretic grounds. In particular, it corresponds to the energy functional that minimizes redundancy (or, equivalently, maximizes informational entropy) for modelling the system, provided that the only information available are the time averages of the spins (it is, 〈si (t)〉) and their pairwise time correlations 〈si (t)sj (t)〉. For this reason, the spin-glass model is typically employed for assessing whether complex systems can be possibly characterized or not only through pairwise correlations. This idea has been already used, for example, to study the spike dynamics of different kinds of neuron groups [21]. The spike/silent periods characteristic of these systems can be mapped into a binary signal representing the activity of each neuron, such that activity patterns of a group of neurons then provide information about their functional response and connection patterns. Furthermore, in recent years, there has been a growing interest in exploring the applicability of the spin-glass approach to different biological and social systems, including social human and animal connections [22,23] or financial markets [48,49]. The use of those models to study spatial dynamics in biology, however, represents a novelty of the present work as far as we know. Without losing generality (and just for the sake of consistency with previous works on spin-glass models [21–23]), in the following, we will explore the statistics of occupancies Ii (t) (which take values 0 or 1) from that of spins si (t) by means of the mapping si (t) = 2Ii (t) − 1. So, given the experimental signal of node occupancies, we can then immediately find the corresponding states S and their probability distribution Pexp(S). Under equilibrium conditions, the spin-glass system is expected to satisfy a Boltzmann distribution, so 1 bH(S) P(S) ¼ e (3:2) Z must hold, where Z represents a normalization factor and β = 1 will be used from now on for the sake of simplicity. The inverse Ising approach [24] is the name given to the procedure that consists of determining the set of parameters hi and Jij in the spin-glass Hamiltonian (3.1) that provide the best fit between experimental signals and the equilibrium condition (3.2). Note that the model contains N parameters of type hi and N(N − 1) parameters of type Jij, for a total of N 2 parameters in the system. Then, as long as N is relatively large, such fitting procedure becomes extremely complex and requires the use of machine (a) (b) 5 nest 8 1 royalsocietypublishing.org/journal/rsos 7 2 8 1 7 2 6 5 3 6 3 4 5 4 R. Soc. Open Sci. 7: 201250 Figure 2. (a) Experimental set-up, labelling from 1 to 8 the nodes representing the endings of the tree structure. The black arrows indicate the plastic spirals where the food is laid. (b) Equivalent network representation of the experimental set-up, assuming every node can interact with any other. learning algorithms. In our particular case, we will use a Boltzmann machine [50] for this purpose, which is a stochastic variation of the deterministic Hopfield neural networks [51,52]. We use the Boltzmann machine to determine values for Jij and hi such that, when introduced into the spin-glass model (equation (3.1)), generate a simulated distribution Psim(S), which minimizes the statistical divergence with the experimental one (further details of the implementation of the algorithm are given in appendix B). We note that this procedure requires sampling the whole distribution of states and assessing their individual probabilities, so it is only computationally attainable when the number of nodes N is relatively low, as is the case of the example we will present in the following section (for which N = 8). When the network is formed by a large number of nodes, however, computational costs grow very fast. Alternative methods, based on partial approximations to the expected distribution, are then required; the reader is addressed to previous studies [21,23,24] for a deeper discussion on this topic. 4. Experimental set-up and data analysis To illustrate the application of the method presented in the previous section to a real situation, we carried out an experiment of ant foraging under laboratory conditions specifically designed to suit the spatial network approach in figure 1. We expect this experiment to provide a direct measure/evidence of superorganism-like behaviour in ants by a comparison between the spin-glass approach and the experimental occupancy signal exhibited by the colony (§5). We put a colony of around 100 workers of Aphaenogaster senilis (previously collected from the Campus of the Universitat Autònoma de Barcelona) in a plastic nest together with several eggs and larvae to keep them stimulated for working. The eggs and larvae were not renovated, but they were left to grow and become adult during the experiment; while this introduced some non-stationarity in experimental conditions, we note that the duration of the whole experiment (25 days) was relatively short compared with the time required for the ants to mature to the adult stage, so we expect that this bias had minimum effects on our results. The colony nest was connected to a tree structure (figure 2) by a plastic tube finalizing in eight different Petri dishes of 4 cm diameter. Each of these dishes (nodes) is then connected to a dead-end spiraling plastic tube, which is used as the resource area where food for the ants is laid (see figure 2). While such a ramified structure does not represent a very natural environment for foraging, we stress that such configuration provides an ideal opportunity to explore how the ant colony distributes their exploration resources (scouts) in a discrete network environment. In particular, the eight Petri dishes in the structure (which have different topological distances between them) will represent from now on the eight ‘nodes’ (see figure 2b) of our network, in analogy with figure 1. The implementation of the experiment consisted of daily trials of 90 min during 25 days (carried out in June and July 2018), which were recorded using a time-lapse camera at a frame rate of 1 Hz. During the 90 min of the trial, ants were allowed to explore the structure starting from the nest. Before each trial, the food was placed at some of the resource areas (dead-end spiraling tubes) departing from the eight nodes. Food consisted of single small mealworm pieces, so recruitment through pheromone was avoided regime A regime B 6 1 royalsocietypublishing.org/journal/rsos 2 3 node 4 5 6 7 8 5 10 15 20 25 time (days) Figure 3. Food dynamics in the network nodes during the 25 days of experiment. Black cells correspond to nodes where food was not present at that day, white regions correspond to nodes which contained food and it was picked up by the ants, and yellow cells correspond to nodes where the food was present but it was not picked up by the ants during the trial. The red line separates the regimes A and B used in our analysis. R. Soc. Open Sci. 7: 201250 (according to previous studies on the recruitment rules of A. senilis [53]) and foraging was expected to rely on memory and landmarks solely. At the end of the 90 min trial, we removed the remaining food in case the ants had not collected it. The overall quantity of food received by the colony according to this procedure (about three pieces of mealworm per day, in average) was enough to nourish the colony while still keeping it active for foraging. The resource areas containing food at each trial were decided according to probability rules (see figure 3). They were used as a control variable in order to evaluate the response of the colony to induced resource heterogeneity. So that, for days 1–13, half of the nodes had a high probability to contain food (50%), and the other half had a lower probability (25%), while in days 14–25, the probabilities were inverted (nodes with 50% probability turned to have 25%, and vice versa). Figure 3 shows the 25 day profile of the nodes where food was laid before the experiment, and this was the food collected by the ants. We expected to observe changes in the occupancy patterns of the network as a result of variations in the resource availability on the nodes from food regime A (days 1–13) to regime B (days 14–25). Although it was not possible from the experimental design to assign directly the changes observed in space occupancy pattern to the change in the resource distribution (owing to a mixture of effects present in the system, including memory and/or habituation effects), we simply intended to check if variations in the external conditions driving foraging could reflect into a change in the collective occupancy patterns, which we could observe through our spin-glass approach. So, despite not controlling the exact biological forces that may govern the behaviour at both regimes (A and B), we decided for convenience to analyse them separately to quantify their differences. For extracting the experimental data, we used our own video analysis code (implemented in the open- source software Scilab) to determine the presence or the absence of ants in each one of the eight nodes at each frame (as stated earlier, we considered a node i as occupied whenever one or more ants were detected at that node). After the processing of the videos, the complete dataset of 135 000 frames (which is available as the electronic supplementary material) was transformed into an occupancy binary signal I(t). So, every frame was characterized by a set of eight binary variables, for a total set of 28 = 256 possible states where the system can be found. We studied the daily profile of the average occupancy 〈I〉 (which corresponded to the occupancy at a given time averaged over the eight nodes) during the 90 min of experiment (i.e. 5400 s). From this we found that, as expected, the dynamics during food regimes A and B were significantly different (see figure 4a,b,and the corresponding caption). At the beginning of each daily trial, the ants were in the nest and it took some time before the nodes were visited for the first time. Then, the average occupancy during this transient period reads 〈I〉 = 0. After that period, there was a tendency for 〈I〉 to grow until it reached saturation in 20 or 30 min. If we split our analysis into those nodes where food had a higher (50%) or lower (25%) probability of being laid, we observe that for regime A the ants were clearly visiting the nodes with more food with a higher frequency (figure 4a). However, for regime B, the ants performed a seemingly homogeneous exploration of the nodes independently of the presence of food (figure 4b). If we instead split our analysis into nodes that actually have food or not, we recover very similar qualitative differences between the regimes (see appendix A). So, the differences detected are robust and independent of whether we use present-day food or past averages as a criteria for splitting nodes. (a) 0.8 (b) 0.8 7 0.7 high 0.7 high royalsocietypublishing.org/journal/rsos low low 0.6 0.6 0.5 0.5 ·I Òt 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000 time (s) time (s) (c) 1.0 (d) 1.0 R. Soc. Open Sci. 7: 201250 high high 0.8 low 0.8 low 0.6 0.6 ·IÒd 0.4 0.4 0.2 0.2 0 0 2 4 6 8 10 12 14 16 18 20 22 24 day day Figure 4. Averaged daily occupancy 〈I〉t for (a) regime A (hIiht ¼ 0:48; s 2I ¼ 0:012 and hIilt ¼ 0:34; s 2I ¼ 0:004) and (b) regime B (hIiht ¼ 0:57; s 2I ¼ 0:004 and hIilt ¼ 0:57; s 2I ¼ 0:006). Averaged occupancy split into nodes with high or low probability of containing food during (c) regime A and (d ) regime B. Differences between the two types of nodes are statistically significant (T − Student test) for the regime A (hIihd ¼ 0:48 and hIild ¼ 0:34; jTs j ¼ 4:70 . T95% ¼ 0:0002) but not for the case B (hIihd ¼ 0:57 and hIild ¼ 0:57; jTs j ¼ 0:11 , T95% ¼ 0:46). For the sake of completeness, we also show the daily average of the occupancy throughout the 25 days of the experiments (figure 4c,d). From that we reach again very similar conclusions. For regime A, the nodes with larger quantities of food showed higher occupancy, while for regime B, the colony performed a more homogeneous exploration, independent of the quantity of food. In any case, this daily average shows that the occupancy is highly fluctuating throughout the days. 5. Spin-glass approach to ant occupancy patterns during foraging We introduced the experimental dataset described in §4 into our machine learning algorithm for obtaining fitted values for the parameters hi and Jij through the inverse Ising approach mentioned in §3. Because in the experiments occupancy signals present a transient period until exploration of the space is possible for the ant colony (figure 4c,d), only the stationary part of the signal (period 2700s–5400 s) was used for the learning protocol. Learning procedures for regimes A and B are carried out separately to see how the differences observed in the space-use dynamics between both translate into our spin-glass approach. Because training is based on minimizing the difference between the probability distribution over the 256 possible states of the system and the probability distribution predicted from the spin-glass approach, before we carry out any subsequent analysis, we show that after the training process, the resulting spin-glass Hamiltonian is able to generate artificial occupancy signals (through Monte Carlo (MC) simulations) whose probability distribution is almost in perfect agreement with the experiments. Figure 5 provides this comparison and verifies that the agreement reached is excellent for both regimes A and B. 5.1. Time dynamics comparison Once the learning process has been satisfactorily completed, we run simulations to compare the properties of the occupancy signals produced by the model with the experimental ones. The agreement found at the level (a) (b) 8 0.07 0.07 0.06 exp exp royalsocietypublishing.org/journal/rsos SG 0.06 10–1 SG 0.05 0.05 10–1 10–2 P(SA) 0.04 0.04 10–2 10–3 0.03 0.03 10–3 10–4 0.02 50 100 150 200 250 0.02 10–4 50 100 150 200 250 0.01 0.01 0 0 50 100 150 200 250 50 100 150 200 250 SA SA Figure 5. Probability distribution of states (the x-axis contains the 28 = 256 possible states) for the experimental data and the spin- glass approach for (a) regime A and (b) regime B. The insets show the same probability distributions in the logarithmic scale. R. Soc. Open Sci. 7: 201250 For further details on the goodness of the model, see appendix B. of stationary probability distributions in figure 5 is to be expected by construction, but the spin-glass approach is not necessarily expected to reproduce the time dynamics of the experimental system beforehand. This is what we test in the following. We first fix the initial state in the MC simulations as I = 0 (or, equivalently, S = −1), corresponding to all nodes empty, for reproducing the initial conditions of the experimental trials, and we study the behaviour of the corresponding average occupancy 〈I〉 during the 90 min of the trial. On average, the simulations recover almost completely the 90 min temporal signal of the experimental data for both regimes (figure 6a,b, and corresponding caption). Furthermore, we also find that the fluctuations around this average, measured through the corresponding standard deviation σ among the different trials, are also very similar in all cases (figure 6c,d, and corresponding caption). The mean occupancy, when averaged over the whole time period of the trial for each node, also recovers the experimental pattern observed (figure 6e,f ). Note that carrying out all these comparisons requires introducing a time scale in the spin-glass dynamics, because in principle, the evolution from I = 0 to the stationary situation occurs through successive MC trials without any explicit time scale. For this, we used a rescaling in the signal from the MC simulations such that each simulation step is taken to correspond to 50 s (see appendix B for a further justification). To expand on this idea, we also measure the distribution of persistence times at single nodes, defined as the amount of time one node stays in the same state (either occupied or empty) before switching to the other. When we look at the corresponding distribution of persistence times P(τ) experimentally for the ants, we find it follows a non-trivial behaviour which corresponds to an intermediate decay between exponential and power-law functions (figure 7). Although it is not possible to derive an analytical expression for that distribution, we observe that the spin-glass approach yields again a very good agreement to the experimental data, both for regimes A (figure 7a) and B (figure 7b). Altogether, these results prove that the spin-glass approach is able to reproduce dynamical properties, as well as the stationary statistics, in the experimental conditions used. 6. Biological interpretation of the model parameters In some of the previous contexts where spin-glass approaches have been employed (including biology), the parameters hi and Jij of the characteristic Hamiltonian did not necessarily have a straightforward experimental interpretation because spins or units lived in an abstract phase space and could only be treated then as effective parameters. On the contrary, for the case of our experiment, we find that a relationship between the experimental data and these parameters becomes straightforward. The external field hi, for instance, should determine the propensity that organisms have to occupy the i node (i.e. the attraction towards node i) at an average level (equation (3.1)). When hi is large (small), provided that the other parameters remain unchanged, that node should have a tendency to be on average more (less) time occupied. The external field parameter hi should thus correlate with the average occupancy 〈Ii〉 of each node; this is confirmed by comparing the values of both magnitudes in both regimes considered (figure 8a). According to the previous result, the parameters hi capture the average node occupancy; this should be good enough as long as one is not concerned about collective effects in the system. The role of the (a) 1.0 (b) 1.0 9 experiment experiment royalsocietypublishing.org/journal/rsos 0.8 spin glass 0.8 spin glass null model null model 0.6 0.6 ·IÒt 0.4 0.4 0.2 0.2 0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000 time (s) time (s) (c) 0.40 (d) 0.40 R. Soc. Open Sci. 7: 201250 0.35 0.35 0.30 0.30 0.25 0.25 s 0.20 0.20 0.15 0.15 experiment experiment 0.10 0.10 spin glass spin glass 0.05 null model 0.05 null model 0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000 time (s) time (s) (e) 1.0 (f) 1.0 0.9 experiment 0.9 experiment spin glass spin glass 0.8 null model 0.8 null model 0.7 0.7 ·IÒc 0.6 0.6 0.5 0.5 0.4 0.4 0.3 0.3 0.2 0.2 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 node node Figure 6. Averaged daily occupancy dynamics 〈I〉t for the spin-glass approach (with and without pairwise interactions) and experimental data during (a) regime A and (b) regime B. The corresponding standard deviations are also shown for (c) regime A and (d ) regime B. Averaged occupancy in the stationary regime 〈I〉c for the spin-glass approach and experimental data during (e) regime A and ( f ) regime B. For more information of the relationship between the MC step and the real time, see appendix B. The deviation of 〈I〉c obtained from the models to the experimental one is computed from the variance of the departures from one to the other: (e) we find (s2SG ¼ 0:0004 and s2J¼0 ¼ 0:0065), and ( f ) (s2SG ¼ 0:0011 and s2J¼0 ¼ 0:0025). In both regimes, the spin-glass model shows smaller departures from the experiment than the null model. In addition, an analysis of variance (ANOVA) test with α = 0.05 for null differences with the experimental data leads to p-value = 0.80 (spin-glass) and p-value = 0.54 (null model) for regime A, and p-value = 0.96 (spin-glass) and p-value = 0.37 (null model) for regime B. interaction parameters Jij, however, is extremely relevant because they capture spatial correlations at a collective level (in particular, how likely is it that two separate nodes/spots are simultaneously occupied by the colony). To confirm this intuition, we compare the Jij parameters, obtained from the learning process, with pairwise correlations of the experimental occupancy signal 〈IiIj〉 ≡ Cij (figure 8b). We again find a high correlation between both magnitudes, so confirming our intuitive interpretation of the Jij parameters. The alignment between the model parameters hi and Jij, and the observables 〈Ii〉 and Cij are still found if computing average values separately for the nodes with high and low resource probability (figure 8). (a) 100 (b) 100 10 experiment experiment royalsocietypublishing.org/journal/rsos spin glass spin glass null model null model 10–1 10–1 P(t) 10–2 10–2 10–3 10–3 102 103 102 103 t (s) t (s) Figure 7. Probability distribution of switching times P(τ) during (a) regime A and (b) regime B. An ANOVA test with α = 0.05 for R. Soc. Open Sci. 7: 201250 null differences with the experimental data leads to p-value = 0.86 (spin-glass) and p-value = 0.04 (null model) for regime A, and p-value = 0.82 (spin-glass) and p-value = 0.09 (null model) for regime B. (a) (b) 0.16 0.6 regime A regime A 0.4 regime B 0.12 regime B learned Jij learned hi 0.2 0 0.08 –0.2 –0.4 0.04 –0.6 0 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0 0.1 0.2 0.3 ·IiÒ Cij Figure 8. (a) Averaged experimental occupancy for each node 〈Ii〉 in comparison to the learned external field hi. The correlation coefficients are C = 0.991 for the regime A dataset (orange) and C = 0.982 for the regime B dataset (blue). (b) Experimental correlation between the nodes i and j, Cij, in comparison to the learned pairwise interaction Jij. The correlation coefficients are C = 0.597 for the regime A dataset (orange), and C = 0.876 for the regime B dataset days (blue). Of note, the average occupancy per node 〈Ii〉 and the spatial correlations Cij, as well as the corresponding model parameters hi and Jij, are statistically different in nodes with high and low resources (food) only for the case of regime A, but it does not happen for regime B. This suggests (as explained in §4) either an habituation of the colony to the experimental set-up or a memory-delayed process for the colony to adjust the shift in high/low resourced nodes from regime A to regime B. Whatever the underlying biological process, in regime B, the ant colony shows a more homogeneous activity, with no differences in attraction and correlation patterns based on the amount of resources in the nodes (figure 9), something that our spin-glass approach can adequately capture. As a side note, the exact relationship between 〈Ii〉 and hi is actually influenced by the presence of the correlations Jij, too. In regime A, for instance, we observed lower occupancy intensities 〈Ii〉 compared to regime B, and larger differences between high and low resourced nodes (figure 9). In such contexts of low occupancy, correlations Jij tend to keep nodes unoccupied, so to obtain certain levels of occupancy in a node i, higher attraction forces (i.e. 〈hi〉) are necessary. This phenomena explains the higher level-off of regime A compared to regime B in the regression of figure 8a. In regime B, occupancy intensities are higher in general (figure 9a), and Jij then tends to keep the activity high in all nodes. Hence, to get certain level of activity in a given node i, a weak hi would be enough (level-off of the regression in regime B is smaller, see figure 8a). For example, an occupancy 〈I〉 = 0.5 in regime A would require hi ≈ 0.2, whereas for regime B external fields can be much smaller, e.g. hi ≈ −0.2 (figure 8a). Finally, one can also wonder about the effect that real topological distance between nodes may have on the Jij values, and whether there is an inverse correlation between both (so distant nodes show weaker interactions). Unfortunately, our results show that this is not the case in general. Because pairwise interactions can depend on several factors, distance by itself is not always a good predictor for them. (a) (b) 11 0.65 0.6 0.60 royalsocietypublishing.org/journal/rsos 0.4 0.55 0.2 0.50 ·hi Ò ·IiÒ 0.45 0 0.40 –0.2 0.35 –0.4 0.30 0.25 –0.6 high-A low-A high-B low-B high-A low-A high-B low-B (c) (d) 0.30 0.12 R. Soc. Open Sci. 7: 201250 0.25 0.10 0.20 0.08 ·CijÒ ·JijÒ 0.15 0.06 0.10 0.04 0.05 0.02 0 0 high-A low-A high-B low-B high-A low-A high-B low-B Figure 9. (a) Averaged experimental occupancy 〈Ii〉 for the different sets of nodes and experimental regimes A (T − Student test: jTs j ¼ 2:21 . T95% ¼ 0:06) and B (jTs j ¼ 0:23 , T95% ¼ 0:41). (b) Averaged field 〈hi〉 for the different sets of nodes and experimental regimes A (jTs j ¼ 2:82 . T95% ¼ 0:03) and B (jTs j ¼ 0:15 , T95% ¼ 0:44). (c) Averaged pairwise correlations 〈Cij〉 between the nodes of the same set in the experimental regimes A (jTs j ¼ 8:71 . T95% ¼ 0:00001) and B (jTs j ¼ 6:90 . T95% ¼ 0:00001). (d) Averaged pairwise interaction 〈Jij〉 between the nodes of the same set in the experimental regimes A (jTs j ¼ 3:83 . T95% ¼ 0:001) and B (jTs j ¼ 2:18 . T95% ¼ 0:03). High corresponds to the set of nodes with high probability of food presence, while low corresponds to the set of nodes with low probability. A corresponds to the experimental regimes from days 1 to 13 of the experiment, while B corresponds to the days 14 to 25. In particular, for regime A, such a relation holds well, but for regime B, this breaks down completely (see appendix C for details). 7. Relevance of pairwise correlations in the occupancy patterns We come back finally to the initial idea that led us to introduce our spin-glass approach. Our main objective is to check whether pairwise correlations between occupancies at different nodes are required to describe the overall occupancy dynamics. If so, then such correlations would indicate that some kind of global strategy is being used by the colony for exploring the arena and for distributing their foraging resources. On the contrary, if ants acted as individual foragers, then such correlations would be almost negligible or they would not have any significant effect on the occupancy pattern observed. The existence of non-zero correlations Cij between nodes (figure 8) tells us that some collective effects emerge in ant colony space use, but one may still wonder whether these correlations are key to reproduce the experimental data. To assess that idea, we compare the results obtained from our spin-glass approach to a null model in which all pairwise interactions Jij are set to zero. After imposing such conditions, our machine learning algorithm is run again and the values for hi are determined anew. Also, to make the comparison fair, we redefine the time step in the MC simulations for comparing the artificial occupancy signal (obtained from the null model) to the experimental one; by doing so, we find that when single time steps in the simulation correspond to 140 s, we obtain the best possible fit for the average global occupancy (figure 6a,b, green lines). However, even if such rescaling is used to force that the average occupancies of the null model fit the experimental ones, the other properties of the occupancy signal perform poorly in comparison to the general model. In particular, fluctuations in the overall occupancies (figure 6c,d, green lines), as well as characteristic switching times (figure 7, green 12 dots), depart very much from those observed in the experiment, contrary to what happens for the general royalsocietypublishing.org/journal/rsos model (see figure captions to find the statistical significance of these departures). In addition, it is evident that if Jij = 0 is imposed in the null model, then experimental correlations Cij found experimentally cannot be reproduced (for the sake of completeness, we show this in appendix D). All this together proves that the statistical patterns exhibited by the colony cannot be properly explained with the null model, giving support to the superorganism-like hypothesis. 8. Discussion Ant foraging represents a paradigmatic example of collective intelligence [25]. Nonetheless, measuring the amount of collective activity, cohesion, and plasticity employed by such superorganisms in different contexts requires adequate modelling at different levels of description, and some of them are R. Soc. Open Sci. 7: 201250 still unexplored. Here, we show that spin-glass models, when applied at the level of occupancy patterns in discretized media, can be used to describe the dynamics of multi-agent biological systems. Of note, this approach disregards the real behavioural details of individual interactions, the latter transformed into effective pairwise (spin-like) interactions among discrete regions (nodes) of a discretized landscape. This huge simplification accounts for rather simple assessment of the extent and type of superorganism-like behaviour with the experimental data. As we have shown, from these powerful mathematical frameworks [47] not only can we replicate the space occupancy patterns at the colony level but also we obtain simple macroscopic parameters with direct biological meaning. The biological interpretation of the parameters of the spin-glass Hamiltonian (h’s and J’s) correspond to the ant average attraction to a given spot and ant position correlations across space, respectively. More specific attraction (large h’s) means more activity efforts (which may be owing to recruitment or others) and larger metabolic rates expended by the superorganism (the ant colony as a whole) on a given spatially mapped task. Conversely, the larger the spatiotemporal correlations, the more likely that individuals are sharing information to perform the task, and the more cohesive is the response of the colony (large J’s). Also, having a biological interpretation for the parameters in the model offers the possibility to tune, or adjust, such parameters as a way to infer how the system could behave under different external conditions. To give some examples, we could hypothesize that having a smaller (larger) colony would result in smaller (larger) values for 〈I〉, and so we would expect the parameters hi to be modified accordingly. One could also predict that diminishing communication between individual ants would translate into smaller Jij values, and the corresponding occupancy patterns could be predicted accordingly. In short, our approach generates a replica of the system (in terms of occupancies) that we can use for testing the consequences of altering the experimental conditions. Actually, we plan to explore such ideas for ant colonies in a forthcoming publication, while this article has been focused on presenting the approach for a particularly simple case of study. Regarding the experiment used here, one might speculate that the two regimes (A and B) observed in the colony represent different organization within the superorganism dynamics when external conditions are modified (although this idea would require extra work for confirmation). In regime A, the overall activity of the colony was lower, but clearly distinct behaviour appeared in nodes with high and low resource probabilities. Attractive forces to highly resourced nodes were larger compared to low resourced nodes. High resourced nodes also showed more amplified occupancy correlations among them than low resourced nodes. This suggests a good spatial mapping with resource dynamics and a tightly cohesive behaviour as expected for a superorganism. On the contrary, in regime B, the overall activity was much higher, and the attractive forces to both types of nodes (i.e. high and low resourced) were homogeneous, suggesting a ‘relaxation’ of the superorganism-like behaviour, which despite showing spatial coherence (i.e. positive spatial correlations) did not map resource patterns as tightly as in regime A. Given that our system was pretty small and all nodes were easily accessible, we did not find remarkable differences in foraging success (figure 3). Nonetheless, at larger spatiotemporal scales, such differences may result in measurable and relevant foraging success differences. Finally, a direct extension of our analysis to experiments under more natural conditions is straightforward provided that a meaningful habitat partitioning is introduced. One could study, for example, the overall degree of motivation, the attraction associated to given spots and the amount of spatial organization among different tasks performed by a single colony or among different colonies or species. After an appropriate implementation of the learning algorithm, the model should consistently reproduce the stationary and dynamical properties of the occupancy patterns. This remains to be tested, as well as whether the continuum from simpler to superorganism-like strategies 13 could also be identified in larger and complex domains, closer to field conditions. These appealing royalsocietypublishing.org/journal/rsos ideas will be the basis of future research. Data accessibility. Data is included as the electronic supplementary material. Authors’ contributions. J.C., F.B., V.M. and D.C. conceived and designed the study. D.C. carried out the experiment. J.C. performed the numerical simulations. J.C., F.B., V.M. and D.C. carried out the mathematical analysis. J.C., F.B, V.M. and D.C. wrote and reviewed the paper. All authors gave final approval for publication and agree to be held accountable for the work performed therein. Competing interests. We declare we have no competing interests. Funding. This research has been supported by the Spanish government through grants no. CGL2016-78156-C2-2-R ( J.C, D.C and V.M), FIS2015-72434-EXP ( J.C, D.C and V.M) and CGL2016-78156-C2-1-R (F.B.) Acknowledgements. We thank Xavier Espadaler for help with the experimental work. R. Soc. Open Sci. 7: 201250 Appendix A. Analysis of node separation by food resources The analysis of occupancies in §4 has been done by separating the nodes in two different groups: those with high, or low probability of having food resources (either for regime A or regime B). However, we have also studied a different grouping that is biologically meaningful: the actual (or not) presence of food. In figure 10, we show that different classification for the nodes produces qualitatively the same behaviour shown in figure 4. We believe the high/low probability node classification is a good mechanism, so we have followed it during this work, because it has the advantage that we can always average over the same number of nodes. Appendix B. Simulation details As we mentioned in §3, a Boltzmann machine algorithm [50] is used for implementing the learning process in the spin-glass approach that leads to a determination of the fittest parameters hi and Jij. This involves the use of a gradient descent method in combination with MC simulations. We start from a random set of parameters hi and Jij. At each MC step, a shift in one parameter (randomly chosen among all the Jij and hi) is proposed. After that, we run the MC simulations with the new set of parameters to generate a new simulated distribution of states, Psim(S). If the new distribution improves the fit to the experimental distribution Pexp(S), the shift in the parameter is accepted. To quantify the goodness of the fit between the simulated and the experimental distribution, we use the Kullback–Leibler divergence [54] between Psim(S) and Pexp(S). If the new simulated distribution of states (after the shift) minimizes the Kullback–Leibler divergence, the shift in the randomly chosen parameter is accepted. We have performed training simulations of 106 shift trials. We have seen all the training processes exhibit a stabilized Kullback–Leibler divergence before the end of the simulation. The parameters Jij and hi at the last are chosen as the fittest parameters in the model. One aspect to remark on is the definition of a timescale in the MC simulations and how it is related to real time. This is necessary to establish a comparison between the time evolution of the experimental results and the ones by the model (MC simulations). By using as a criteria that the relaxation of the system towards its stationary state in the simulations should fit the experimental curve (figure 6) when starting from the state I = 0, we conclude that a proper rescaling of the MC results consists of imposing that one step in the MC simulation corresponds to 50 s. That value is obtained elsewhere in the article for rescaling the results from the spin-glass model. The same criterion has been also applied for the null model presented in §7, and in this case, the rescaling that provides the best fit in figure 6 corresponds to 140 s for each step of the MC simulation. Consequently, the equivalence between the real time and the rescaled time for simulations is determined just by a parameter that shifts the relaxation to the stationary state, but does not affect the stationary dynamics in the system. Appendix C. Analysis of Jij by distance As we have stated in 7, the averaged values of the pairwise interaction for both nodes with high and low probability of food resources are different between regimes A and B (figure 9d). As a complementary study, we here analyse the value of the pairwise interactions between nodes by distance (figure 11) measured as the number of tree bifurcations between the nodes. For regime A, the highest Jij value (a) 0.8 (b) 0.8 14 0.7 food 0.7 food royalsocietypublishing.org/journal/rsos no food no food 0.6 0.6 0.5 0.5 ·IÒt 0.4 0.4 0.3 0.3 0.2 0.2 0.1 0.1 0 0 0 1000 2000 3000 4000 5000 0 1000 2000 3000 4000 5000 time (s) time (s) Figure 10. Averaged daily occupancy 〈I〉t for those nodes where food is present (red) or not (blue), for (a) regime A and (b) regime B. Comparison of stationary (2700–5400 s period) values leads to (hIitf ¼ 0:50 and hIinft ¼ 0:34) for the case in (a), showing R. Soc. Open Sci. 7: 201250 significant departures, while for case in (b) we find (hIitf ¼ 0:60 and hIinft ¼ 0:55), much less difference is obtained. 0.10 0.09 0.08 0.07 ·Jij Ò 0.06 0.05 regime A 0.04 regime B 0.03 1 2 3 distance Figure 11. Averaged pairwise interactions (Jij ) between the nodes i and j by distance for regimes A and B. (a) 0.4 (b) 0.4 null model null model 0.3 spin glass 0.3 spin glass 0.2 0.2 (Cij)sim (Cij)sim 0.1 0.1 0 0 –0.1 –0.1 0 0.1 0.2 0.3 0 0.1 0.2 0.3 (Cij)exp (Cij)exp Figure 12. Experimental correlation between the nodes i and j (Cij )exp in comparison to virtual correlations obtained from MC simulations (Cij )sim, for (a) regime A and (b) regime B. corresponds to the largest distance (3 bifurcations). There is an interplay in the pairwise interaction between the distance and the food resources (see also figure 9d). In average, the distance does not have a strong effect in the Jij. However, the behaviour of regime B is completely different. While the resources probability seems to have a smaller effect, the distance plays the key role in the value of the pairwise interactions (figure 11). According to this, simplified versions of the spin-glass model in which pairwise interactions (Jij values) were grouped in terms of distance would be uneffective to reproduce the patterns of all regimes. Appendix D. Correlations for the null model As we have seen in §5, it is useful to compare the results from the general spin-glass approach to those of a null model where pairwise interactions are removed. To complete the discussion given in §7 regarding this, we also provide in figure 12 additional evidence of how the model without interactions loses its 15 capacity to reproduce the time correlations in the system (equation (D 1)). For the general model with royalsocietypublishing.org/journal/rsos interactions, the (Cij )exp and (Cij )sim exhibit the same tendency. Instead, the correlations in the null model are all close to 0 owing to the removal of interactions between sites; so this model is not able to resemble the experimental correlations. This, again, proves the need for pairwise interactions for describing the system, so supporting the idea that spatial organization in the ant colony is guided by collective criteria/strategies: P t (Ii (t)  hIi it )(I j (t)  hI j it ) Cij ¼ qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi P ffi: (D 1) 2P 2 t (I i (t)  hI i it ) t (I j (t)  hI j it ) References R. Soc. Open Sci. 7: 201250 1. Volfson D, Cookson S, Hasty J, Tsimring LS. 2009 Drosophila chemotaxis. Nat. Commun. 2, 441. 26. Solé R, Bascomte J. 2006 Self-organization in Biomechanical ordering of dense cell (doi:10.1038/ncomms1455) complex ecosystems. Princeton, NJ: Princeton populations. Proc. Natl Acad. Sci. USA 105, 14. Couzin ID, Krause J, Franks NR, Levin SA. 2005 University Press. 15 346–15 351. (doi:10.1073/pnas.0706805105) Effective leadership and decision-making in 27. Pacala SW, Gordon DM, Godfray HCJ. 1996 2. Darnton NC, Turner L, Rojevsky S, Berg HC. animal groups on the move. Nature 433, Effects of social group size on information 2010 Dynamics of bacterial swarming. Biophys. J. 513–516. (doi:10.1038/nature03236) transfer and task allocation. Evol. Ecol. 10, 98, 2082–2090. (doi:10.1016/j.bpj.2010.01.053) 15. Gautrais J, Jost C, Theraulaz G. 2008 Key 127–165. (doi:10.1007/BF01241782) 3. Ballerini M et al. 2008 Empirical investigation of behavioural factors in a self-organised fish 28. Seeley TD. 1989 Social foraging in honey bees: starling flocks: a benchmark study in collective school model. Ann. Zool. Fennici. 45, 415–428. how nectar foragers assess their colony’s animal behaviour. Anim. Behav. 76, 201–215. (doi:10.5735/086.045.0505) nutritional status. Behav. Ecol. Sociobiol. 24, (doi:10.1016/j.anbehav.2008.02.004) 16. Filella A, Nadal F, Sire C, Kanso E, Eloy C. 2018 181–199. (doi:10.1007/BF00292101) 4. Michael Davis J. 1980 The coordinated Model of collective fish behaviour with 29. Gordon DM. 1999 Interaction patterns and task aerobatics of dunlin flocks. Anim. Behav. 28, hydrodynamic interactions. Phys. Rev. Lett. 120, allocation in ant colonies. In Information 668–673. (doi:10.1016/S0003-3472(80)80127-8) 198101. (doi:10.1103/PhysRevLett.120.198101) processing in social insects (eds C Detrain, JL 5. Helbing D, Buzna L, Johansson A, Werner T. 17. Ariel G, Ayali A. 2015 Locust collective motion Deneubourg, JM Pasteels), pp. 51–68. Basel, 2005 Self-organized pedestrian crowd dynamics: and its modeling. PLoS Comput. Biol. 11, Switzerland: Birkhäuser. experiments, simulations, and design e1004522. (doi:10.1371/journal.pcbi.1004522) 30. Jaffe K, Howse PE. 1979 The mass recruitment solutions. Transp. Sci. 39, 1–24. (doi:10.1287/ 18. Buhl J, Sumpter DJ, Couzin ID, Hale JJ, Despland system of the leaf cutting ant, Atta cephalotes. trsc.1040.0108) E, Miller ER, Simpson SJ. 2006 From disorder to Anim. Behav. 27, 930–939. (doi:10.1016/0003- 6. Lazer D et al. 2009 Computational social order in marching locusts. Science 312, 3472(79)90031-9) science. Science 323, 721–723. (doi:10.1126/ 1402–1406. (doi:10.1126/science.1125142) 31. Nicolis SC, Deneubourg JL. 1999 Emerging science.1167742) 19. Sumpter DJT. 2010 Collective animal behaviour. patterns and food recruitment in ants: an 7. Couzin ID, Franks NR. 2003 Self-organized lane Princeton, NJ: Princeton University Press. analytical study. J. Theor. Biol. 198, 575–592. formation and optimized traffic flow in army 20. Mendéz V, Campos D, Bartumeus F. 2014 (doi:10.1006/jtbi.1999.0934) ants. Proc. R. Soc. B 270, 139–146. (doi:10. Stochastic foundations in movement ecology. 32. Attygalle AB, Morgan ED. 1985 Ant trail 1098/rspb.2002.2210) Berlin/Heidelberg, Germany: Springer Series in pheromones. Adv. Insect Phys. 18, 1–30. 8. Potts JR, Harris S, Giuggioli L. 2012 Territorial Synergetics. 33. Fourcassié V, Dussutour A, Deneubourg J. 2010 dynamics and stable home range formation for 21. Tkačik G, Marre O, Amodei D, Schneidman E, Ant traffic rules. J. Exp. Biol. 213, 2357–2363. central place foragers. PLoS ONE 7, e34033. Bialek W, Berry II MJ. 2014 Searching for (doi:10.1242/jeb.031237) (doi:10.1371/journal.pone.0034033) collective behaviour in a large network of 34. Couzin ID, Franks NR. 2003 Self-organized lane 9. Campos D, Bartumeus F, Méndez V, Andrade JS sensory neurons. PLOS Comput. Biol. 10, formation and optimized traffic flow in army Jr, Espadaler X. 2016 Variability in individual e1003408. (doi:10.1371/journal.pcbi.1003408) ants. Proc. Biol. Sci. 270, 139–146. (doi:10. activity bursts improves ant foraging success. 22. Bialek W, Cavagna A, Giardina I, Mora T, Pohl O, 1098/rspb.2002.2210) J. R. Soc. Interface 13, 20160856. (doi:10.1098/ Silvestri E, Viale M, Walczak AM. 2014 Social 35. Feinerman O, Pinkoviezky I, Gelblum A, Fonio E, rsif.2016.0856) interactions dominate speed control in poising Gov NS. 2018 The physics of cooperative 10. Campos D, Bartumeus F, Méndez V, Espadaler X. natural flocks near criticality. Proc. Natl Acad. transport in groups of ants. Nat. Phys. 14, 2013 Reorientation patterns in central place Sci. USA 110, 7212–7217. (doi:10.1073/pnas. 683–693. (doi:10.1038/s41567-018-0107-y) foraging: internal clocks and klinokinesis. 1324045111) 36. Bascompte J. 2009 Disentangling the web of J. R. Soc. Interface 11, 20130859. (doi:10.1098/ 23. Lynn CW, Papadopulos L, Lee DD, Bassett DS. life. Science 325, 416–419. (doi:10.1126/ rsif.2013.0859) 2019 Surges of collective human activity science.1170749) 11. Sasaki T, Pratt SC. 2018 The psychology of emerge from simple pairwise correlations. Phys. 37. Krause J, Lusseau D, James R. 2009 Animal social superorganisms: collective decision making by Rev. X 9, 011022. (doi:10.1103/PhysRevX.9. networks: an introduction. Behav. Ecol. Soc. 63, insect societies. Annu. Rev. Ento. 63, 259–275. 011022) 967–973. (doi:10.1007/s00265-009-0747-0) (doi:10.1146/annurev-ento-020117-043249) 24. Nguyen HC, Zecchina R, Berg J. 2017 Inverse 38. Allesina S, Pascual M. 2008 Network structure, 12. Straub L, Williams GR, Pettis J, Fries I, Neumann statistical problems: from the inverse Ising predator–prey modules, and stability in large P. 2015 Superorganism resilience: eusociality problem to data science. Adv. Phys. 66, food webs. Theor. Ecol. 1, 55–64. (doi:10.1007/ and susceptibility of ecosystem service providing 197–261. (doi:10.1080/00018732.2017. s12080-007-0007-8) insects to stressors. Curr. Opin. Insect Sci. 12, 1341604) 39. Solé RV, Montoya JM. 2001 Complexity 109–112. (doi:10.1016/j.cois.2015.10.010) 25. Gordon DM. 2010 Ant encounters: interaction and fragility in ecological networks. Proc. R. 13. Gomez-Marin A, Stevens GJ, Louis M. 2011 networks and colony behaviour. Princeton, NJ: Soc. B 268, 2039–2045. (doi:10.1098/rspb. Active sampling and decision making in Princeton University Press. 2001.1767) 40. Pinter-Wollman N et al. 2013 The dynamics of 45. Robinson EJH. 2014 Polydomy: the organisation 50. Ackley DH, Hinton GE, Sejnowski TJ. 1985 A learning 16 animal social networks: analytical, conceptual, and adaptive function of complex nest systems algorithm for Boltzmann machines. Cogn. Sci. 9, and theoretical advances. Behav. Ecol. 25, in ants. Curr. Opin. Insect Sci. 5, 37–43. (doi:10. 147–169. (doi:10.1207/s15516709cog0901_7) royalsocietypublishing.org/journal/rsos 242–255. (doi:10.1093/beheco/art047) 1016/j.cois.2014.09.002) 51. Hopfield JJ. 1982 Neural networks and physical 41. Farine DR, Whitehead H. 2015 Constructing, 46. Green DG. 1990 Cellular automata models in systems with emergent collective computational conducting and interpreting animal social biology. Math. Comput. Model. 13, 69–74. abilities. Proc. Natl Acad. Sci. USA 79, network analysis. J. Anim. Ecol. 84, 1144–1163. (doi:10.1016/0895-7177(90)90010-K) 2554–2558. (doi:10.1073/pnas.79.8.2554) (doi:10.1111/1365-2656.12418) 47. Wolf YI, Katsnelson MI, Koonin EV. 2018 52. Barra A, Bernacchi A, Santucci E, Contucci P. 42. Andersson abd O. Bodin E. 2009 Practical tool Physical foundations of biological complexity. 2012 On the equivalence of Hopfield networks for landscape planning? An empirical Proc. Natl Acad. Sci. USA 115, E8678–E8687. and Boltzmann machines. Neural Netw. 34, investigation of network based models of (doi:10.1073/pnas.1807890115) 1–9. (doi:10.1016/j.neunet.2012.06.003) habitat fragmentation. Ecography 32, 48. Bury T. 2013 Market structure explained 53. Cerdá X, Angulo E, Boulay R, Renoir A. 2009 123–132. (doi:10.1111/j.1600-0587.2008. by pairwise interactions. Physica A 392, Individual and collective foraging decisions: a field 05435.x) 1375–1385. (doi:10.1016/j.physa.2012. study of worker recruitment in the gipsy ant 43. Hanski I. 1998 Metapopulation dynamics. 10.046) Aphaenogaster senilis. Behav. Ecol. Sociobiol. 63, Nature 396, 41–49. (doi:10.1038/23876) 49. Borysov SS, Roudi Y, Balatsky AV. 2015 U.S. stock 551–562. (doi:10.1007/s00265-008-0690-5) 44. Levins R. 1969 Some demographic and genetic market interaction network as learned by the 54. Kullback S, Leibler RA. 1951 On information and R. Soc. Open Sci. 7: 201250 consequences of environmental heterogeneity for Boltzmann machine. Eur. Phys. J. B 88, 321. sufficiency. Ann. Math. Stat. 22, 79–86. (doi:10. biological control. Entomol. Soc. Am. 15, 237–240. (doi:10.1140/epjb/e2015-60282-3) 1214/aoms/1177729694)