This excursion was inspired by the work of Haolin (Horace) Zeng on the self-assembly of fire-ant pontoon bridges, summarized on his research page (8000-ant subcolonies, bridges of about 500 ants, and several proto-bridges of which only one completes). The model here is an independent toy built to frame a design question; it is not that study's model, and its parameters are not fitted to any data.
The question
In dish assays, fire ants (Solenopsis invicta) held on the rim of a water-filled dish assemble a floating pontoon bridge out to food at its center. Besides the proto-bridges anchored at the rim, clusters of linked ants sometimes break free and float as small rafts, which can drift into one another and into growing structures. Suppose such rafts do speed up bridging in a dish. Does that benefit carry over to the settings where fire ants actually bridge, such as across a stream?
A dish differs from open water in at least three ways. It is closed, and so a raft has nowhere to go except into the rim, another structure, or the food. It is radially symmetric, and so every launch point on the rim faces the food, and proto-bridges converge on one another as they grow inward. It is also still, with no current. Along a bank, none of these holds. If the raft effect comes from confinement, a model that produces it in a dish should lose much of it in an unconfined arena, and that loss shows up as a rafting × confinement interaction. The excursion therefore poses the question as a 2 × 2 factorial design, in which the interaction term, not either main effect by itself, answers it.
Arenas
Space is a square lattice whose cells are about one worker body length (taken as 3 mm), with one structural ant per water cell. The gap is the number of water cells between the shore and the target, 20 by default (about 6 cm, the rim-to-food distance of a 15 cm dish with a 3 cm food drop).
- Confined: a circular dish of radius R = gap + target radius, with a rim two cells wide on which ants walk, and the food as a disk at the center, and so every rim point is equally far from the food. Two controls break that equality while keeping the dish closed. The food can be moved off center, with the dish growing by the same amount so that its nearest rim stays one gap from the food, and the dish can be a square, whose corners lie farther from the food than the middles of its sides.
- Unconfined: a straight shore two cells deep whose length equals the dish's rim circumference, so that the same forager pool is spread at the same density per unit of shoreline. By default, it faces a far bank at the same gap (a river crossing, in which every shore point is as near the target as every rim point is to the dish's food). The alternative target is a food item of the dish's size, at the same distance from the shore, in open water. The water is open at the arena's ends (and, for the food-item target, beyond it): a raft that drifts out is lost unless edges are set to reflect.
Confinement in this design therefore bundles closure, convergent geometry, and still water. The geometry controls let you take these apart: set the unconfined edges to reflect to remove the loss of rafts, add current to make the open arena more river-like, switch the target to see what radial convergence alone contributes, or move the food off center (or square the dish) to make the rim points unequal while the dish stays closed.
Rules, applied once per step
- Recruitment. Each forager in the pool of N enters a random shore cell with probability rin; a walker on the shore returns to the pool with probability rout.
- Walking. A walker moves to one of its four neighbors that it can stand on (shore, structure, or target) or stays put, with weights exp(−b Δd), where d is the distance to the target's edge. With walking bias fades with scent on, b is multiplied by min{1, exp[(gap − d)/λ]}, and so walkers farther than one gap from the target feel the pull e-fold more weakly every λ cells, as a fading scent would allow. A walker that reaches the target feeds and returns to the pool.
- Joining. Before moving, a walker tries one random neighbor; if it is open water, the walker links onto it with probability
pjoin(d) = min{1, p0 · exp[(gap − d) / λ]}
and becomes a structural ant. At the shoreline, this equals p0, and it rises toward the target; that rise stands in for the local scent cue.
- Locking and release. A structural ant is held while a walker stands on it and for τ steps afterward, and also whenever at least k of its four neighbors are structural ants. Otherwise, it lets go with probability prel and swims back to the pool.
- Connectivity. The structure is split into connected pieces. A piece that touches the shore or the target is anchored; the bridge is complete as soon as one piece touches both.
- The treatment: what happens to a piece that touches neither.
- No rafts: it disperses at once, and its ants return to the pool.
- Rafts: it persists as a raft. Each step, a raft of m ants moves one cell with probability D0/mγ (pushed downstream with probability equal to the current, in the unconfined arena), carrying any walkers on it. It merges with whatever it touches: a raft that reaches a proto-bridge extends it, and one that reaches the target anchors there. In addition, an anchor (a structural ant touching the shore) with no traffic lets go of the shore with probability pcalve, even when its neighbors would otherwise hold it, and so idle clusters can break away whole.
- Recruitment (optional, off by default). Each walker remembers the highest join probability it has met, with the memory fading at the evaporation rate, and marks its cell each step in proportion to that memory; the trail stays between 0 and 1 and fades at the same rate. Two switches let the trail act separately. With recruit along trail, each new forager enters a shore cell with weight eκ·trail, which stands in for nestmates led out along a trail to a site where a bridge looks promising. With trail raises joining, an ant's join probability is multiplied by eη·trail at its cell, capped at 1. Ants already in the arena do not follow the trail: on this lattice, every cluster an ant stands on becomes marked, and following the marks only traps walkers on their own cluster.
The defaults were tuned for one thing only: that rafting clearly speeds bridging in the dish, so that the question about confinement has an effect to ask about. In checks with 100 replicates per condition, the defaults give a raft speedup of about 1.5× in the dish and about 0.9× (a slight slowdown) in the unconfined far-bank arena. Nearby settings of the scent length, raft mobility, and anchor release rate that keep the dish speedup near 1.5× put the unconfined speedup anywhere from about 0.9× to 1.2×, and so the size of the interaction, unlike its direction, is not robust in this model. None of these values is fitted to a measurement.
Choosing the response
The natural outcome is the time to completion T, the step at which shore and target are first connected. Runs that have not finished by Tmax are stopped. As every run shares the same horizon, this is administrative censoring: a run that fails to finish is known only to need more than Tmax steps. Each of the four responses below turns a run into one number, and the tests compare the means of those numbers across the four conditions.
- Log restricted completion time, ln min(T, Tmax), the default. For each run, this is simply the log of the restricted completion time described next. Taking the log makes effects proportional, and so a difference in baseline speed between the arenas does not by itself produce an interaction. Because the mean of the logs is the log of the condition's geometric-mean restricted time, a difference between two means is the log of a ratio of times.
- Restricted completion time, min(T, Tmax), in steps. A condition's mean of this is exactly its restricted mean completion time (RMST) up to Tmax, a standard survival estimand, rather than an ad hoc fill-in for missing values. Effects are differences in steps, which makes the interaction hard to read when the arenas differ in baseline speed, as explained below.
- Log time to half span, ln min(T½, Tmax), where T½ is the step at which the span first reaches 50%. Runs are censored far less often on this response, and it captures early growth rather than the final connection.
- Completed by Tmax, 1 if the bridge was finished and 0 if not. A condition's mean of this is its completion proportion. The tests here treat it as a linear probability model; a logistic model in R is the better choice for a 0/1 outcome.
The default analysis is on the log scale. A raft speedup is naturally a ratio, and the two arenas need not share a baseline speed. On the raw scale, the same proportional speedup in a slow arena and a fast one yields a nonzero interaction purely because the baselines differ. On the log scale, the interaction contrast is the log of a ratio of speedups:
speeduparena = exp[ mean ln Tno rafts − mean ln Trafts ]
interaction ratio = speedupconfined / speedupunconfined
An interaction ratio near 1 says rafts help equally in both arenas, and a ratio well above 1 says the dish amplifies the raft effect.
The restricted responses compress differences when many runs are censored, and so the batch reports censoring counts for every condition; if they are large, raise Tmax or use the half-span response.
Tests
- Two-way ANOVA with F tests for rafting, confinement, and their interaction. The design is balanced, and so sequential and marginal sums of squares coincide.
- Freedman–Lane permutation test of the interaction. Fit the additive model, permute its residuals, add them back to the additive fit, and recompute the interaction F. This keeps the test valid when the errors are skewed or heavy tailed, as completion times often are, even on the log scale.
- Stratified permutation tests of the raft effect within each arena, permuting raft labels among the runs of that arena only. These answer the more direct question of whether rafts matter at all once the dish is gone.
The cumulative completion curves on the batch tab are one minus the Kaplan–Meier survival curves (with all censoring at Tmax, they are simply empirical distribution functions). In the exported CSV, T and event are ready for a Cox model or an accelerated failure time model with an interaction term; with a lognormal AFT, the interaction coefficient is the log interaction ratio defined above. The R code on the batch tab does both.
The same machinery doubles as a rough power analysis for an empirical version: rerun the batch several times, each with a different base seed and with the number of colonies a lab could realistically test per condition (say 6 to 10), and see how often the interaction is detected. An empirical analogue of the unconfined arm could be a long, narrow trough with food or a far bank across its width, in which rafts can drift away from the launch site.
Caveats
- The model is a single-layer lattice; real pontoon bridges are thick and multilayered, and real rafts deform.
- Steps are not seconds, and the parameters are illustrative, not calibrated; absolute times mean nothing, and only the comparison among the four cells carries information.
- Recruitment is a coarse stand-in. Real recruiters lay trail on their way back from food, which here is reachable only once the bridge is complete, and so the model's trail is laid from each ant's memory of a promising site instead. Results with recruitment on depend on its gains; compare a range of them rather than relying on one value. In checks with 40 replicates per condition, recruitment along the trail shrank the raft speedup in the centered dish from about 1.6× to 1.2× at κ = 10, and removed it at κ = 15; recruitment also turned the off-center dish from the slowest case into one at least as fast as the centered dish. Any symmetry-breaking feedback the real ants have may therefore do the job this model gives to rafts. The recruitment sweep on the batch tab reruns the 2 × 2 across a list of gains and plots the raft speedup in each arena against the gain.
- Rafts here drift passively. If ants on a raft could steer toward scent, rafts would reach the target more often in open water too, and the interaction would shrink.
- Results can be sensitive to the parameters, and the sign of the raft effect in the unconfined arena can change with the anchor release rate and current. That sensitivity is itself an argument for testing the interaction empirically rather than assuming the dish result generalizes.