Thank you for visiting nature.com. You are using a browser version with limited support for CSS. To obtain the best experience, we recommend you use a more up to date browser (or turn off compatibility mode in Internet Explorer). In the meantime, to ensure continued support, we are displaying the site without styles and JavaScript.

# Trails of ants converge or diverge through lens-shaped impediments, resembling principles of optics

## Abstract

Analogies across disciplines often indicate the existence of universal principles such as optimization, while the underlying proximate mechanisms may differ. It was reported recently that trails of ants refract at the border of substrates, on which walking speeds differ. This phenomenon is analogous to the travel-time-minimizing routes of light refracting at the borders between different media. Here, we further demonstrate that ant tracks converge or diverge across lens-shaped impediments similar to light rays through concave or convex optical lenses. The results suggest that the optical principle of travel time reduction may apply to ants. We propose a simple mathematical model that assumes nonlinear positive feedback in pheromone accumulation. It provides a possible explanation of the observed similarity between ant behavior and optics, and it is the first quantitative theoretical demonstration that pheromone-based proximate mechanisms of trail formation may produce this similarity. However, the future detailed empirical observations of ant behavior on impediment edges during the process of pheromone trail formation are needed in order to evaluate alternative explanations for this similarity.

## Introduction

Optimization is a central principle underlying a variety of physical, chemical, and biological phenomena1 including ecology and evolution of biological organisms2,3. It is possible that similar underlying principles of optimization may lead to similarities between biological and physical phenomena.

Optimization of foraging efficiency by individuals or groups (e.g. colonies of social insects) is a product of natural selection for optimal foraging2. One of the mechanisms involved in foraging optimization is the ability of animals to minimize their travel time during foraging trips4,5,6,7. For example, colonies of ants are able to establish foraging traffic in a time-minimizing manner: army ants Eciton burchelli are able to form the trails along which flow of the traffic is maximized8, and Argentine ants Iridomyrmex humilis can collectively form pheromone-marked foraging trails that reduce the travel time on bifurcated bridges9. Ants may reach such a colony-level optimization through interactions among individuals without central control over their behavior. One of the crucial processes of the trail formation includes individuals marking their travel path from the food source to the nest with a pheromone. This pheromone-marked path is later used by other foragers who travel between the nest and the food source adding their own pheromone to the trail to reinforce the path. Additional processes involved in the formation of foraging trails include path integration, spatial memory, or edge-following10,11,12,13,14,15. This ability of ants to optimize the collective performance through the decentralized processes at the level of an individual has inspired other fields of science such as robotics and computer science16,17.

The principle of reduced travel time also governs the behavior of light rays. According to Fermat’s least-time principle, which is an axiomatic principle in optics, a ray of light travels from a certain point to another through a time-minimizing trail. In optics, the time-minimizing path does not need to be distance-minimizing. When a light ray traverses across a border between two media of different light propagation speeds (different refractive indices), it bends (refracts) in such a manner that minimizes the light’s travel time through the two media. Snell’s law, or the law of refraction, was derived from Fermat’s principle in order to compute the angles of incidence and refraction that determine how a light ray bends at the edge between the two media. As both ants and light rays are governed by a similar principle of travel time minimization, it is expected that the pheromone-based travel-time-reducing trails laid by ants also bend at the edge between two substrates of different ant walking speeds. This prediction was recently tested in laboratory conditions in one species of ants18. It was shown that the little fire ants Wasmannia auropunctata entering a substrate that slows them down refract their trails at the border between substrates in a way similar to laws of optics18 resulting in time-reducing paths similar to the light rays. Experiments on Lasius niger7 suggested that preference for path of shorter travel time might be a consequence of behavioral and physical processes involved in the pheromone trail formation, and these processes were hypothesized as the proximate mechanisms responsible for the analogy between optics and ant behavior7,18.

Another optical rule, which can be derived from Fermat’s principle and Snell’s law, is the lensmaker’s equation. This equation predicts a focal distance of a thin lens from the refraction ratio and curvature of the lens. We focused on the fact that this equation also predicts whether the target-reaching light rays would diverge (wide dispersion along with the lens) or converge (narrow dispersion) across convex or concave lenses (violet-shaded light rays in Fig. 1a1–a3). If target-reaching light rays diverge or converge on lenses, we hypothesized (based on the general similarity between ant trails and laws of optics18) that bait-reaching trails of foraging ants would also follow patterns similar to the light rays across lenses, and that they would show higher dispersion across convex impediments that slow ants down (Fig. 1b1) and lower dispersion across concave impediments (Fig. 1b3) located between their nest and the food source (Fig. 1c). We attempted to investigate this general analogy between the effect of lens shape on the dispersion of target-reaching light rays (resulting from the physics of light; Fig. 1a1–a3) and the effect of impediment shape on the dispersion of ant foraging paths resulting from the collective behavior of individual ants. In order to do so, we observed trajectories of ants across passable lens-like impediments made of Velcro that slow the ants down (Fig. 1b1–b3). We used natural, rather than laboratory-based, ant colonies to minimize the possibility of behavioral artifacts. Additionally, we quantitatively explored the hypothesis that the processes involved in pheromone trail formation across the experimental impediments might have been responsible for the observed analogy between optics and ant behavior. We expressed this hypothesis quantitatively in a simple mathematical model that grasps the nonlinear positive feedback between the number of ants on a path and the pheromone accumulation.

## Results

### Experiments

We observed foraging tracks of the Japanese carpenter ant, Camponotus japonicus, across the passable impediments of three shapes: convex, band, and concave (Fig. 1b1–b3). The impediments were located between the nest and the feeder (‘Bait’ in Fig. 1c). We performed two sets of experiments, and each set comprised three treatments (impediment shapes) at three independent colonies, resulting in 18 recorded trials. From a frame-by-frame analysis of video of each trial, we calculated a relative frequency distribution (blue-colored distribution in Fig. 1d) of ants’ locations (defined by values of displacement from the midline, yi) weighted by each ant’s horizontal speed at each coordinate (vi,h; Fig. 1c,e) within the impediment’s analysis region (a dark band in Fig. 1c; see Methods for details). The weighted standard deviation S was used as an index of dispersion (See Methods for the detailed explanations) and it was compared to the expected dispersion. Additionally, in order to determine the expected dispersion, we used walking speeds of ants recorded in each trial to calculate the relationships between the displacement from the midline (yi) and the expected travel time (example in Fig. 1f; details and results for all tests are given in the Supplementary Materials).

As predicted, the index of dispersion S varied by the shape of the impediments in our empirical data (Fig. 2a–d; mixed-model ANOVA, F = 6.661, df = 2, p = 0.011; nest ID and set ID were considered as random effects). S across the convex-shaped impediment (Fig. 2a1,d–blue dots) was significantly higher than S across the band-shaped (Fig. 2b1,d–yellow dots) and concave-shaped (Fig. 2c1,d–red dots) impediments (Post-hoc Tukey’s honest significant difference (HSD) test, Z = 2.489, p = 0.034; Z = 3.556, p = 0.001, respectively). We, however, did not observe a significant difference of S between the band- and concave-shaped impediments (Post-hoc Tukey’s HSD test, Z = −1.067, p = 0.535).

### Model

To quantitatively express the hypothesis that pheromone-based processes underlie the similarity between ant behavior and optics, we built a set of simple mathematical formulae that could explain and predict the frequency distribution along the analysis region (symbols used in the model are explained in the Table S4 of Supplementary Materials). The idea behind the formulae is that initially, each foraging ant chooses the point of the passage (y-value in the model) when traveling to the nest and to the bait. At the early stage of foraging when there are no pheromone trails, each y-value has equal probability to be chosen by a foraging ant. Each foraging ant at the early stage in our model maintains its point of passage in the subsequent travels until attraction to pheromone changes the individual’s behavior. We assumed in the model that the substrate-specific walking speeds of ants are constant, resulting in trail-specific travel time (T) values. The model also assumes that an ant deposit a constant amount of pheromone per unit length, independently of an ant’s walking speed, the travel distance, and total travel time along that path. We thought it was a reasonable assumption considering the absence of empirical data on the possible relationships between walking speed of an individual ant and the concentration of the pheromone deposited along the trail by that ant for this species. Under these assumptions, we expected the initial rate of pheromone accumulation by foraging ants (in an experimental trial) is higher for the trails with shorter travel time (T) because ants that use the shorter path can travel back and forth from bait to the nest (or vice versa) more frequently while depositing the pheromone each time. That is, each point in the trail is more frequently visited by foraging ants if travel time is short, and this leads to faster accumulation of the pheromone on this path. The initially faster pheromone accumulation triggers a positive reinforcement mechanism: The deposited pheromone attracts even more pheromone-depositing ants, who additionally contribute to the increase of the pheromone deposit. Therefore, we assumed that after the pheromone trails are fully formed, the traverse frequency (f) along the trail is proportional to some power of the travel time’s (T) inverse: $$\hat{f}(y)=A{\left(\frac{1}{T(y)}\right)}^{k}$$ (See Methods for the details). By the shape of the equation, ants crossing the concave-shaped impediment near the midline would experience the minimum travel time, and those crossing the impediment distantly from the midline would face a highly increased travel time (Fig. 1f, red line). However, for the convex-shaped impediment, ants could choose a wider range of trails near the midline without facing a highly increased travel time (Fig. 1f, blue line). Therefore, we predicted a wider dispersion of trails around the midline in convex-shaped impediment than in band- or concave-shaped ones.

By comparing the theoretical and empirical results, we found that for a specific range of k values (12, 13, or 14), the theoretical values of Ŝ generated for each of the 18 tests using the equations (Fig. 2e) did not differ significantly from the empirical ones (Wilcoxon signed-rank tests, Z = 1.023, W = 109, p = 0.306; Z = −0.240, W = 80, p = 0.811; Z = −1.372, W = 54, p = 0.170 for k = 12,13, and 14, respectively, see Table S3).

## Discussion

The results suggest that ants, similar to photons (rays of lights), tend to travel along time-reducing paths, which is consistent with general optimization principles1, laws of optics, and optimal foraging theory2,3,4,5,6. Specifically, optimal foraging theories predict that natural selection may result in the ability of animals to maximize foraging efficiency by minimizing travel time during foraging trips4,5,6. Both ant trails and light routes are the outcomes of multiple agents’ behavior (individuals or photons), and there is no central control to coordinate collective behavior. However, there is no need for a photon to ‘remember’ its previous trajectories, and physical interactions with the environment suffice to generate the time-minimizing propagation. Ants, on the other hand, utilize their own memory19,20,21 as well as the pheromone laid by other workers along the trail. The previous study18 hypothesized that the pheromone-based process is the underlying principle of similarity to optics. Our model grasped the core properties of trail formation, and the model results are congruent with the empirical results. The proposed model thereby fulfills two empirical conditions: it is consistent with the positive feedback process involved in pheromone trail formation, and it predicts a similarity between the observed ants’ behavior and the laws of optics.

Although the empirically observed differences in track dispersion among impediment shapes are generally consistent with the predictions from time-minimizing principles, a substantial variation was observed, and thus other factors should be considered. In tests of concave-shaped and band-shaped impediments, where the direct path was clearly time-minimizing, some ants used paths deviating from it. In the convex-shaped impediments, in contrast, some ants still used the direct path yielding a disadvantage in travel time. For the former case, the density of ants on the trail may have bolstered the dispersion as ants try to avoid collision with others10, or as ants tend to deviate from the pheromone path22. For the latter case, ants could have instinctively preferred the direct path. In nature, where the direct path is generally time-minimizing, ants could have evolved a tendency to follow the direct path. It is possible that ants integrate time-reducing and distance-reducing manners. Studies show that ants have information about the local topographies and utilize path integration, spatial and geometric cues when navigating11,12,13,19. Furthermore, ants may not only consider time or distance minimization, but also energy efficiency maximization as an important criterion in optimal path formation23. Thus, the actual path may be slightly different from the time-minimizing path, leading to the lack of precise agreement with the expectation based on time minimization. Scenic familiarity may have affected the dynamics of trail formation through repeated trials as well24. Besides, there is evidence that coordinated collective behavior is not an essential factor for the trail formation: memories of individuals may suffice to form the robust trails in certain conditions20,21. Moreover, ants may be trapped in suboptimal routes due to the positive feedback from pheromone deposition9, which could be another reason for the discordance of ant trails and predictions.

Ants also tend to follow structural edges14,15 which is visible in Fig. 2a1, b1, c1. We observed that some ants veer when they arrive at the Velcro impediment, and they follow along the edge before crossing into the Velcro. However, our simple model does not consider this effect when calculating time required to walk from the food to the nest. Otherwise, we assumed that the difference of travel time generated by edge-following has minimal effects on the results from an ideal model. In reality, however, we suspect that due to the shape of the impediment, the edge-following ants might be more likely to diverge from the impediment’s midline for convex-shaped impediments and converge towards midline for concave-shaped impediments. In such a situation, the edge-following behavior may affect the observed differences in the dispersion (S) among different impediment shapes. Therefore, in future experiments of similar design, it is necessary to measure the temporal changes in the pheromone deposition behavior, pheromone concentrations, volatility, edge-following behavior, and distribution of tracks crossing the impediment to empirically determine the mechanism responsible for the observed results. As we observed only the later stage (60–90 min after the initiation) of the trail formation process, individual movements at the early stages of trail formation must be analyzed in order to fully understand the mechanism responsible for the observed differences in the dispersion (S) among different impediment shapes after one hour of trail-forming activities by ants. We suggest that the index of trail dispersion, S, proposed in our study, could be useful in the future research of ant trails’ formation.

In summary, this is the first empirical demonstration that the differences in spatial dispersion of trails by ants across different lens-shaped impediments are generally similar to the dispersion differences of travel-time-minimizing routes of light rays across optical lenses of different shapes. Furthermore, the observed differences can be predicted from a simple mathematical model that captures the nonlinear nature of the pheromone trail formation process. The model suggests that the similarity with optics might be a consequence of travel-time-reducing principles that govern the two entirely different processes: the collective trail formation by ants and the behavior of light across media. However, detailed empirical observations of ant behavior on impediment edges during the process of pheromone trail formation are necessary to evaluate alternative explanations for this similarity.

## Methods

### Experimental procedures

Experiments were performed at three Camponotus japonicus colonies (denoted by A1, MS, and MG). An average distance between colonies was 131.7 m, and they were located at Seoul National University Gwanak campus (latitude = 37° 27′ N; longitude = 126° 57′ E). We conducted trials at MS, MG in 2016 and at A1 in 2017. (The number of ants on the arena for each colony is described in Table S2) As ants from different colonies often scuffle25, by moving an ant from one colony to the vicinity of another colonies’ entrance, we were able to confirm that the three colonies were distinct from each other. The colonies we chose were large enough for the ants to form trails (average number of ants on the experimental arena during analysis period> 17). As the pheromone leading to the ephemeral food source evaporates relatively rapidly26,27, a certain minimal number of ants might be required for the trail formation that resembles optical rules (however, no information on such evaporation of pheromone for our study species exists). However, the excessively large colonies were avoided because the bait near a gigantic colony is densely covered and fringed by many ants. If so, some ants are physically marginalized from the bait and cannot participate in the ordinary foraging process.

We prepared a 100 mm-wide Velcro tape (manufactured by Dong Yang Rubber) and cut it into 3 shapes: convex, band, and concave shapes. We rigged a tripod, a camcorder, and a 600 mm × 600 mm experimental arena with one of the impediments located in the middle of the arena as shown in Fig. 1 and in Fig. 3a near a colony’s entrance. The arena was surrounded by 3-cm-high walls on which synthetic grease was daubed to hinder ants from climbing the walls.

Initially, we manually placed the ants alongside the bait and started filming right after a sufficient number (normally more than 5) of ants showed interest in the bait. We filmed for at least 90 minutes. All the videos were recorded with a 30-fps-camcorder during daytime under the shade made by nearby buildings to avoid overheating caused by direct sunlight.

The bait was composed of canned tuna with constant contents of sugar (mixture ratio of tuna to sugar = 17:1). The surface portion without the Velcro was covered with papers that were replaced on each round of an experiment to remove pheromone deposition. The Velcro was rubbed with an ethanol solution after each round of an experiment and dried for more than one day to remove the effect of the remaining pheromone.

At each colony, we performed two sets of experiments. Each set was composed of three treatments: concave-, band-, convex-shaped impediments, yielding 18 videos in total. We randomly mixed the order of the impediment in each set. The gap between the two sets in the same colony was 17.7 days on average (minimal gap: 11 days). This gap should be sufficient for the outside foragers to be replaced because the life expectancy of the outside foragers is known to be short (e.g. P. owyhee, 14 days28; C. bicolor, 6.1 days29). The average duration of each set was 5 days.

### Video analysis and the data matrix

Using Adobe Premiere Pro CC, we adjusted contrast and brightness to facilitate the tracking efficiency by the video tracking software AnTracks (http://www.antracks.org). The arena in the video was adjusted into the square shape to correct the distortion caused by camera alignment. If an ant stood stationary for more than 5 s on the analysis region, we removed the corresponding points from the analysis by covering the points with a white layer. In that way, we exclusively analyzed mobile foraging ants. Images from the videos that are evidently not ants such as dirt, other insects, or shades of Velcro fibers were also erased from video by applying such layers.

We analyzed the edited videos from 60 to 90 min (30-min excerpt) after the initiation of filming when the trails were assumed to be stabilized. The video was transported to AnTracks to extract positions of ants in each frame. AnTracks provided the positions, trajectory IDs, time, and other information about ants’ movement. Then, we used MATLAB R2017a to analyze the extracted coordinates.

Firstly, we excluded positions of ants with walking speeds outside the range between 1.5 cm/s and 20 cm/s. Walking slower than 1.5 cm/s were considered to be stationary, and objects which moved faster than 20 cm/s were considered erratic (they might have been flying insects). We also excluded trajectories whose duration is less than 0.5 s as extremely short trajectories are likely to be the traces of temporary shades or other flying insects.

We generated ‘heatmaps’ to visualize the distribution of walking ants on the whole experimental arena. Each heatmap is composed of 600 × 600 grids. As the side length of the experimental arena is 600 mm, a grid in a heatmap represents 1 mm × 1 mm area. Slower walking ants generate more coordinates during tracing and are more likely to contribute to more grids. In order to remove this bias, the contribution of a mobile ant to a grid should increase proportionately to the walking speed. Hence, each record of an ant in a grid was weighted by the corresponding walking speed at each position. The brighter grid color (higher grid values), therefore, indicates that ants were more likely to cross that grid. Examples of heatmaps are shown in Fig. 2a1, b1,c1.

The statistical analysis was conducted on the data recorded from a narrow analysis region (Fig. 3). Consecutive frame-by-frame positions (x, y coordinates) of the same ant within the analysis region form a trajectory. This enabled us to calculate the walking speed at each position. From the distance an ant moved between two consecutive frames (Δt =1/30 s), we calculated the walking speed of each position in a trajectory as $${v}_{i}=|({x}_{i+1},{y}_{i+1})-({x}_{i},{y}_{i})|/\Delta t$$. In a similar fashion, we calculated the horizontal speed (i.e. the norm of the velocity vector’s horizontal component which is parallel to the midline or x-axis in Fig. 3a,b) according to the formula $${v}_{i,h}=|{x}_{i+1}-\,{x}_{i}|/\Delta t$$. For each of the 18 tests, we put data from all ant tracks into a data matrix containing two columns of coordinates, one column of speed values, and one column of horizontal speed values for all ant records in a test. This data was then subjected to analysis in order to extract a variable representing the degree of dispersion of foraging ants in each of the 18 tests.

### Data analysis: an overview

We used the data matrix to determine how much the trajectories of ants traversing the impediment deviated from the midline. Let vi denote the speed of i-th traced coordinate and yi the i-th displacement from the midline. vi and yi are from the data matrix (Fig. 3a,b). In order to measure the dispersion, we decided to use the weighted standard deviation of yi’s within the analysis region (we refer to it as the index of dispersion, S). Weights of yi’s are horizontal speed associated with each data point. We used horizontal speed because the number of points per track within the analysis region is larger for slowly moving ants than that of fast-moving ants. Ants with longer trails on the analysis region also have a similar bias. If all of the yi’s coordinates in the data matrix have the same weight when calculating the standard deviation of yi’s, the contribution of ants with longer trails or slow speed to the S (e.g. P1 in Fig. 3c) would be disproportionately larger than the contribution of ants with shorter trails or fast speed (e.g. P2 in Fig. 3c). It is, however, not sufficient to weight the distribution by the speed value to remove this bias as indicated by Fig. 3d. We, therefore, have multiplied the value of y-coordinates by the horizontal speed value.

In this way, even though the slow and longer tracks contribute a large number of data points, each of the data points is weighted less than each of the few data points of fast and straight tracks. By this measure, each track contributes equally to the total frequency distribution regardless of the walking speed, distance traveled, and turning frequency while traversing the analysis region. Therefore, this distribution is similar to the relative distribution of the number of tracks crossing the analysis region at various displacements (y) from the midline. Examples of the weighted frequency distributions are shown in Fig. 2. Finally, we calculated weighted standard deviation S as an index of dispersion of ant tracks crossing the analysis region. Small values of S indicate the convergence of trails on the impediment, and large values indicate the divergence. Mathematical formulae and details are described in the following section.

After obtaining S for each test, we used the linear mixed-effects models to evaluate the effect of the impediment shape on the S using the lmer function (the package lme4 in R (Bates et al. 2015)). In the model, the nest ID and the set ID were considered as random effects. When comparing mathematical expectations and empirical results, we used the Wilcoxon signed-rank test (in MATLAB R2017a).

### Data analysis: mathematical calculations to obtain the index of dispersion, S

As the fidelity of tracking is not perfect for small ants, the traced trajectories of some ants are disconnected and fragmented. When using an analysis line rather than an analysis region for the count of traverses, the trajectories of ants whose segments do not cross the analysis line will not be counted. When adopting an analysis region, though some traces are fragmented, each segment can contribute to the overall results as long as the segment is contained in the analysis region. Therefore, utilizing the analysis region is relatively robust against tracking fidelity and continuity problems while producing similar results to the coordinate count on the line.

Let vi,h denote the horizontal speed of i-th traced coordinate. Also, let $$\overrightarrow{\gamma }([X,Y])$$ denote the trajectory of an ant that links one point on the boundary of analysis region (X) and another point on the other side of the boundary (Y). $$\overrightarrow{\gamma }([X,Y])$$ is theoretically continuous but discrete in an empirical sense, because it was measured in each frame whose duration is 1/30 s. As ants rarely turn backward on the impediment, we assumed that the sign of the horizontal velocity remains unchanged. We did not use the speed between two consecutive frames as weights because by doing so, we would have introduced a bias: ants with longer trajectories would have become overrepresented in the frequency distribution of y-values (Fig. 3d). Mathematically speaking, let φj be the set of speed values of $$\overrightarrow{{\gamma }_{j}}([X,Y])$$, then,

$${\sum }_{{v}_{i}\in {\varphi }_{j}}{v}_{i}\approx L/\Delta t$$
(1)

where L is the distance an ant moved on the analysis region in a single (convoluted) trajectory, and Δt is a duration of a frame (1/30 s). This is derived from the simple equation that $$\sum {v}_{i}\Delta t$$ equals the distance that an ant moved. As Δt is constant, the summation of the speed values on the analysis region is in proportion to the actual distance on which the ant moved. Accordingly, multiplying yi by the vi as the weight will produce biased results: For instance, if an ant curved its path on the analysis region as P1 in Fig. 3d, its distance would increase though both ants traversed the analysis region once.

To avoid these problems, we used horizontal speed values (vh) as the weight associated with yi’s. Unlike the aforementioned methods, whichever paths ants take through the impediment, the sum of the horizontal movement in a single passage is equivalent to the width of the impediment, given that there is no turning back. In other words,

$${\int }_{\overrightarrow{\gamma }([X,Y])}{v}_{h}dt=D$$
(2)

where D is the width of the analysis region. Thus, horizontal speed on the $$\overrightarrow{\gamma }([X,Y])$$ is an appropriate measure that is robust against turns and walking speed.

Similarly, as the stepwise version of the equation, the following similarity holds (Fig. 3e,f).

$${\sum }_{{v}_{i,h}\in {\varphi }_{j}}{v}_{i,h}\Delta t\approx D$$
(3)

where vi,h (vi,h ≥ 0) is the horizontal speed in the i-th frame in a specific trajectory, and φj is the set of horizontal speed values in $$\overrightarrow{\gamma }([X,Y])$$. Therefore, once the sign of the horizontal velocity is maintained, whichever direction and speed an ant exhibits, the sum of horizontal speed values is nearly constant for every traverse. This property allowed us to adopt horizontal speed as the weight for building the frequency distribution of y-values, from which the dispersion index, S, was derived. Examples of such weighted frequency distributions are shown in Fig. 2.

Hence, the index of dispersion used for the analysis is the weighted standard deviation of the ants’ y-positions on the impediment weighted by their horizontal speeds, that is,

$${\boldsymbol{S}}={\left(\frac{{\sum }_{i=1}^{{N}_{a}}{v}_{i,h}{({y}_{i}-\overline{{Y}_{h}})}^{2}}{\frac{{N}_{a}-1}{{N}_{a}}{\sum }_{i=1}^{{N}_{a}}{v}_{i,h}}\right)}^{1/2}$$
(4)

where $$\overline{{Y}_{h}}$$ is the weighted mean of yi’s $$(\overline{{Y}_{h}}={\sum }_{i}{v}_{i,h}{y}_{i}/{\sum }_{i}{v}_{i,h})$$. All yi’s are included in the analysis region with non-zero horizontal speed values and Na is the total number of such yi’s.

This index gets larger as more ants generate dispersing paths. We used this index to compare dispersion among experimental treatments.

### Description of formulae

As many of the ants passing through the Velcro moved nearly horizontally, and for simplicity of the model, ants are assumed to travel horizontally on the impediment. Ants were also assumed to travel directly in a straight line toward the entrance, bait, or edge of the impediment while on the paper-lined surface (Fig. 1e). Accordingly, the shape and configuration of the path are totally dependent on the y-coordinate of the passage point (equivalent to the yi’s in Fig. 3). As long as the speeds on the paper and on the impediment are fixed, the total travel time is determined by the distance an ant moves on each surface divided by the corresponding speed.

$$T(y)=\frac{{L}_{N}(y)}{{v}_{N}}+\frac{{L}_{V}(y)}{{v}_{V}}$$
(5)

where LN(y) and LV(y) are the distances an ant needs to travel on the paper-lined and on the Velcro surface (N stands for normal; V for Velcro), respectively; vN and vV are the speed values on the paper-lined surface and on the Velcro surface, respectively. Speed values in this process are assumed to be constant.

Assuming constant speed, T(y) can be written as follows.

$$T(y)=\frac{1}{{v}_{N}}\left(\frac{{L}_{N}(y)}{1}+\frac{{L}_{V}(y)}{\frac{{v}_{V}}{{v}_{N}}}\right)=\frac{1}{{v}_{N}}\left(\frac{{L}_{N}(y)}{1}+\frac{{L}_{V}(y)}{{v}_{r}}\right)$$
(6)

where vr is the relative ratio of vV to vN.

The formation of pheromone trails by ants relies on positive feedback between the number of the ants using the trail and the amount of the pheromone, which exhibits nonlinear relationship30,31. As the first-line design of the formulae to embrace these facts, we assumed that the relative frequency density along the impediment’s y-coordinates is in proportion to the k-th power of 1/T(y). In this way, the longer traveling time induces weaker trails, while the shorter traveling time induces even stronger trails. One can accordingly derive the relative frequency of the traverse across the analysis region as follows:

$$\psi (y)=\frac{1/{T}^{k}(y)}{{\int }_{-{y}_{0}}^{{y}_{0}}\frac{1}{{T}^{k}(y)}dy}$$
(7)

where y0 = 28 cm in this study. As $$\frac{1}{{v}_{N}}$$ is canceled out in ψ(y), one can notice that the speed does not affect the relative frequency as long as vr is constant. In other words, whichever vN one chooses, the expected relative frequency of the passage positions is invariant.

For each of the 18 empirical tests, we calculated the theoretically expected degrees of dispersion (Ŝ) for the 20 values of k from 1 to 20 in steps of 1. Thereby, Ŝ can be derived from the following equation.

$$\hat{{\boldsymbol{S}}}={\left(\frac{{\int }_{-28}^{28}{(y-\bar{Y})}^{2}\psi (y)dy}{{\int }_{-28}^{28}\psi (y)dy}\right)}^{\frac{1}{2}}={({\int }_{-28}^{28}{y}^{2}\psi (y)dy)}^{\frac{1}{2}}$$
(8)

This equation represents the method for deriving standard deviation from a continuous variable. $${\int }_{-28}^{28}\psi (y)\,dy=1$$ by the definition of ψ. The weighted mean $$\bar{Y}=0$$ due to the symmetry of ψ. For each value of k, we compared the 18 expected values of Ŝ with the 18 empirically observed values of S. The high p-values derived from the Wilcoxon signed-rank test (Table S3) indicate that no significant difference was observed between theoretical and empirical observations when k = 12, 13, and 14.

## References

1. 1.

Bordley, R. F. A central principle of science: Optimization. Behav. Sci. 28, 53–64 (1983).

2. 2.

Reiss, M. J. Optimization theory in behavioural ecology. J. Biol. Educ. 21, 241–247 (1987).

3. 3.

Cody, M. L. Optimization in ecology. Science (80-.). 183, 1156–1164 (1974).

4. 4.

Langvatn, R. & Hanley, T. A. Feeding-patch choice by red deer in relation to foraging efficiency - An experiment. Oecologia 95, 164–170 (1993).

5. 5.

Mittelbach, G. G. Foraging Efficiency and Body Size: A Study of Optimal Diet and Habitat Use by Bluegills. Ecology 62, 1370–1386 (1981).

6. 6.

Pyke, G. H. Optimal foraging: Movement patterns of bumblebees between inflorescences. Theor. Popul. Biol. 13, 72–98 (1978).

7. 7.

Bles, O., Boehly, T., Deneubourg, J. L. & Nicolis, S. C. Same length, different shapes: Ants collectively choose a straight foraging path over a bent one. Biol. Lett. 14, (2018).

8. 8.

Couzin, I. D. & Franks, N. R. Self-organized lane formation and optimized traffic flow in army ants. Proc. R. Soc. B Biol. Sci. 270, 139–146 (2003).

9. 9.

Goss, S., Aron, S., Deneubourg, J. L. & Pasteels, J. M. Self-organized Shortcuts in the Argentine Ant. Naturwissenschaften 76, 579–581 (1989).

10. 10.

Dussutour, A., Fourcassié, V., Heibing, D. & Deneubourg, J. L. Optimal traffic organization in ants under crowded conditions. Nature 428, 70–73 (2004).

11. 11.

Muller, M. & Wehner, R. Path integration in desert ants, Cataglyphis fortis. Proc. Natl. Acad. Sci. 85, 5287–5290 (1988).

12. 12.

Collett, T. S. & Collett, M. Memory use in insect visual navigation. Nat. Rev. Neurosci. 3, 542–552 (2002).

13. 13.

Wehner, R., Boyer, M., Loertscher, F., Sommer, S. & Menzi, U. Ant navigation: One-way routes rather than maps. Curr. Biol. 16, 75–79 (2006).

14. 14.

Dussutour, A., Deneubourg, J. L. & Fourcassié, V. Amplification of individual preferences in a social context: The case of wall-following in ants. Proc. R. Soc. B Biol. Sci. 272, 705–714 (2005).

15. 15.

Pratt, S. C., Brooks, S. E. & Franks, N. R. The use of edges in visual navigation by the ant Leptothorax albipennis. Ethology 107, 1125–1136 (2001).

16. 16.

Bonabeau, E., Dorigo, M. & Theraulaz, G. Inspiration for optimization from social insect behaviour. Nature 406, 39–42 (2000).

17. 17.

Krieger, M. J. B., Billeter, J. B. & Keller, L. Ant-like task allocation and recruitment in cooperative robots. Nature 406, 992–995 (2000).

18. 18.

Oettler, J. et al. Fermat’s Principle of Least Time Predicts Refraction of Ant Trails at Substrate Borders. PLoS One 8, e59739 (2013).

19. 19.

Collett, T. S., Dillmann, E., Giger, A. & Wehner, R. Visual landmarks and route following in desert ants. J. Comp. Physiol. A 170, 435–442 (1992).

20. 20.

Dussutour, A. & Nicolis, S. C. Flexibility in collective decision-making by ant colonies: Tracking food across space and time. Chaos, Solitons and Fractals 50, 32–38 (2013).

21. 21.

Czaczkes, T. J., Salmane, A. K., Klampfleuthner, F. A. M. & Heinze, J. Private information alone can trigger trapping of ant colonies in local feeding optima. J. Exp. Biol. 219, 744–751 (2016).

22. 22.

Hartwick, E., Friend, W. & Atwood, C. E. Trail-laying behaviour of the carpenter ant. Camponotus pennsylvanicus (Hymenoptera: Formicidae). 109, 129–136 (1977).

23. 23.

Denny, A. J., Wright, J. & Grief, B. Foraging efficiency in the wood ant, Formica rufa: Is time of the essence in trail following? Anim. Behav. 62, 139–146 (2001).

24. 24.

Schwarz, S., Wystrach, A. & Cheng, K. Ants’ navigation in an unfamiliar environment is influenced by their experience of a familiar route. Sci. Rep. 7, 14161 (2017).

25. 25.

Gordon, D. M. & Kulig, A. W. Founding, foraging, and fighting: Colony size and the spatial distribution of harvester ant nests. Ecology 77, 2393–2409 (1996).

26. 26.

Dussutour, A., Nicolis, S. C., Shephard, G., Beekman, M. & Sumpter, D. J. T. The role of multiple pheromones in food recruitment by ants. J. Exp. Biol. 212, 2337–2348 (2009).

27. 27.

Jeanson, R., Ratnieks, F. L. W. & Deneubourg, J. L. Pheromone trail decay rates on different substrates in the pharaoh’s ant, Monomorium pharaonis. Physiol. Entomol. 28, 192–198 (2003).

28. 28.

Porter, S. D. & Jorgensen, C. D. Foragers of the harvester ant, Pogonomyrmex owyheei: a disposable caste? Behav. Ecol. Sociobiol. 9, 247–256 (1981).

29. 29.

Schmid-Hempel, P. & Schmid-Hempel, R. Life Duration and Turnover of Foragers in the Ant Cataglyphis Bicolor (Hymenoptera, Formicidae). Insectes Soc. 31, 345–360 (1984).

30. 30.

Beekman, M., Sumpter, D. J. T. & Ratnieks, F. L. W. Phase transition between disordered and ordered foraging in pharaoh’s ants. Proc. Natl. Acad. Sci. 98, 9703–9706 (2001).

31. 31.

Sumpter, D. J. T. & Beekman, M. From nonlinearity to optimality: Pheromone trail foraging by ants. Anim. Behav. 66, 273–280 (2003).

## Acknowledgements

Authors are grateful to SNU Big Data Institute, BK21 program to the School of Biological Sciences, National Research Foundation of Korea Grant 2018-052541 administered via SNU IAMD, and DGIST Start-up Fund Program of the Ministry of Science, ICT and Future Planning. Authors thank Injae Hwang and Woojoo Kim for helping in this research.

## Author information

Authors

### Contributions

Experiment planning: J.C., W.S., H.K., S.L., P.G.J.; Experiment conduct: J.C., H.L., H.C.; Mathematical analysis: J.C., P.G.J., H.K.; Statistical analysis: H.L., J.C., P.G.J.; Initial writing: J.C.; Revision & review: P.G.J., S.L., W.S., H.K., J.C.

### Corresponding authors

Correspondence to Ho-Young Kim or Sang-im Lee or Piotr G. Jablonski.

## Ethics declarations

### Competing interests

The authors declare no competing interests.

Publisher’s note Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

Reprints and Permissions

Choi, J., Lim, H., Song, W. et al. Trails of ants converge or diverge through lens-shaped impediments, resembling principles of optics. Sci Rep 10, 8479 (2020). https://doi.org/10.1038/s41598-020-65245-0

• Accepted:

• Published: