## Abstract

Local interactions, when individuals meet, can regulate collective behaviour. In a system without any central control, the rate of interaction may depend simply on how the individuals move around. But interactions could in turn influence movement; individuals might seek out interactions, or their movement in response to interaction could influence further interaction rates. We develop a general framework to address these questions, using collision theory to establish a baseline expected rate of interaction based on proximity. We test the models using data from harvester ant colonies. A colony uses feedback from interactions inside the nest to regulate foraging activity. Potential foragers leave the nest in response to interactions with returning foragers with food. The time series of interactions and local density of ants show how density hotspots lead to interactions that are clustered in time. A correlated random walk null model describes the mixing of potential and returning foragers. A model from collision theory relates walking speed and spatial proximity with the probability of interaction. The results demonstrate that although ants do not mix homogeneously, trends in interaction patterns can be explained simply by the walking speed and local density of surrounding ants.

## 1. Introduction

Collective behaviour arises from interactions among individuals, and these interactions often occur locally. The probability of interaction thus depends on spatial patterns of movement, while, in turn, the pattern of movement may be influenced by interactions [1], and on variation among individuals in their use of space [2,3]. A central question is how the movements of individuals, and constraints from the local environment, shape the local interactions that lead to collective behaviour.

The relation between motion patterns of particles and the probability of interaction is described by the scattering cross section in gas dynamics, spectroscopy and particle physics [4]. This specifies the probability that two nearby particles interact in a collision, which alters the motion and/or energy of the particles. For example, two high-energy particles may interact in an inelastic collision that results in a new particle [5]. In a mixture of gas particles, collision frequency increases with both the speed of the particles and the density of the mixture [6].

Similarly, spatial patterns of movement influence the probability of interactions in living systems, from bacterial aggregations, in which quorum sensing depends on chemical cues associated with local density [7,8], to human online social networks [9], workplace interactions [10], and the votes of legislators [11]. In animal groups, spatial proximity influences the spread of innovative foraging strategies [12], vocal communication [13] and fission–fusion group dynamics [14]. Proximity in turn may be determined by social attraction and preferential associations, or simply clustered resources [15,16]. For simple interactions such as an alarm signal [17], proximity strongly determines the probability of interaction. However, some animals preferentially form stable associations with certain others, for example in the grooming interactions of baboons, that influence the probability that particular individuals interact [18–20].

In ant colonies, local interactions lead to collective behaviour and decentralized decision-making [21]. Because ants interact locally, how they move around determines the rate of encounter [22]. Ants adjust their movement depending on the density of ants in the surrounding area [23–25]. Local interactions among ants are olfactory, such as the detection by one ant of a pheromone recently deposited by another [26] or brief antennal contact [21]. During an antennal contact one ant detects the other ant's cuticular hydrocarbon profile; such profiles differ among colonies and among task groups within a colony [27]. Workers engaged in different tasks organize spatially in different areas of the nest [28]. Ant nests are diverse in structure [29–31]. The spatial configuration of the nest [32,33] and the spatial organization of task groups affects the rates at which ants interact [34], so that nest structure influences colony behaviour [35]. Changes in nest structure as a colony develops may further influence colony behaviour [21,36,37].

Here we examine how spatial patterns of movement determine the interaction patterns that regulate foraging activity in the harvester ant, *Pogonomyrmex barbatus*. Whether a forager waiting inside the nest, here called a ‘potential forager’, leaves on its next foraging trip depends on its interactions with returning foragers [38]. Foragers with food return to the nest and enter an entrance chamber just inside the nest entrance, where they deposit the seeds they have collected. Potential foragers come into the entrance chamber from tunnels leading from the deeper nest. After some time in the entrance chamber, where they interact with returning foragers, they either leave the nest to forage, or return to the deeper nest. Previous work shows that potential foragers that leave the nest to forage have more interactions with returning foragers than those that leave the nest to forage [39–41].

We use models from statistical mechanics to examine how the spatial patterns of movement determine the probability of interaction of returning and outgoing harvester ant foragers inside the nest. Our analysis is based on data from observations of returning and outgoing foragers inside nests of freely foraging colonies of *P. barbatus* in the field [41]. Laboratory and field studies show that harvester ants form interaction hotspots with a high local density of ants in the entrance chamber or its analogue in a laboratory nest [40,42]. We first examine the temporal autocorrelation of the time series of interactions and the average density of surrounding ants to ask how an ant's experience of interactions is structured in time. If ants mix homogeneously and have a constant relationship between proximity and interaction, then interactions are described by a Poisson process with a flat autocorrelation function. If engaging in an interaction leads an ant to seek future interactions, then the interaction autocorrelation function will be peaked near zero. However, a heterogeneous ant density will also lead to a peak in the interaction autocorrelation by causing interactions to be clustered in time. By comparing the interaction autocorrelation with the interaction-triggered density average, we ask whether an ant's experience deviates from a constant rate Poisson process. We then examine whether this is this due to facilitation, when an ant that has an interaction seeks another, or to density hotspots.

Next we ask whether returning and potential foragers mix homogeneously in the entrance chamber, or instead differ in their use of space. We use a correlated random walk model to ask whether the observed heterogeneity in density can be explained by the different starting locations of returning and potential foragers.

We then use collision theory to formalize the relationship between walking speed, ant density and interaction, and derive two models with increasing complexity: (i) a random mixture model, assuming homogeneous mixing in the entrance chamber, and (ii) a local density model, in which the probability of interaction depends on walking speed and local density of surrounding ants. The local density model is conceptually similar to a proximity network [20], which assumes that animals interact when in close proximity. We use the local density model to distinguish among several possibilities for what determines the probability that returning and potential foragers interact:

(1) Returning foragers (RFs) and potential foragers (PFs) preferentially interact with each other. If true, then observed interaction rates would be higher than the local density model's predictions, because RF–PF interactions are more likely than RF- or PF interactions with other ants. The local density model assumes all ants have the same relationship between spatial proximity and the probability of interaction.

(2) Returning foragers and potential foragers preferentially avoid interactions with each other. This is the opposite of (1), and would lead to observed interaction rates that are lower than local density model predictions.

(3) When potential foragers become excited and prepare to leave the nest to forage, they seek interactions with returning foragers, and avoid interactions with other potential foragers. If this were true, potential foragers that leave the nest to forage (‘PF-leave’) would have a higher probability of interaction than potential foragers that returned to the deeper nest (‘PF-return’). In this case, the local density model, which uses the same relationship between density and the probability of interaction for all ants, would underestimate the interaction rates of PF-leave.

(4) There is individual variability in walking speed, but no systematic differences between potential foragers that leave the nest to forage, and those that return to the deeper nest, in the relationship between density and interaction rates with returning foragers.

## 2. Methods

### 2.1. Field experiments and video tracking

We used data on the movement and interactions of harvester ants in the entrance chamber of actively foraging colonies, from observations from videos made in the field inside partially excavated nests [41]. Interactions of potential foragers with returning foragers take place inside the nest entrance chamber, and tunnels lead from this chamber to the deeper nest. Films of the entrance chamber were made by removing the top layer of soil above the entrance chamber and placing a transparent piece of glass over it to maintain humidity [39–41].

We manually tracked the trajectories and interactions of approximately 1200 foragers in the entrance chamber during a tracking period of 60–180 s for each observation. An interaction was considered to occur when the ant's head came within one head width of another ant; this is about the length of the antennae in this species. Figure 1 shows the entrance chamber for each colony, and all the trajectories and interactions that were tracked during this period.

We categorized each ant as either a returning or potential forager according to the place where its trajectory began. Returning foragers came back into the entrance chamber from outside the nest, while potential foragers came into the entrance chamber from one of the tunnels leading from the deeper nest. Once inside the entrance chamber, both returning foragers and potential foragers exited after a short time (ca. 10–30 s). Each was classified as taking one of two actions: leave the nest to forage, or return to the deeper nest through a tunnel [41]. For ants that were in the entrance chamber when the tracking period began, we identified their start location from earlier video to classify them as returning or potential foragers. Further details on methods are included in electronic supplemental material, as well as in [39–41].

### 2.2. Density hotspots and the temporal sequence of interactions

The temporal autocorrelation of the time series of interactions was calculated for all tracked ants in each observation. This calculation uses a window time of *τ* and selects interactions for each focal ant that occur up to *τ* seconds before or *τ* seconds after a given interaction. Interactions that occurred within the first or last *τ* seconds of a focal ant's trajectory were not included in the average. We then binned these counts of interactions, neglecting each count at *t* = 0, to obtain an autocorrelation of interaction rate. The window time of *τ* = 4 s was used for the results in the text.

The temporal autocorrelation was compared with the average density of ants surrounding a focal ant in the time before and after each interaction. To do this, we smoothed the locations of ants to form a density function. Each ant was represented as a 2D Gaussian function centred at the (*x*, *y*) coordinates of its current location and a standard deviation *σ* = 2*d*_{ant}, where *d*_{ant} is the size of an ant in a colony video observation. This representation blurs an ant over an area larger than its actual size, and thus enables a measure of the local density of other ants near a given focal ant. To facilitate calculations, the 2D Gaussian was approximated by three concentric circles of radii *σ*, 2*σ* and 3*σ*, each given weights of *cg*_{1}, *cg*_{2} and *cg*_{3}, respectively. The values *g*_{1} = 0.683, *g*_{2} = 0.272 and *g*_{3} = 0.043 are calculated from the Gaussian probability distribution, and the constant *c* ensures normalization via . Figure 2*a* shows an example of this representation of a single ant. Figure 2*b* shows an example of the time-dependent density function for all ants, *ρ _{D}*(

*x*,

*y*,

*t*), at a particular instant in time.

For a focal ant *i* with trajectory coordinates (*x _{i}*(

*t*),

*y*(

_{i}*t*)), the density of all other ants is , where the correction factor subtracts the focal ant's own contribution to density. This corrected density value was used to calculate an average density in the time range surrounding an interaction at

*t*

_{int}. Interactions of all tracked ants, other than those that occurred within the first

*τ*seconds or the last

*τ*seconds of a focal ant's trajectory, were used to trigger the density average. To plot the average density along with the temporal autocorrelation on the time series of interactions, a normalization factor was used: where

*N*is the number of interactions of ant

_{i}*i*, and the sums include all tracked ants. Using

*c*

_{D}for normalization, the normalized density

*c*

_{D}

*ρ*

_{D}has units of interaction rate and was plotted alongside the temporal autocorrelation.

An additional comparison was made with the expected flat autocorrelation function from a Poisson process, where the average rate was defined as the overall average rate of interaction observed in each colony.

### 2.3. Density and mixing of potential and returning foragers

We first compared the walking speeds and densities of returning and potential foragers in the entrance chamber. Next we examined the effect of different start locations for returning foragers, who come into the entrance chamber from outside the nest, and for potential foragers, who come into the entrance chamber from a tunnel from the deeper nest. Using a null motion model, we considered whether heterogeneity of density and the existence of density hotspots in the entrance chamber could arise from the different starting locations of returning and potential foragers.

#### 2.3.1. Walking speed of returning and potential foragers

Speed was calculated for each ant by finding the difference between successive tracked location points, smoothing these differences with a Gaussian kernel with a radius of 10 time steps, and then taking the average over the trajectory of an individual ant *i* to obtain its average walking speed . Let the notation denote an average for ants in group *G*. Only ants with completed trajectories, that both entered and exited the entrance chamber during the focus tracking period, were included in the group averages. We used a permutation test to ask if there was a significant difference between average group speeds for returning foragers, , and potential foragers, , for each colony observation.

#### 2.3.2. Differences in density of returning and potential foragers

We asked if returning and potential foragers differ in their spatial organization in the entrance chamber by comparing the local density of returning and potential foragers surrounding each ant. To do this, we formed density functions using the trajectories of all tracked returning and potential foragers. Each individual ant's position was smoothed into a density function using the representation shown in figure 2*a*. We denote the density function for all returning foragers as , and for all potential foragers . An example of these density functions at a particular instant in time is shown in figure 3.

Consider an ant *i* with time-dependent trajectory coordinates (*x _{i}*(

*t*),

*y*(

_{i}*t*)), trajectory start time , and trajectory end time . For this ant, the average density difference between surrounding returning foragers and potential foragers over the course of its trajectory is calculated as where the

*δ*-functions act to remove the focal ant from the associated density function. A permutation test was used to test for significance between average group density differences and for each colony observation. As for the speed averages described above, only ants with completed trajectories, that both entered and exited the entrance chamber during the focus tracking period, were included in the group averages.

#### 2.3.3. Density differences: spatial constraints or selective attraction?

To ask whether density differences between returning and potential foragers could be explained by their different start locations, we used a null model which represents each ant as a correlated random walk. A simulated set of trajectories corresponding to a focal ant * i* were generated as a walker with constant speed of , beginning at the point . The turning dynamics follow an Ornstein–Uhlenbeck process [43]:
where

*ω*is the turning rate,

*α*is the inverse correlation time,

*σ*is the noise amplitude, and

*W*(

*t*) is a Wiener process. The parameters

*α*= 7 s

^{−1}and σ = 5 rad s

^{−1}were chosen as representative of the ant trajectories. A manual search suggested that the statistical comparison results were not sensitive to specific parameter choices. An additional simulation rule was used to keep the simulated trajectories inside the entrance chamber: if the next simulation step would place the trajectory outside the entrance chamber, then instead a new motion direction that maintains the trajectory inside the chamber was chosen at random. A set of 50 correlated random walk trajectories were simulated for each tracked ant, each having a total simulation time of . Let the set of simulated trajectories for ant

*be . The average density difference for these simulated trajectories is where the average is over the ensemble of of 50 simulated trajectories, and the*

**i***δ*-function correction is not used here because the trajectories are simulated and therefore not contained in the density functions. A permutation test was used to test if there were significant differences in and for each colony observation. Figure 4

*a*shows an example of a simulated correlated random walk using the start location and total walking time of an ant from colony 4, and figure 4

*b*shows the ensemble of simulated trajectories generated for this ant.

### 2.4. Effect of density on rate of interactions between returning and potential foragers

We used collision theory to compare two groups of potential foragers based on their foraging decision: those that left the nest to forage or those that returned to the deeper nest. We asked whether differences between the two groups in interaction rates are consistent with chance encounters between ants. We then compare potential foragers in two quantities that influence their interaction rate: walking speed, and the density of surrounding returning foragers.

#### 2.4.1. Collision theory model of interactions between returning and potential foragers

We applied collision theory to predict each potential forager's expected rate of interaction with returning foragers. It is expected that the encounter rate should increase with both walking speed and local density of surrounding ants. To formalize this in terms of collision theory, consider a focus particle with size *d*_{ant} and speed *s*, surrounded by a density of particles *ρ*. The expected collision rate per unit time is *f* = *d*_{ant}*sρ*. However, since this calculation assumes that the other particles are stationary, it underestimates the expected collision rate. Using a mean field approximation, the expected collision rate considering the relative velocity of a focal particle *i* with respect to neighbouring particles *j* is approximated with the following expression:
where is an average of speed times density of local neighbours *j*. See electronic supplementary material for a derivation of this expression.

To assess how individual walking speed and local density affect a potential forager's probability of encountering returning foragers, we consider two models of increasing complexity:

(1)

*Random mixture model*: Individual potential foragers walk at different speeds, and experience a uniform density of returning foragers throughout the entrance chamber.(2)

*Local density model*: Individual potential foragers walk at different speeds, and experience a changing local density landscape defined by the returning forager density function .

For the random mixture model, the density function is simply *M*_{RF}(*t*)/*A* for each ant, where *M*_{RF}(*t*) is the number of returning foragers in the entrance chamber as a function of time and *A* is the area of the entrance chamber. The expected collision rate for a focal ant *i* is
where is the average speed of all returning foragers in the entrance chamber at time *t*, and the subscript mix represents the random mixture model.

For the local density model, the expected collision rate for ant *i* is
where the subscript LD stands for local density. Here, , the local average of speed times density of returning foragers *j* surrounding a focal ant *i*, is calculated using the same approximate 2D Gaussian function described above:
where *d _{ij}* is the distance between ants

*i*and

*j*, and the summation indices use the zonal regions defined as

*S*

_{1}:

*d*≤

_{ij}*σ*,

*S*

_{2}:

*σ*<

*d*≤ 2

_{ij}*σ*, and

*S*

_{3}: 2

*σ*<

*d*≤ 3

_{ij}*σ*.

For both the random mixture and local density models, the expected collision rate is used to express a probability function: where the associated partition functions are

The average expected number of interactions for an ant is obtained by integrating over its trajectory using the above probability functions. We denote the average number of expected interactions for ant *i*, calculated for either model, as or . The actual count for the number of interactions that ant *i* made with returning foragers is . For normalization we require that the total number of observed interactions be equal to the total average expected interactions for each model:
For an individual ant, the average expected number of interactions with returning foragers is then calculated as follows:
This calculation can be considered to distribute the interactions among all of the observed ants according to each model's probability function, and yields the average of the model's predicted number of interactions for each ant.

For each potential forager ant *i* that completed a trajectory during the tracking period, we plotted the observed rate of interaction with returning foragers, , versus the average predicted from each model, or , where *T _{i}* is the ant's total time in the entrance chamber. The correlation between model and data was calculated by grouping together potential foragers for all four sets of observations.

Previous work showed that potential foragers that left the nest to forage tended to interact with returning foragers at a higher rate than potential foragers that returned to the deeper nest [41]. We tested the ability of the random mixture and local density models to capture trends in the interaction rates of the two groups of potential foragers, those that left the nest to forage and those that returned to the deeper nest, by comparing predicted and observed mean group interaction rates. In the data, the mean rate of interaction with returning foragers is for potential foragers that left the nest to forage, and for potential foragers that returned to the deeper nest. The standard error of the mean was calculated via bootstrapping. For the models, the mean predicted rates are , , and . An additional simulation step is used to represent the discreteness of interactions and obtain distributions of these model-predicted group mean quantities. At each time step during an ant's trajectory, a random number is drawn between 0 and 1. If this number is less than the probability function times *N*^{RF}, an interaction occurs at this time step, otherwise there is no interaction. This condition is written as or . This process is applied to each model to obtain distributions of the possible numbers of interactions that are consistent with the probability function. Figure 5*a* illustrates the collision rate calculation, and figure 5*b* shows an example of time-dependent interaction probabilities , and for a potential forager.

#### 2.4.2. Walking speed and surrounding returning forager density, based on foraging decision

We compared the average walking speed and the average proximity to returning foragers, for potential foragers that left the nest to forage and potential foragers that returned to the deeper nest. The calculation for an individual's average walking speed () is described in §2.3.1. A permutation test was used to test for a significance difference between the group average speeds and .

Proximity to returning foragers was quantified by averaging the density function for returning foragers, , over the trajectory of each focal potential forager ant *i*:
A permutation test was used to test for a significant difference between group average densities and . Only ants with completed trajectories, which both entered and exited the entrance chamber during the tracking period, were included in the group averages.

## 3. Results

### 3.1. Density hotspots and the temporal sequence of interactions

We find that the temporal autocorrelation for each observation displays a broad increase near zero, and that the trend is well matched by the interaction-triggered density average (figure 6). This result has a simple interpretation: ants engage in more interactions in high-density areas in the entrance chamber, and this causes an ant's experience of interactions to be clustered in time. The match between the interaction autocorrelation and the density average suggests that engaging in an interaction does not lead an ant to seek further interactions. Instead, density hotspots cause an ant's experience of interactions to be clustered in time and to deviate from a constant rate Poisson process.

### 3.2. Density and mixing of potential and returning foragers

#### 3.2.1. Walking speed of potential and returning foragers

The mean walking speed of returning foragers was higher than the mean walking speed of potential foragers in each observation. However, the differences in the mean walking speed between groups of ants were not large, and were only marginally significant for colonies 1 and 4 (colony 1, *p* = 0.046; colony 2, *p* = 0.12; colony 3, *p* = 0.13; colony 4, *p* = 0.046).

#### 3.2.2. Differences in density of potential and returning foragers

Returning foragers tended to spend proportionally more time near returning foragers, and potential foragers tended to spend proportionally more time near other potential foragers. In observations of colonies 1, 3 and 4, the average density difference for returning foragers was significantly higher than the average density difference for potential foragers (colony 1, *p* = 0.006; colony 3, *p* = 0.008; colony 4, *p* < 0.001). In colony observation 2, there was no difference between returning and potential foragers (colony 2, *p* = 0.80). The density differences tended to be negative because in each observation, there were fewer returning foragers than potential foragers. Figure 7*a* shows the distributions of individual walking speed and density difference for returning foragers and potential foragers, and figure 7*b* shows the trajectories of returning forager and potential forager ants in colony observation.

#### 3.2.3. Density differences: spatial constraints or selective attraction?

Using a null motion model, we considered whether the tendency of returning and potential foragers to spend time in different locations in the entrance chamber was associated with starting location. Returning foragers came into the entrance chamber from outside, and potential foragers came into the entrance chamber from a tunnel to the deeper nest. In the null motion model, each simulated trajectory begins at the same starting location as the corresponding tracked ant, but then moves randomly. The results of the null model analysis show that differences in the locations of returning and potential foragers in the entrance chamber can indeed be explained by their starting locations. The simulated trajectories predict a significant density difference between groups of returning forager and potential forager ants (figure 8*a*).

We additionally compare visually the simulated null motion model trajectories with the observations. Although the null motion model trajectories show segregation in space due to different starting locations (figure 8*b*), the simulated trajectories do not display as prominent of hotspot areas as in the observations. This is particularly noticeable for the simulated and observed trajectories of returning and potential foragers in colony observations 1 and 3, and of potential foragers in colony observation 4. The visual comparison of simulated and observed trajectories suggests that to accurately reproduce realistic hotspot areas with a motion model would require more realistic detail in entrance chamber structure as well as traffic constraints between ants.

### 3.3. Effect of density on rate of interactions between potential and returning foragers

#### 3.3.1. Collision theory models applied to interactions between potential and returning foragers

The results of comparing the collision theory model with the observations are consistent with the conclusion that there are no systematic differences in the relationship between density and interaction rate for the two potential forager decision outcomes, either leave the nest to forage, or return to the deeper nest. First, the local density model agrees well with the data for the average rate of interaction of potential foragers with returning foragers (figure 9*a*). This suggests that potential foragers neither seek nor avoid interactions with potential foragers, but instead interact with surrounding returning foragers at the same rate as other surrounding ants. Next, the local density model shows a general agreement with the data for the difference in interaction rate between potential foragers that left the nest to forage (PF-leave) compared to potential foragers that returned to the deeper nest (PF-return) (figure 9*b*). In each case, the local density predicts that PF-leave interact on average at a higher rate than PF-return. For colony observations 1 and 3, the agreement between model and data is very close. For colony observations 2 and 4, the model prediction is slightly below the observations, but the predicted distributions still overlap with the error range for the data.

The random mixture and local density models make nearly the same average predictions in some cases, for example the average rate of interaction of potential foragers in colonies 1–3, and the difference in interaction rates of potential foragers in colonies 2 and 4. However, in other cases, such as the difference in interaction rates of potential foragers in colonies 1 and 3, the predictions of the two models differ. This may be due to differences among colonies in the spatial structure and distribution of ants in the entrance chamber (figure 7).

The correlation between model and data for all potential foragers is shown in figure 9*c*. Although the local density model improves the correlation with the data over the random mixture model and matches the group averages well, there is still considerable variation among individual ants. In particular, the local density model predictions do not match well for potential foragers that interacted at a high rate with returning foragers, or potential foragers that interacted with no returning foragers (figure 9*c*).

#### 3.3.2. Walking speed and surrounding returning forager density, based on foraging decision

In all observations, the average walking speed of potential foragers that left the nest to forage was significantly higher than that of potential foragers that returned to the deeper nest (colony 1, *p* = 0.005; colony 2, *p* < 0.001; colony 3, *p* < 0.001; colony 4, *p* < 0.001). Although potential foragers that left the nest to forage engaged in interactions with returning foragers at a higher rate [41], there were no consistent trends or significant differences in the average density of returning foragers in the area surrounding potential foragers that took either action (colony 1, *p* = 0.37; colony 2, *p* = 0.94; colony 3, *p* = 0.37; colony 4, *p* = 0. 48). The distributions are shown in figure 10*a*.

All potential foragers emerged from a tunnel and therefore spent time near tunnel areas while in the entrance chamber. Potential foragers that left the nest to forage walked near the edges of the entrance chamber, while potential foragers that returned to the deeper nest rarely did (figure 10*b*). However, this did not cause ants that left the nest to forage to spend more time near returning foragers (figure 10*a*).

## 4. Discussion

We formulated a model to relate proximity and walking speed to the probability of interaction between potential and returning foragers (figures 5 and 9). Building on this, we asked, do some ants ‘seek’ interactions more so than others, or does engaging in an interaction make an ant more likely to seek other interactions? Examining the temporal autocorrelation (figure 6) shows that although interactions occur clustered in time due to density hotspots, engaging in an interaction does not change the relationship between proximity and the probability of interaction. Instead, the density hotspots in the entrance chamber cause ants to experience interactions that are clustered in time. Although returning and potential foragers do not mix homogeneously in the entrance chamber (figure 7), differences in their use of space are simply due to different starting locations (figure 8). Potential foragers that left the nest to forage walked faster and interacted with returning foragers at a higher rate than potential foragers that, instead of going out to forage, returned to the deeper nest (figure 10).

The collision theory results for group average interaction rate (figure 9*a*) suggest that there are no systematic differences between returning foragers and potential foragers in interaction preferences, or between potential foragers that left the nest to forage and those that returned to the deeper nest. Returning foragers do not selectively seek potential foragers to interact with, or vice versa. However, the density hotspots in the entrance chamber suggest that ants do tend to adjust their motion towards other ants. In species that form preferential associations between particular individuals, such as birds and primates, spatial proximity does not always correspond strongly with interactions [18,20]. In harvester ants, however, spatial proximity corresponds to the probability of interactions.

We found that potential foragers differed in their walking speed, depending on whether they subsequently left the nest to forage or returned to the deeper nest. Previous work has suggested that interactions with returning foragers cause potential foragers to increase their walking speed as they become excited and subsequently leave the nest to forage [44]. Our measurements of walking speed from field observations are not precise enough to ask whether potential foragers increased their speed immediately after an interaction with a returning forager, as was noted in a laboratory study with a different species of harvester ants [44]. Another possibility is that ants differ in their preferred walking speed, or in sensitivity to interactions and the subsequent decision whether to leave the nest to forage [41].

Returning and potential foragers differ in their use of space in the entrance chamber because of their different starting locations: returning foragers were more likely to be around other returning foragers, and potential foragers more likely to be around other potential foragers. In ants, the effect of spatial structure on task allocation and task performance is likely to have an important effect on colony organization in many species [28,34].

Although collision theory captures the group average differences in interaction rate, there was still considerable variation among individual ants in the observed interaction rates (figure 9*c*). Each ant was observed in the entrance chamber for a short time before it left to forage or entered a tunnel to other parts of the nest; longer observations might smooth out this variation. However, individual ants probably vary in their movement patterns, for example in how they turn in response to the movement of nearby ants. However, it is clear from the random mixture model that some of the observed differences among ants can be explained solely by walking speed, and the fit between model and data is further improved by considering the local density of returning foragers surrounding each potential forager ant.

The collision theory model establishes a baseline expected rate of interactions based on proximity which could be used to examine interactions in other social groups. This is a null model for the case when there is no social preference. In some animals, such as baboons [18] and giraffes [45], individuals are more likely to interact with social affiliates than with other group members. Comparing the model's baseline expectation of interactions with observations of animal groups can help to elucidate how social preference and spatial constraints from the environment influence the interactions that shape collective behaviour.

## Data accessibility

All data are freely available in the Stanford data repository at https://purl.stanford.edu/sf994km1767. Code used in the analysis was written in Mathematica and is available at https://github.com/jacobdavidson/ants-spatial.

## Competing interests

We declare we have no competing interests.

## Funding

This work was supported by NIH R01 GM105024.

## Acknowledgements

We are grateful to Mark Goldman for helpful discussions that initiated this work and to Paul Switzer for discussions and statistics advice. We thank Sam Crow and Roxana Arauco-Aliaga for help with fieldwork and ant tracking, as well as the staff at Southwestern Research Station for their help with fieldwork.

## Footnotes

Electronic supplementary material is available online at https://dx.doi.org/10.6084/m9.figshare.c.3887815.

- Received June 4, 2017.
- Accepted September 11, 2017.

- © 2017 The Author(s)

Published by the Royal Society. All rights reserved.