Oran Ayalon

Yigal Sternklar

Ehud Fonio

Amos Korman

Nir Gov

Ofer Feinerman

Sequential Decision-making in Ants and Implications to the Evidence Accumulation Decision Model

Keywords:

Cooperative transport of large food loads by Paratrechina longicornis ants demands repeated decision-making. Inspired by the Evidence Accumulation (EA) model classically used to describe decision-making in the brain, we conducted a binary choice experiment where carrying ants rely on social information to choose between two paths. We found that the carried load performs a biased random walk that continuously alternates between the two options. We show that this motion constitutes a physical realization of the abstract EA model and exhibits an emergent version of the psychophysical Weber's law. In contrast to the EA model, we found that the load's random step size is not fixed but, rather, varies with both evidence and circumstances. Using theoretical modeling we show that variable step size expands the scope of the EA model from isolated to sequential decisions. We hypothesize that this phenomenon may also be relevant in neuronal circuits that perform sequential decisions.

I. INTRODUCTION

The capacity to decide between multiple options is key to the survival of any organism. Typically, decision-making was studied in an isolated, "single-shot" context where the process ends once a first choice has been taken [START_REF] Joshua | The neural basis of decision making[END_REF]. Under natural conditions, however, animals often diverge from this static description and exhibit dynamic behaviors where decisions change from time to time according to external conditions and internal states [2][3][4][5][6][7]. Sequential decisionmaking is particularly relevant to foraging behavior: Foragers in a patchy environment engage in an ongoing process wherein they continuously update their decision of whether to continue exploiting a dwindling patch or, rather, move on in search for more profitable locations [START_REF] Eric | Optimal foraging, the marginal value theorem[END_REF][START_REF] Ohashi | Efficient harvesting of renewing resources[END_REF][START_REF] Goldshtein | Reinforcement learning enables resource partitioning in foraging bats[END_REF]. Such decisions are often reflected in sharp transitions between local motions during exploitation and long-range displacements during exploration [START_REF] Adam J Calhoun | Maximally informative foraging by caenorhabditis elegans[END_REF]. The strong links between foraging and decision-making suggest that models originally developed to describe isolated decisions may be extended to capture dynamic decisions in natural foraging contexts [4,[START_REF] Adam J Calhoun | Maximally informative foraging by caenorhabditis elegans[END_REF][START_REF] Benjamin Y Hayden | Neuronal basis of sequential foraging decisions in a patchy environment[END_REF].

The "evidence accumulation" (EA) model [START_REF] Ratcliff | Diffusion decision model: Current issues and history[END_REF] constitutes a central neuroscientific paradigm and is supported by empirical evidence on both the mechanistic and the behavioral levels [START_REF] Joshua | The neural basis of decision making[END_REF][START_REF] Usher | The time course of perceptual choice: the leaky, competing accumulator model[END_REF]. The model describes a single binary decision which relies on incoming evidence and priors. It aims to capture electrophysiological measurements that indicate that the moment of decision is proceeded by a rise in neuronal firing rates up to some fixed threshold. In the model, these firing rates are represented by an abstract "decision variable", which integrates over the gathered evidence. As the evidence is typically noisy, the dynamics of this variable are approximated by a random walk. Asymmetric evidence which favors one decision over the other is modeled as a bias in this random walk and effectively makes the EA a drift-diffusion model. A decision is reached once the decision variable surpasses a given threshold [START_REF] Michael | Neural basis of a perceptual decision in the parietal cortex (area lip) of the rhesus monkey[END_REF][START_REF] Jeffrey | Neural basis of deciding, choosing and acting[END_REF].

The EA model was originally developed to describe isolated, single-shot decisions. However, there is no apparent reason that the networks and firing patterns discovered in these studies do not play a part in more dynamic scenarios. Indeed, rising firing rates and decision thresholds that are compatible with this model show up in recordings from monkey brains confronted with dynamic, foraging-inspired tasks [4,[START_REF] Benjamin Y Hayden | Neuronal basis of sequential foraging decisions in a patchy environment[END_REF]. Moreover, the EA model has been shown to provide a good approximation to C. elegans sequential decisions as it forages within a patchy environment [START_REF] Adam J Calhoun | Maximally informative foraging by caenorhabditis elegans[END_REF]. The EA model is therefore found to be relevant in a broader set of scenarios than those it was originally aimed to describe. This motivates further empirical and theoretical work, aimed at the expansion and refinement of this basic conceptual model [START_REF] Jacob | Foraging as an evidence accumulation process[END_REF].

The capacity to make decisions is not unique to individual animals but, rather, carries over to group-living animals, which exhibit consensus choices that preserve group cohesion [START_REF] Miller | Both information and social cohesion determine collective decisions in animal groups[END_REF][START_REF] David | Quorum responses and consensus decision making[END_REF]. Even more, by integrating over collectively available information, groups can reach decisions that are improved over those of its individual members [START_REF] Andrew | Many wrongs: the advantage of group navigation[END_REF][START_REF] Arganda | A common rule for decision making in animal collectives across species[END_REF][START_REF] Biro | From compromise to leadership in pigeon homing[END_REF][START_REF] Strandburg-Peshkin | Shared decision-making drives collective movement in wild baboons[END_REF]. Interestingly, there are many analogies between the decision-making mechanisms in animal groups and in the neuronal ensembles within the relevant decision-making areas in a single brain [START_REF] Iain D Couzin | Collective cognition in animal groups[END_REF][START_REF] Passino | Swarm cognition in honey bees[END_REF][START_REF] Thomas D Seeley | Stop signals provide cross inhibition in collective decision-making by honeybee swarms[END_REF][START_REF] Pagliara | Regulation of harvester ant foraging as a closed-loop excitable system[END_REF]. Among these analogies, the EA model has been shown to apply to consensus single-shot decisions taken by ants [START_REF] James Ar Marshall | On optimal decision-making in brains and social insect colonies[END_REF]. Here, we follow the decisions that ants take during a collective foraging task as an empirical means of revisiting the basic assumptions of the EA model in dynamic sequential scenarios and testing different modifications to this model [START_REF] Jacob | Foraging as an evidence accumulation process[END_REF].

We studied the decisions [START_REF] Fonio | A locally-blazed ant trail achieves efficient collective navigation despite limited information[END_REF] taken by a group of ants engaged in cooperative transport of food to the nest [START_REF] Tomer | Cooperative transport in ants (hymenoptera: Formicidae) and elsewhere[END_REF][START_REF] Ofer Feinerman | The physics of cooperative transport in groups of ants[END_REF]. To do this, we confronted the ants with a binary choice within an environment that constitutes a physical realization of the abstract EA model. This was achieved by placing the load within a one-dimensional track with two decoy exits, one at each end. The decoy exits' dimensions assure that while they serve as exits for individual ants they are too narrow to allow passage of the carried loads. Hence, in contrast to classical binary decision making protocols where a correct decision leads to immediate reward, in our case the decoy exits imply the withholding of reward. This induces a dynamic decision making process in which the cargo continuously alternates between the two possible choices. In the language of foraging theory, lingering near a decoy exit corresponds to exploitation while travelling the long distance between the two exits corresponds to an exploratory phase.

The ant behavior within the one-dimensional setup displays similarities to decision making processes by an individual animal. First, we demonstrate the emergence of a psychophysical Weber-like law [START_REF] Leon | Three psychophysical laws[END_REF] in this collective system. Second, we show that the motion of the carried cargo within the one-dimensional setup is highly reminiscent of dynamics of the EA model's decision variable. Importantly, we identified a critical deviation between the ants' behavior and classical EA dynamics that extends the scope of the evidence accumulation from isolated to sequential decisions. Namely, we find that incoming evidence controls not only the bias of the random motion but also its step size or persistence length. We further show how this correction emerges from an established microscopic model of the decisions taken by individual ants while engaged in cooperative transport [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF] and hypothesize that similar corrections may be apparent in neuronal circuits involved in sequential decision making. Finally, we show how the ants' behavior can occupy different regimes of decision-making space and theoretically argue that these correspond to differences in risk management.

II. RESULTS

A. Experimental Setup

We tracked Paratrechina longicornis ants as they collectively transport a large load towards their nest. Experiments included four load sizes with radii ranging from 0.2 cm and carried by a few individuals to 1.1 cm, carried by a few tens of ants (Fig. S1). To pare down the binary decision-making facet of this motion we confined the load to a long, rectangular cross section, channel (SI section S1) that has either one small exit at one of its ends or two identical exits, one at each end (Fig. 1). The exits were designed to be narrow enough to deny passage of anything larger than an ant.

We placed the channel near the entrance to the ants' nest such that its long dimension was orientated perpendicular to the direction to the ants' nest. In the two exit case, the channel was placed such that its two entrances were roughly at equal distances from the nest entrance. Experiments were initiated after a short recruitment stage in which we made sure that ants reach the load through all (i.e. either one or two) available exits. The ants' immediate goal at this stage is to cooperatively transport the load and deliver it through one of the exits to the nest [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]. Since neither of the two exits allows the load to pass, the ants are, in practice, denied of achieving this goal.

We video taped the transport process for about one hour at a rate of 25 frames per second. The resulting movies (see sample clip in Video 1) were then analyzed to extract load location as a function of time (Fig. 1), the occupation of the cargo by carrying ants (Figs.S2, S7, S9) and the net inward fluxes of ants through each of the two exits (Figs. S2,S3). For more details see SI section S2.

B. General motion characteristics

We find that when only one entrance was open, the load spent most of the time in its near vicinity (Fig. 1a1,b1). When the load did venture away from the entrance it travelled a random distance away, but once it changed its direction back towards the exit, it would usually travel all the way back (Fig. 1a2,b2). This behavior is evident in the spatial distribution of the load location which is an exponential that decays with the distance from the exit (see histograms in Fig. 1a2,b2). We find that the decay constant of this distribution grows with the load size (Fig. 2a), but is largely independent of the flux of ants through the single exit (see Fig. S4).

In the experiments where both entrances were open to ants, when the load ventured away from one exit it would traverse longer distances, which often spanned the entire channel, to reach the opposite side (Figs. 1c,d). Load motion, in these experiments, was more irregular for smaller loads which exhibited more frequent direction changes when compared to the larger loads (compare Figs. 1c2 and1d2). The influx of ants through the available exits (f H from the side with higher influx and f L from the side with lower influx) can be viewed as a proxy for the "evidence" in favor of approaching either one of the available exit routes. It is therefore interesting to check how the characteristics of the ants' collective motion depend on these influxes.

To do this we used the natural fluctuations that occur in the influx of ants within an experiment and in between experiments (Fig. S3). While these fluctuations average out over long time-scales, fluxes remain relatively stable over periods of ∼ 15min (Fig. S3, SI section S3). Therefore, throughout this work, we quantify the effect ant flux on the characteristics of the collective motion by analyzing consecutive, non-overlapping 15 minute time windows.

We found that, for all load sizes, the load tended to spend longer times near the exit with the higher ant influx (Fig. 2b). We defined T H to be the fraction of time that the load spent near (i.e. within 10 cm) the exit through which there is higher ant influx, and T L the fraction of time near the exit with lower influx. The curves in Fig. 2b are not fits to the measured data points, but are calculated theoretically using the run-and-tumble model (Eqs. S56-S59), and rely on the exponential fits to the turning probabilities (λ) as function of f rel (Fig. 3a).

We find that the relative time (T rel = T H -T L T H +T L monotonously increases with the relative flux of ants, 2b). While this increase was near-linear for the load of radius 0.62 [cm], we observe a sub-linear increase for the larger load (1.1 [cm]) and super-linear increase for the smaller load one of radius 0.28 [cm] (Fig. 2b).

f rel = f H -f L f H +f L , (Fig.
In Fig. 2b, we did not include the experimental data for the smallest object (r = 0.2cm). This is since objects of this size were observed to spend extended time periods moving up and down the closed end of the channel. Such motion along a barrier with an opening was observed in previous studies [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF][START_REF] Jonathan E Ron | Bi-stability in cooperative transport by ants in the presence of obstacles[END_REF], and emphasizes that near the ends of the channel the motion of the smallest object was distinctly non-one-dimensional (with respect to the channel's long axis). The time spent by this object near the ends was therefore much longer, and incomparable to the time spent at the ends by the larger objects (which moved in a quasi-one-dimensional manner along the channel length, and near the ends) nor to the our one-dimensional models as presened below.

C. Collective motion as a decision process

We interpret the cargo's motion as a binary choice between the two alternative exit routes. This interpretation allows us to approach the collective motion through the prism of well-established neuronal decision-making models. In this section we present the relations between the assumptions of the EA model and the properties of our experimental system. We then point to similarities and differences between EA model predictions and the ants' empirical motion.

A first assumption of the EA model is that information is integrated by accumulating fragments of evidence, each of which supports one or the other decision. These evidence fragments are analogous to the small quanta of information that individual ant attachments provide the carrying group [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]. Further, since most newly-attached ants are "informed" [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF], and tend to guide (pull) the group towards the direction from which they approached [START_REF] Fonio | A locally-blazed ant trail achieves efficient collective navigation despite limited information[END_REF], differences in ant fluxes through the two exits translate to asymmetric evidence in the EA model.

A second EA model assumption is that the evidence is additively accumulated by an abstract one-dimensional decision variable that performs a random walk, which is biased in the presence of asymmetric evidence. A main advantage of the ant system is that, unlike brains, the analog of the abstract decision variable is readily and directly measurable as the location of the load. The dynamics of this decision variable are manifested as the load's motion.

The last major assumption of the EA model is that a decision occurs once the decision variable reaches a threshold value. Viewing the load motion as a decision-making process we define a decision as the presence of the load in the vicinity of one of the two exits. We note that since in our experimental system both decisions lead to impassable routes, no reward is ever provided and decisions are ongoing rather than restricted to a single shot.

Since dynamic sequential decisions need not be qualitatively different from single-shot, isolated decisions, it is not a far-fetched assumption that they share the same underlying principles [6]. It is therefore of interest to explore the possibility of extending the EA model to include ongoing, sequential decisions.

Our experimental system therefore complies with many of the model's assumptions. While this fact may not be surprising per se, it does allow for a comparison between the ants' collective transport dynamics to the EA model's predictions. An extreme scenario is one where only one of the exits is open. In this case, ant fluxes arrive only from the available direction such that the evidence for this side is overwhelming. Therefore, the EA model would predict a strongly biased random walk. This prediction is indeed compatible with the exponential distribution of the load location in the single alternative case (Figs. 1a-b).

The ant collective motion deviates from the predictions of the EA model when both exits are open. In this case, some evidence supports motion towards the right exit while, other, towards the left. Consider, for example, the case where the ant flux through one exit is much larger than the flux through the other. Since this is a small deviation from the single exit case, the EA model would predict a small change to the bias. We would therefore expect that the spatial distributions, while slightly wider, should still be localized near the dominant exit. Another way of looking at this is the following: for the three smaller loads the step size, as measured in the single sided experiments, is under 3cm (Figs. 2a) which is very small in comparison to the length of the entire system. In these cases, if there is a bias towards one of the openings then traversing the corridor would require a large number of steps against the bias and this is highly improbable. Nevertheless, our empirical observations are not compatible with this description. Indeed, even when ant fluxes are highly imbalanced the load often crosses the entire channel to reach the minority exit. This is even more pronounced for large objects where the sub-linear increase in relative time with respect to the relative flux, f rel , (Fig. 2b) implies that the minority option attracts the load for a disproportionately large fraction of the time. This constitutes a clear deviation between the predictions of the basic EA model and the ants' collective motion. In the following sources, we discuss the reasons for the deviations as well as the central role that it plays in facilitating sequential decision making in natural contexts.

D. Relative-flux affects both bias and step size

Next, we generalize the simple biased-random-walk version of the EA model, as to make it compatible with our empirical observations. To do this we take a more detailed view on the actual dynamics of the load's random motion.

The random motion of the load can be described by a run-and-tumble process (see SI section S4 and Eq. S54), in which the load either continues (runs) in its current direction or, with probability λ R,L per unit length, tumbles and switches direction (turns to the right/left respectively). The inverse of the tumbling probabilities is the persistence length (the average step-size between consecutive tumbles) in each direction.

The run-and-tumble model provides a good description of the one-side experiments. In this case, the probability to turn away from the exit is essentially zero, so only one value of λ is finite. Hence, the decay constant of the exponential distributions in Figs. 1(a1,b1) is simply the persistence length for the motion away from the exit, or λ -1 (Fig. 2a).

When both exits are open, we find that the turning probabilities λ R,L vary not only with object size but also with the signed relative flux of ants, f rel , (Fig. 3a). The signed relative flux is defined as

f rel = f T -f A f T +f
A where f T is the ant influx through the exit towards which the load is heading and f A is the influx through the exit it is heading away from. The relative flux, as defined above, is simply the absolute value of the signed relative flux. The clear dependence of turning probabilities on f rel is consistent with the fact that the ants' decision making depends on this variable. Indeed, turning rate data shows that turning rates are more informatively described by relative flux (Fig. 2b) than by flux differences (Fig. S5a,b), and that this holds for all load sizes. This finding implies that, similar to previous observations [START_REF] Reina | Psychophysical laws and the superorganism[END_REF][START_REF] Sasaki | The psychology of superorganisms: collective decision making by insect societies[END_REF], here too the ants as a group follow a form of Weber-like psychophysical rule and are sensitive to the relative differences in the relevant stimuli.

Notably, the probability to turn away from the exit with the larger signed relative flux (positive f rel ) is significantly (exponentially) smaller than the probability to turn towards it (negative f rel ). We quantified the dependence of the measured turning rates on f rel using exponential fits (Fig. 3a, Eq. S58). We then used these fits to assess the effect of these probabilities on the global decision-making parameters. We find that the relative time spent near each side as a function of f rel , as calculated using the run-and-tumble model (Eqs. S57, S59), stands in agreement with the experimental data for any load size (Fig. 2b).

To connect these findings to the language of biased random walks, typically employed in EA models, we derive the following mapping (SI section S4):

s = 1 λ R + λ L ; b = 1 2 λ R -λ L λ R + λ L . (1)
We find that the bias b (Fig. 3b), and the average step size s (Fig. 3c), depend on f rel and on load size. Note that for the largest object (blue data points in Fig. 3b) we have not observed any instances where the direction of motion switches against the bias in the influx of ants (Correspondingly, there are also no data points with positive f rel in Fig. 3a). This means that one of the lambdas that we extract from this data is zero, and when substituted in Eq.1 gives a bias of 0.5 (Fig. 3b). The lines in Fig. 3b show the bias as calculated from the exponential fits to the experimental data in Fig. 3a, they are not fitted to the data in Fig. 3b. For the largest objects the step-size is larger than the length of the channel at low bias (Fig. 3c), which makes it difficult to obtain the intrinsic run-and-tumble parameters of the motion from the experimental data.

The variations in the step size allow the ants to tune their behavior and, depending on the bias either repeatably visit both sides of the channel or remain confined to an area near the exit with the higher flux (Fig. 3d). By comparison, a simulated random walker which has control over bias alone is limited: if its step size is small compared to the tube length (say 10cm, compared to the tube of length 55cm, which applies to all load sizes from the data with a single open exit (Fig. 2a)), the object fully commits to the majority exit even if the bias is merely ∼ 0.2. In other words, a modest bias prevents the ants from exploring the other exit (white area on the top-left side of Fig. 3d). On the other extreme, if the step size is large (say 50cm), the ants continue to explore both exits when the bias is intermediate (black area on the right side of Fig. 3d), which may be useful if both exits are open but wasteful,if one exit is completely closed .

FIG. 3:

Collective load motion as a random walk. a. Turning probability per cm, λ, as a function of the signed relative flux, f rel . Full lines are exponential fits (Eqs.S58) and display larger slopes for larger loads. Data points at the two extremes (+ symbols in panels a-c) represent data from one exit experiments. b. Bias of the random motion as a function of f rel . The Bias is calculated using the turning probabilities found in panel a, and Eq.1. The bias, b, decreases when the fluxes from both sides become similar. The full lines are the theoretical curves calculated with the use of the λ dependencies as found in a and assuming a run-and-tumble model (see Eq.S61). c. Mean step size, s, as a function of f rel . Step size is calculated using the turning probabilities found in panel a, and Eq.1. The step size increases when the fluxes through both exits are similar. The brown horizontal line denotes the size of the system. Full lines are the theoretical curves calculated by using of the λ dependencies found in panel a. and assuming a run-and-tumble model (see Eq. S60). d. Relative time advantage in favor of the dominant exit (color coded) as a function of both bias and step size. These were calculated by simulating a 1D biased random walk, with a exponentially distributed step size (whose mean value is denoted on the x-axis) and constant bias (y-axis), that is bound within a 55 cm domain. Overlaid on the graph are lines which indicate the relation between bias and step size for the different load sizes (as deduced from panels b and c). Color code in all panels as specified in panel a. .

Compared to this hypothetical random walker, the ants exhibit a more flexible behavior that depends on the cargo size (see colored lines in Fig. 3d). For small cargoes (black curve in Fig. 3d), the small step size means that a modest bias commits the ants to the majority exit. This may be useful, as for a small cargo its less crucial to find the correct (optimal) path, since it is highly likely that due to its size it can eventually pass through both routes. However, for larger cargoes (see, for example, red curve in Fig. 3d) the ants use a large step-size even for intermediate biases and this allows them to thoroughly explore both exits. In this way, the large cargo, which is difficult to transport, fully explores the available paths to find a traversable route. Only when the bias is very large, the ants reduce the step-size of the large cargo and this allows them to commit to the probable exit and avoid wasting time at the closed side. In subsection F (below) we present an abstract quantitative model to study the optimal balance between the time invested at each exit under different circumstances.

Hence, decision making and time balancing are direct consequences of the effect of f rel on step size. Specifically, a larger step size when the fluxes from both exits are similar allow the ants to collectively explore both options (Fig. 3c). The condition that gives rise to a monotonous increase in step size, s, as f rel decreases from a value of 1 (the single side case) to 0 (the two-option cases) is that λ is a convex function in f rel . In other words, the condition that ds/df rel < 0, translates into (using Eq. 1):λ (f rel ) > λ (-f rel ), which indeed holds for the measured exponential dependencies shown in Fig. 3a.

In the next section we present a microscopic, mechanical model of individual ant forces and decisions [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF] and tune it to fit the experimental results. We then use this model to explain two central aspects of the ant decision making process: the emergence of Weber's law and the exponential dependence of the turning rate on f rel .

E. Microscopic theory

We turn to investigate the emergent collective behaviour observed in the experiments described above, using an established microscopic model [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]. In accordance with the quasi-one-dimensional nature of our experimental setup we employed a one-dimensional version of the two-dimensional model used in previous studies [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF][START_REF] Jonathan E Ron | Bi-stability in cooperative transport by ants in the presence of obstacles[END_REF][START_REF] Gelblum | Emergent oscillations assist obstacle negotiation during ant cooperative transport[END_REF]. The one dimensional model employs a simplified object with just a front and a back which moves on a line. The adjustments made to reduce the two dimensional system into a 1D model are explained in detail in SI section S5.

The model is based on the experimental observation that ants attached to the object either pull or lift it. In calculating the net force we ignore the lifters' contribution whose effect is a reduction in friction that is usually saturated, and assume that each puller applies a force whose magnitude is constant -f 0 . The total number of binding sites on each side of the one-dimensional objects is denoted by N , which is proportional to the object size. We further assume that ants can only pull towards the side to which they are attached [START_REF] Gelblum | Emergent oscillations assist obstacle negotiation during ant cooperative transport[END_REF]. The net force is then simply F = f 0 (n R -n L ) with n R/L being the number of pullers on the right/left. The speed of the object, v, is proportional to the net force exerted on it, F [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF].

In the model, carrying ants can change their role between puller and lifter. The rate at which an individual ant switches her role depends on the size and direction of the total force, as exerted by all other ants, with respect to the body axis of the ant [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]:

r R p→l = k 1 1 + e F F ind = k 1 1 + e β∆n ; r R l→p = k 1 1 + e -F F ind = k 1 1 + e -β∆n r L p→l = k 1 1 + e -F F ind = k 1 1 + e -β∆n ; r L l→p = k 1 1 + e F F ind = k 1 1 + e β∆n ;
(2) where r R p→l , for example, is the rate at which a puller on the right becomes a lifter, and k is a constant with dimensions of [1/time]. The parameter F ind acts as a temperature analogue, and determines the degree to which an ant tends to align with the total force exerted by the rest of the group. We further use the notations β = f 0 /F ind and ∆n = n R -n L . With this choice of rates ants are more likely to align themselves in a way that maximizes the total force, F , as they spontaneously form an ordered state below a critical value of F ind , or above a critical total number of ants [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF].

The role-changing rates specified in Eqs.2 apply only to ants which are attached to the object. However, ants come and go, and those who have only just latched onto the object have a predetermined preferred direction in which to take the object. These ants, which arrive from the scent trail, are called "informed", and upon attachment choose their role such that they only pull in the direction from which they had arrived (or lift if they happen to attach on the opposite side of the object). Informed ants become regular carrying ants, at a constant rate k f orget (corresponding to an average time of ∼ 10 -15sec, [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]), and are then governed by Eqs.2.

We simulated the 1D model and calibrated its parameters by comparing the results to one-side-open experimental data. The model reasonably reproduces the trajectories (compare Fig. 4a to Figs. 1a2,b2), velocity and spatial distributions (Figs. S10, S11), albeit less successfully for smaller objects where a 1D approximation is, indeed, expected to be less accurate. The model further captures the length-scale of the spatial distribution of the cargo away from the single exit, and qualitatively reproduces the empirical dependence on cargo size (compare Fig. 4c, to Fig. 2a). Having fixed the model parameters we then turned to simulate the more complex scenario where the exits at both sides are open and informed ants arrive from both ends. In our model the fluxes of the ants entering from each exit, appear as the rates of informed ants that attempt to attach onto the cargo, from either side. We assume that these attachment rates are proportional to the ant fluxes that enter the tube, as measured in the experiments (see SI section S5). Typical trajectories from the simulations are shown in Fig. 4b, where we find that both small and large cargoes traverse the entire length of the set-up (compare to experimental trajectories in Fig. 1c2,d2). The simulated trajectories were used to calculate the durations in which the object stayed near each exit. Similar to the experiments, we find a transition from super-linear to sub-linear dependence of the relative time difference on the relative flux, f rel , as the cargo size increases (compare Fig. 4d with Fig. 2b).

Beyond the global features of the trajectories, described above, the simulations also capture their microscopic underpinnings. A key ingredient of the motion is the dependence of turning rates on the ant fluxes from both sides. Similar to the experimental results (Fig. 2b,3a-c), the simulated data show that, when calculating turning rates (Fig. S12), signed relative flux is a more informative variable than flux difference (see Fig. S5c,d). This result provides us with further evidence regarding the applicability of Weber's law to this decision making system. Furthermore, the simulations reproduce the approximate exponential dependence of the turning rate on the f rel (Fig. 4e), and on cargo size.

In SI section S6, we present a simplified version of our model which is analytically solvable. In this simplified version the cargo is fully occupied by the ants, with fixed occupation, and the informed ants are treated as an external force [START_REF] Jonathan E Ron | Bi-stability in cooperative transport by ants in the presence of obstacles[END_REF][START_REF] Gelblum | Emergent oscillations assist obstacle negotiation during ant cooperative transport[END_REF]. We use this simplified model to calculate the turning rates, by analyzing an escape process in velocity-space [START_REF] Pinkoviezky | Collective conflict resolution in groups on the move[END_REF] described by Kramers theory [START_REF] Risken | Fokker-planck equation[END_REF]. This approximation should be valid at low temperatures, in the phase where the ants are coordinated. We obtain the following approximate analytic expression for the turning rate when the ant fluxes from both sides are equal, f rel = 0 (Eq.S88)

r Kramer (f rel = 0) ∼ k π e -2N βN 2 e -βN 2 (3)
This equation gives the dependence of the turning rate on the size of the object (number of ants N ) and the inverse temperature (β) and stands in reasonable agreement with the simulated turning rates (Fig. S13). Next, we calculated the effect of non-zero values of f rel on the turning rate, where the fluxes from each exit determine the average occupation by both uninformed and informed ants on each side. When the flux through a particular exit is large, both of these effects bias the motion in the same direction. The difference in uninformed ants induces a shift in the total number of ants on one side when compared to the other: N and N -δ N , respectively. The effect of a difference in the number of informed ants induces a net external force that is proportional to:

δ = n R -n L .
From our analytic approximation of the turning rate (Eq.3) we find that each of these effects modifies the turning rate in a simple exponential manner (see details in the SI section S6)

r Kramer (δ, δ N ) = r Kramer (f rel = 0)e -(δ+δ N )( β 2 +2) (4)
where the sign in the exponential changes if the turning is towards or against the bias. Using the full one-dimensional simulation model, we calculated the average occupation of informed and uninformed ants as a function of the fluxes of ants that enter from the two exits (SI section S7, Eqs.S110), and use it to write δ and δ N as functions of the incoming fluxes (Eqs.S117,S118). These turn out to be (in the limit of an object saturated by attached ants, as in the experiments)

δ, δ N ∝ f R -f L f R + f L = f rel (5)
where f R/L are the fluxes of ants ant sec coming from the right/left opening. Substituting Eq.5 in Eq.4 brings us to the conclusion that the turning rates depend on ant fluxes through f rel (Eqs. 4,5). This suggests an explanation for Weber's law found in the simulations (Fig. 4d,e) and, specifically, for the fact that the turning rates exhibit an exponential dependence on the f rel (Fig. 4e).

We can give an intuitive explanation for the result given in Eq.5, which relates the extent of the bias in the cargo motion to the signed relative flux. The bias in the motion depends on an imbalance of pulling ants on each end of the object (see SI section S7). The number of pulling ants on each side is naturally proportional to the flux of informed ants arriving from the exit that faces this side. However, any resulting bias is diminished by uninformed ants attaching evenly on both sides, and informed ants "leaking" from the opposite side (which act as pullers). These latter processes increase with the total flux from both sides, and diminish the bias of pulling ants towards the exit with the larger flux. The average number of pullers on each side is therefore given by the flux entering from that side, divided by an additive combination of both fluxes (Eqs.S110). The difference between the average number of pullers on both sides, in the limit of an object that is saturated with ants, is therefore found to be proportional to f rel (Eq.5), and directly enters the turning rates due to Kramers theorem (Eq.4).

Note that the dependence of the response on the signed relative flux f rel is another form of Fold-Change Detection (FCD), which is observed in biology on different scales, from bacteria to humans [START_REF] Adler | Fold-change detection in biological systems[END_REF]. This property provides a beneficial increase in the dynamic range over which the system is sensitive to changes in the environment. It requires different mechanisms for its realization in different biological contexts, and is never exact. In our system, it emerges only in the limit in which the load is saturated by ants (Eqs.S117,S118).

The microscopic model used here was originally developed to describe the free transport of cargo along a single scent trail [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF]. The fact that this model also captures the collective motion of the ants in the presence of two opposing scent trails is therefore a non-trivial result. Rather, this supports the idea that individual ants are not aware of the conflict nor of the fact that they are part of a collective decision making process. The ants follow simple behavioral rules as if they were transporting the food item along a single, well-defined path towards the nest. The collective decision making dynamics evident on the scale of the entire group is an emergent phenomenon.

F. Algorithmic considerations in sequential decisions

We now explore optimal strategies for an agent faced with a dilemma that is similar to that of the ants. We will do this by considering an abstract dilemma, and compare the optimal strategies to the observed behavior of the ants. This will allow us to assess the efficiency of the ants' behavior.

The basic EA model assumes exclusive investment in the exit with more evidence [START_REF] Michael | Neural basis of a perceptual decision in the parietal cortex (area lip) of the rhesus monkey[END_REF]. This is clearly the optimal course of action for a single-shot decision. In our experimental set-up the ants act differently: they repeatedly sample both sides of the arena, where the relative fraction of time invested in each side depends both on evidence (fluxes) and on load size (Fig. 2b). In general, back-and-forth motion of the kind exhibited by the ants is common in dynamic scenarios in which every decision is followed by an immediate reward or feedback. One example includes foraging on a replenishing food source where the animal revisits depleted food patches after they have replenished [START_REF] Goldshtein | Reinforcement learning enables resource partitioning in foraging bats[END_REF]. In other cases, animals may repeatedly visit food sources to gather information regarding the probability of reward [START_REF] Tomer Ilan | The role of beginners luck in learning to prefer risky patches by socially foraging house sparrows[END_REF][START_REF] Chris R Reid | Decisionmaking without a brain: how an amoeboid organism solves the two-armed bandit[END_REF], and update their visitations accordingly. Such feedback-based strategies are thoroughly studied theoretically under the framework of multi-armed bandit problems [START_REF] Srivastava | On optimal foraging and multi-armed bandits[END_REF]. The ant behavior studied here is different as it includes no rewards. In fact, the only feedback that the ants get upon trying an exit is a negative one, indicated by the fact that they do not manage to cross the obstacle. In this sense, the ant scenario is similar to cases where animals search for sparse targets [START_REF] Feinerman | The ants problem[END_REF] and no positive feedback is available before finding the target.

To study dynamic decisions without reward we start by considering a toy model (SI section S8). This model is not meant to capture actual ant behavior; Rather, it aims to demonstrate how an optimal dynamic decision strategies may naturally lead to some of the key features evident in the ants' behavior. Namely, we will use the toy model to show that in the lack of reward, optimal strategies are expected to employ back-and-forth sampling. We will further show that the relative weight attributed to the minority evidence in the optimal sampling strategy varies with circumstances. Specifically, we wish to explain why in some cases we expect that the time spent near the minority opinion would be larger than its share of the evidence, while in other cases it would be smaller (as in Fig. 2b).

We first consider a simple scenario which would correspond to an extreme case of the model. Consider a person that has lost her key somewhere in an apartment. Reminiscing her past actions she reaches the conclusion that with probability q K = q the key is in the kitchen and with probability q L = 1 -q it is in the living room. During every minute of search in the "correct room", i.e., the room where the key is, she has some small constant chance, p, of recovering the lost key. The question is how should this person divide the time between the two rooms in order to find the key as quickly as possible.

Simplifying the setting, we assume that travelling between the kitchen and the living room incurs no time cost. We further restrict attention to "memoryless strategies" where in each minute, the kitchen is searched with probability α and the living room with probability 1 -α, for some 0 ≤ α ≤ 1 that completely specifies the strategy. The expected time, T (α), until the key is found is then:

T (α) = E(Time | key is in kitchen) • q K + E(Time | key is in living room) • q L = q K α • p + q L (1 -α) • p = 1 p q α + 1 -q 1 -α .
where E(Time | X) is the expected search time given the the key is in room X. It is easy to see that, in contrast to the case of a single isolated decision, investing all the time exclusively in one of the rooms is far from optimal and actually leads to infinitely long search times, T (0) = T (1) = ∞. Therefore minimizing search time requires that the search effort be partitioned between the two rooms. The value of α that minimizes the expected search time is independent of p, the probability to find the key per unit time, and is given by: α = 1

1-q q + 1 . (6)
To facilitate comparisons to the ant behavior we perform the following parameter transformation. We view q K and q L as the evidence for the key being in each of the rooms assuming, without loss of generality, that q K = q > 0.5. The relative evidence (analogous to the f rel as defined above) is therefore: (q K -q L )/(q K + q L ) = 2q -1. Similarly, the relative time difference in favor of the majority option is:

T rel = T K -T L T K +T L = α-(1-α) α+(1-α) = 2α -1.
The relation between these two relative variables is depicted by the blue curve in Fig. 5b. A first conclusion is that the relative time spent near the majority option is a monotone increasing function of the relative evidence. This property of repeated decision-making deviates from the results of the classic EA model which provides exclusive investment at the option suggested by the majority of evidence. More interestingly, Eq. (6) shows that the time invested searching a room is sub-linear in the probability that the key is there. In other words, the optimal strategy dictates that if there is a small probability of finding the key in a certain room, one should invest a dis-proportionally larger time searching there (blue curve in Fig. 5b). For example, if the probability that the key is in the living room is 0.05, (f rel = 0.9) then the fraction of time spent searching the living room is 0.19 (T rel = 0.62). There are therefore exactly four distinct obstacle combinations (central column). Circumvention time for symmetric obstacles is independent of strategy. However, for asymmetric obstacles (right hand column) an optimal circumvention strategy depends on external information encoded by the parameter q which specifies the probability that the easily traversable path is on the right. b. Optimal time balancing strategies. The relative difference in the time invested in one of the routes as a function of the relative evidence indicating it to be the easy route. Different colors signify different values of the parameter γ = p diff /peasy, the ratio between the traversal efficiency for the the two routes. γ = 0 corresponds to the case where only one route is traversable (equivalent to the key search example, see text) and displays sub-linear behavior: even very small evidence towards one route dictates large search times in that direction. Increasing the value of γ leads to super-linear behavior where evidence towards a route dictates little to no search time invested there.

Next, we generalize the aforementioned key-search scenario into a model which is more comparable with obstacle circumvention. The model describes an obstacle which can be bypassed via two routes (Fig. 5a, left column). We assume a simplified environment wherein each of these routes can be either "easy" or "difficult". An "easy" (respectively, "difficult") route means that it can be passed with probability p easy (respectively, p diff ) on each attempt, where p easy > p diff . The values of p easy and p diff depend on the context, but are assumed to be fixed and known. We define the parameter γ = p diff /p easy to describe the relative success rates. Note that the "lost key" example presented above is equivalent to choosing p diff = 0 (or, equivalently, γ = 0). In this simplified problem there are exactly four options for an obstacle which include the possible permutations of easy and difficult routes (Fig. 5a, central column). In cases where both passages are of equal difficulty, circumvention efficiency is independent of how time is partitioned between the two options and are thus not interesting. We therefore focus on the two asymmetric cases (Fig. 5a, central column, two central options) where one route is easy and the other is difficult.

What are the search strategies that minimize the circumvention time around asymmetric obstacles? If it is known which of the two asymmetric options one currently faces, the optimal decision would become trivial -simply invest all the time at the easy route. Similarly to the "lost key" example, when information is not perfect, the optimal strategy could benefit from external evidence which we model by the parameter q. This parameter signifies the probability that the route on the right hand side is the easy one (Fig. 5a, right column). Based on the parameters γ and q we seek the optimal way to partition time between the two routes. As in the aforementioned "lost key" example, we consider memoryless strategies where the right-hand route is approached with probability α, and the left-hand route is approached with probability 1 -α.

We find (see Fig. 5b and SI section S8) that the relative time invested in an option (say, the left route) rises with the evidence q pointing at this option. More interesting, we find that depending on the value of γ, the optimal relative time invested in this route can be either sub-linear or super-linear in the relative evidence (see Fig. 5b). For instance, when γ = 0, which is simply the "lost key" example, it is sub-linear, whereas for e.g., γ = 1/3 it is super-linear.

These results are qualitatively reminiscent of the empirical results presented in Fig. 2b. Indeed, note first that in our experimental setting, when evidence arrives at a load from some direction, then necessarily this implies that at least individual ants can pass through the corresponding route. Since the small load is not much larger than a single ant the probability that it passes through almost any passage with supporting evidence is large. This suggests that for small loads we expect that p diff is not far from 1, which implies that γ ≈ 1. In this case the model predicts super-linear behavior which is in line with the observation that ants that carry small loads tend to spend most of their time near the passage with the larger flux. Conversely, large loads are more similar in their dynamics to the model predictions when γ is small. This is consistent with the fact that the chances that a large load traverses a ragged route can be very small, i.e. p diff is near zero. Accordingly, and similarly to the predictions of the abstract model for the case of small γ, large loads tend to spend relatively long times near the minority opinion.

More intuitively, information about which of the two escape routes is favorable can often be uncertain. For small loads, the optimal course of action in this case is to spend long times at the direction with higher evidence. Even if the evidence is misleading the price to pay in terms of escape time is not large. In the case of large loads, attempting to escape through the inferior route may be highly costly in terms of time. In this case, it is algorithmically favorable to put less emphasis on the differences in information, and to alternate between the two options. It is notable that the ants emergent behavior at the level of the collective is in qualitative agreement with these optimal strategy considerations, although individual ants can not comprehend such considerations.

III. DISCUSSION

In this paper, we study ant collective decisions between binary choices with evidence pointing at either option. The study of collective decision-making in the context of ant groups confers several advantages. First, the compact arena size and the large number of individuals allow for the collection of large amounts of comprehensive and quantitative experimental data. Second, the existence of a reliable, quantitative model [START_REF] Gelblum | Ant groups optimally amplify the effect of transiently informed individuals[END_REF] for ant interactions during cooperative transport allows us to raise hypotheses and strengthen assumptions regarding the collective decision-making process. Finally, cooperative transport also imposes strong interactions between the carrying ants which in turn all move together as a single cohesive body. This stands in contrast to the more studied case where collective decisions are taken by migrating animal groups, which are less cohesive (more spatially distributed) and display sparser interaction networks [START_REF] Biro | From compromise to leadership in pigeon homing[END_REF][START_REF] Strandburg-Peshkin | Shared decision-making drives collective movement in wild baboons[END_REF][START_REF] James Ar Marshall | On optimal decision-making in brains and social insect colonies[END_REF]]. The ant system may therefore constitute a stronger analogy to the "super-organism" concept, whereby an animal collective displays behavioral characteristics which are shared with a single-brain [START_REF] Sasaki | The psychology of superorganisms: collective decision making by insect societies[END_REF].

In this vein, our setup may be viewed as a physical analogue of the abstract evidence accumulation (EA) model developed to study decision-making by single animals. However, in contrast to the isolated decisions to which this model is typically applied, here we tracked the ants for extended time periods which allow for a more dynamic behavior in which decisions are continuously updated. Rather than exclusively converging on the majority choice, we find that the ants continuously explore both alternatives in a manner that depends both on group size and on the relative flux of incoming information [START_REF] Iain D Couzin | Uninformed individuals promote democratic consensus in animal groups[END_REF]. It is particularly interesting that the weight given to the majority opinion may drastically change according to circumstances. For example, ants that carry a large load tend to extensively explore both options, even when significantly more evidence point at one of the exits. Conversely, ants that carry a small load tend to spend longer times at the option with more evidence, even if the extent of this majority is rather weak.

To understand the ants' behavior, we investigated three complementary models, describing the abstract, macro, and the micro scales, respectively:

On the abstract level, to qualitatively explain the range of observed behaviors, we developed an idealized theoretical model that describes general considerations in dynamic decision-making. This model is aimed at identifying the optimal fraction of time invested in the two options of a binary choice setting. Note that in single shot decisions, the answer to this question is trivial, and the optimal action is to follow the majority opinion. In contrast, for the dynamic setting studied here, we found that depending on the parameters of the problem, optimal strategies weigh the majority opinion in either a super-linear or a sub-linear manner.Because of its non-trivial predictions, it would be interesting to study applications of this simple decision-making model in other biological systems, including human behavior.

The abstract model suggests that the time allocated to each of the choices depends on the environmental statistics as well as the currently available information. One way in which the ants can achieve the desired flexibility is by applying a random walk in which both the bias and the step size are variable and depend on the evidence. This deviates from the basic formulation of the EA model where asymmetries in evidence are reflected in changes to the bias only. In accordance with this prediction, we found that, on this macro scale, ant behavior in different experimental regimes can indeed be described by a biased random walk where the bias and step-size both covary. In particular, we found that when the fluxes of incoming ants from both directions are nearly equal, such that the identity of the best route is uncertain, the step-size is maximal. This allows the group to explore both options more often, and may be beneficial in allowing for efficient solutions.

Finally, we showed how a random walk with varying bias and step size arises from an established microscopic model of cooperative transport. This model correctly predicts how the characteristics of the random walk vary with group size and with the relative evidence. We used this model to demonstrate that while the relative evidence for both sides, is not available to any individual, it is still perceived by the group as a whole, which processes this global information towards a collective decision [START_REF] Jonathan E Ron | Bi-stability in cooperative transport by ants in the presence of obstacles[END_REF]. This strengthens the case for a truly emergent decision-making process in this distributed ant system [START_REF] Feinerman | Individual versus collective cognition in social insects[END_REF].

Our experimental observations and microscopic model further demonstrate the emergence of a psychophysical law, Weber's law [START_REF] Reina | Psychophysical laws and the superorganism[END_REF]. Specifically, the group's collective motion is controlled by the relative flux of ants arriving from the two alternative paths. While Weber's law has previously been demonstrated in other group contexts, it is often difficult to infer whether it is not a simple consequence of relative perception on the scale of individual sensory systems [START_REF] Wolfhard Von Thienen | Pheromone communication in ants: a detailed analysis of concentration-dependent decisions in three species[END_REF][START_REF] Perna | Individual rules for trail pattern formation in argentine ants (linepithema humile)[END_REF][START_REF] Adam L Cronin | Ratio-dependent quantity discrimination in quorum sensing ants[END_REF]. In the ant collective choice system, Weber's law is a truly emergent property, as an individual ant most probably cannot assess the fluxes nor their relative difference [START_REF] Reina | Model of the best-of-n nest-site selection process in honeybees[END_REF][START_REF] Pais | A mechanism for value-sensitive decision-making[END_REF]. Finally, we wish to reflect on possible implications of the current work on the EA model. The EA model was originally proposed to describe isolated, single-shot, decisions, whereas the ants' in our study engage in a dynamic scenario, in which consecutive decisions must be taken. However, it is reasonable to assume that in practice, the decision-making process in a single-shot scenario would not be fundamentally different than the one used in more dynamic cases. Since tuning of the step size and the bias is useful in dynamic scenarios, we hypothesize that other systems functioning in dynamic conditions also employ such decision-making processes. In particular, we hypothesize that relative evidence can affect the dynamics of the abstract decision-making variable, as encoded in neuronal firing rates, by altering not only the bias of its random dynamics but also, concurrently, its step size. We further wish to stress, that in the context of neuroscience, varying step size may equivalently be achieved by modifying decision thresholds which have previously been suggested to be a tuning parameter important for speed/accuracy trade-offs [START_REF] Richard | Neural mechanisms of speed-accuracy tradeoff[END_REF].

Video 1. Sequential decision making during cooperative transport A clip of ants cooperatively transporting an object with a radius of 1.1 cm. The movie is about 10 minutes long but sped up 8 times. Th direction of the nest is to the top and ants enter the corridor from both the left and right hand sides/ The ant flux from the left hand side is larger than the flux from the right hand side.

A. Load tracking

The tracking of the load is enabled through first identifying and locating the load in the cameras frame of reference (in pixels), and then transforming to the tubes coordinate system (in centimeters). For each footage of experiment, we initially manually crop a small region of the frame around the load (Fig. S2a1,b1). Our program then identifies the inner shape of the load by using a green band pass filter (two green thin diameters for the two largest loads we worked with and a green circle for the two smallest ones) (Fig. S2a2,b2). For the larger loads, the center and orientation of the load is estimated through the orientation and intersection of the two thin diameters, found using a Hough transformation to the output of the filter (Fig. S2a3). For the smaller loads, the center of the load is estimated by fitting a circle to the output of the filter (Fig. S2b3).

The program crops and identifies the load through each frame in an area around the center of the load found at the previous frame. If the load passes through the center of the tube, the program will identify and crop the load in the footage of the 2nd camera. After running through the whole footage of the experiment, the program outputs a vector of the loads location (and orientation for the larger loads) per each frame, in pixels.

The tubes coordinates are chosen such that the x and y axis are parallel to the length and width of the tube accordingly. The transformation from the cameras frame of reference to the tubes frame of reference is done through the marked grid of small red spots on the board (Figs. S1,1). The transformation includes a rotation by the angle of the tilted tube referenced to the cameras frame, followed by a scaling that translates distances from pixels to centimeters. After transformation, we apply a smoothing algorithm to the full trajectory.

B. Ant flux identification and calculation

The fluxes of ants entering and exiting from both sides of the tube are calculated based only on the ants tracked movements within the two "corridors" of the tube. The corridor is the passageway that begins at one of the two ends of the tube and extends to the decoy exit (about 10 centimeters long) (Figs.1,S2c1,S1a).

The program identifies the ants using a two stage filter. The program first identifies the dark objects in the frame using a low pass band filter, followed by a second filter which filters the identified objects by physical attributes such as area and shape which characterize an ant (Fig. S2c2). The two filters parameters are dynamically fit to each footage depending on the frame resolution and illumination of the experiment (the cameras dont have the exact same height above the ground per each experiment).

We used a tracking algorithm written by Gelblum used in [START_REF] Joshua | The neural basis of decision making[END_REF], In order to track the identified ants within the corridors of the tube. The algorithm tracks the ants through the usage of the Hungarian method (also known as the Munkres assignment algorithm [2] (Fig. S2c3). Since the tracking is only done on a bounded area, each ant entering the corridor will be recognized with a new identity, while an ant that exists the region of the corridor will be considered lost.

The flux is calculated using a simple algorithm which concludes whether a tracked ant has entered or exited the tube. The algorithm uses a manually defined line which cuts the corridor vertically in the middle (Fig. S2c3). An ant is considered to enter/exit the tube, only if its tracked trajectory starts at a point located before/after the line (from the end of the tube), and finishes at a point after/before the line. The algorithm provides us four fluxes: Fluxes in and out from both sides of the tube. Since the fluxes fluctuate throughout the experiments (Fig. S3c), so will the dynamics of the loads trajectory. Over long times, the fluxes from both exits balance each other, blurring the random walk nature of the loads trajectory over the entire experiment (Fig. 1c1,d1 and Fig. S3a). Therefore, it is essential to slice up each experiment into smaller windows of time: the time window cannot be too large such that the average ant fluxes change enough to blur the exponential distribution, and it cannot be too small, such that adjacent windows of time cannot be considered uncorrelated (we assume the system has some response time which may depend on the fluxes and load size) or that the loads trajectory is too short in time for statistical analysis. It takes the loads about 1.5 minutes to travel from one end of the tube to the other (Fig. 1c2,d2), so that puts a lower bound on the time-window. We eventually picked a 15 minute time window, which correspond to ∼ 10 traversals of the channel by the cargo. This time-scale allows the spatial distribution of the cargo to reach a quasi-steady-state shape that is dependent on the average f rel , in the shape of an exponential distribution towards the exit with the larger flux (Fig. S3b). Indeed, during 15 minute time windows ants entered the tube according to a Poisson Distribution with a given mean value (Fig. S3d).

A related question in this respect is whether the ants indeed work by the same model for hours on end even though it doesn't help them get the food, and rather not change their strategy. Our previous works indeed point in this direction [3]. For the particular system described here, the ants were similarly tenacious in their strategy. Here are two instructive examples. In Fig. S4, we present a 140-minute-long, two-side experiment where the object tirelessly goes back and forth in the corridor, undertaking a repetitive motion that proves futile towards getting the object out of the corridor. In Fig. S5 we can present the spatial distribution of the load's location in a one-side experiment. The experiment was cut into two halves and the distribution was calculated to each separately. Both halves yielded approximately the same result, as would be expected if the ants do not change their strategy during the course of the experiment. Last, the fact there are incoming and outgoing fluxes, show that those are different ants toting the load at different times [START_REF] Joshua | The neural basis of decision making[END_REF] which corroborates that the system might have no memory of its past.

S4. ASYMMETRICAL RUN AND TUMBLE IN A ONE DIMENSIONAL CONFINED TUBE

We wish to describe the motion of the cargo, transported by the ants, as a one-dimensional run-and-tumble process within a bounded domain. Specifically, we aim to relate the steady-state spatial distribution of the cargo ρ(x), to the dynamics of the run-and-tumble motion. We start with the following premises:

1. The events of direction changes are described by a Poisson process.

2. The movement is characterised by the probability per unit length of changing direction: turning to the left λ L and to the right λ R . These turning probabilities per unit length are related to the persistence lengths, which are given by their inverse: λ -1 L and λ -1 R . 3. The cargo turns back (switches direction of motion) when reaching the ends of the channel.

Let there be a tube of length L along the interval [0, L], and let there be an object moving to the right inside the tube. What is the spatial distribution of finding the object at a position x inside the tube?

To calculate the probability of seeing the object in a position x, given it is moving to the right, we will think of the problem the following way: Let's say we have a video of the object moving to and fro in the tube and that we take out of it only the segments in which the object moved to the right. Now our video is a patchwork of segments of the original video. Now say we open the video at a random time and ask ourselves what is the probability that the object in the current frame is inside a ∆x vicinity around the position x. First we should ask ourselves what is the probability that the current frame belongs to a segment of length d that contains this position (i.e. a segment that contains a frame in which the object was at the said vicinity of x), and than what is the probability that we have picked the frame that indeed contains this position, given the said line segment. The former probability will be denoted by P 1 (d) which stands for the probability of picking a segment in which the object traversed a length of d that contains x (we will then sum over all possible lengths d); whereas the latter, i.e. the probability of picking the frame in which the object is at x out of a segment of length d, is simply ∆x d . We thus get:

ρ (x) ∆x =
all possible lengths d that contain x

P 1 (d) • ∆x d (S1)
To calculate P 1 (d) we will divide the total number of frames belonging to segments of lengths d by the total number of frames, or alternatively, we can talk in terms of the lengths as they are proportional to the number of frames, to write:

P 1 (d) = d • N • P 2 (d) total length traversed = d mean length • P 2 (d) (S2)
Where N is the total number of segments, and P 2 (d) is the probability that a segment of length d exists (namely, the number of segments of length d divided by N).

To calculate P 2 (d) we will first find the following probabilities:

1. Probability for changing a direction.

Probability of seeing two subsequent changes of directions separated by a length of d.

A. Probability of changing a direction

Finding integral equations for the probabilities

Let us introduce the following notation: P R (x) -The probability density that the object turned to the right at a point x, given that it had turned to the right.

P L (x) -The probability density that the object turned to the left at a point x, given that it had turned to the left.

We will look at an object moving to the right. The probability of its starting point being at x, is the probability of the previous change taking place at x + x and that the object moved a length of x to the left. Inside the tube:

P R (x) = P L (x + ∆x) λ R e -λ R ∆x ∆x + P L (x + 2∆x) λ R e -λ R 2∆x ∆x+ • • • + P L (L) λ R e -λ R (L-x) ∆x = n P L (x + n∆x) λ R e -λ R n∆x ∆x = e λ R x n P L (x + n∆x) λ R e -λ R (x+n∆x) ∆x → e λ R x L x P L (x ) λ R e -λ R x dx (S3)
At the edge we take all lengths which are longer than x for they all will end up truncated at the edge. In praxis we replace λ R e -λ R x ∆x by

∞ x λ R e -λ R x dx = e -λ R x : P R (0) = P L (∆x) e -λ R ∆x + P L (2∆x) e -λ R 2∆x + • • • + P L (L) e -λ R L = L/∆x n=1 P L (n∆x) e -λ R n∆x (S4) Let's define Y R (x ) =    L/∆x n=1 P L (n∆x) e -λ R n∆x , x = 0 0, otherwise (S5) and calculate ∞ -∞ Y R (x ) f (x ) dx = lim max({∆x i }) →0 ∞ i=1 Y R (x i ) f (x i ) ∆x i = lim max({∆x i }) →0 ∞ i=1 L/∆x n=1 δ x i ,0 P L (n∆x) e -λ R n∆x f (x i ) ∆x i = lim max({∆x i }) →0 L/∆x n=1 P L (n∆x) e -λ R n∆x f (0)∆x = f (0) lim ∆x→0 L/∆x n=1 P L (n∆x) e -λ R n∆x ∆x = f (0) L 0 P L (x) e -λ R x dx (S6)
Where f (x ) is an arbitrary function. We have just proved that

Y R (x) = δ (x) L 0 P L (x ) e -λ R x dx (S7) Let us further define p R (x) = e λ R x L x P L (x ) λ R e -λ R x dx (S8)
And we have

P R (x) = p R (x) + Y R (x) = e λ R x L x P L (x ) λ R e -λ R x dx + δ (x) L 0 P L (x ) e -λ R x dx (S9) Similarly P L (x) = p L (x) + Y L (x) = e -λ L x x 0 P R (x ) λ L e λ L x dx + δ (x -L) e -λ L L L 0 P R (x ) e λ L x dx (S10)

Solving the equations

Let us introduce two more notations:

a R = L 0 P L (x ) e -λ R x dx ; a L = e -λ L L L 0 P R (x ) e λ L x dx (S11)
And let's find the differential equations for p R and p L :

p R (x) = e λ R x L x P L (x ) λ R e -λ R x dx = e λ R x L x (p L (x ) + a L δ (x -L)) λ R e -λ R x dx = λ R e λ R x L x p L (x ) e -λ R x dx + λ R a L e λ R (x-L) (S12)
Taking the derivative of the above integral equation with respect to x gives

dp R dx -λ R p R = -λ R p L (S13) Similarly p L (x) = e -λ L x x 0 P R (x ) λ L e λ L x dx = e -λ L x x 0 (p R (x ) + a R δ (x)) λ L e λ L x dx = λ L e -λ L x x 0 p R (x ) e λ L x dx + a R λ L e -λ L x (S14) and dp L dx -λ L p L = -λ L p R (S15)
We've got

dp R dx = λ R (p R -p L ) dp L dx = λ L (p R -p L ) (S16) Defining ψ = p R -p L dp R dx = λ R ψ dp L dx = λ L ψ (S17)
Subtracting one from the other

dψ dx = (λ R -λ L ) ψ =⇒ ψ = Ae (λ R -λ L )x , otherwise B , λ R = λ L (S18) =⇒ p R = Aλ R λ R -λ L e (λ R -λ L )x + D , otherwise Bλ R x + C , λ R = λ L (S19) =⇒ p L = Aλ L λ R -λ L e (λ R -λ L )x + E , otherwise Bλ L x + F , λ R = λ L (S20)
The conditions to find the constants are

lim x→L p R (x) = lim x→L e λ R x L x P L (x ) λ R e -λ R x dx = lim x→L λ R e λ R x L x p L (x ) e -λ R x dx + λ R be λ R (x-L) = a L λ R (S21) lim x→0 p L (x) = lim x→0 e -λ L x x 0 P R (x ) λ L e λ L x dx (S22) = lim x→0 λ L e -λ L x x 0 p R (x ) e λ L x dx + aλ L e -λ L x = a R λ L (S23) lim x→0 p R (x) = lim x→0 e λ R x L x P L (x ) λ R e -λ R x dx = λ R L 0 P L (x ) e -λ R x dx = λ R a R (S24) lim x→L p L (x) = lim x→L e -λ L x x 0 P R (x ) λ L e λ L x dx = λ L e -λ L x L 0 P R (x ) e λ L x dx = λ L a L (S25) And lim x→0 dp R dx = lim x→0 λ R (p R -p L ) = a R λ R (λ R -λ L ) (S26) lim x→0 dp L dx = lim x→0 λ L (p R -p L ) = a R λ L (λ R -λ L ) (S27)
Demanding our solution satisfy these conditions gives

a R λ R (λ R -λ L ) = lim x→0 dp R dx = Aλ R , otherwise Bλ L , λ R = λ L (S28) a R λ L (λ R -λ L ) = lim x→0 dp L dx = Aλ L , otherwise Bλ L , λ R = λ L =⇒ A = a R (λ R -λ L ) ; (S29) B = a R λ R λ L (λ R -λ L ) = 0 (S30)
The solution so far is

p R = a R λ R e (λ R -λ L )x + D , otherwise C , λ R = λ L (S31) p L = a R λ L e (λ R -λ L )x + E , otherwise F , λ R = λ L (S32) Moving on a R λ L = lim x→0 p L (x) = a R λ L + E , otherwise F , λ R = λ L (S33) a R λ R = lim x→0 p R (x) = a R λ R + D , otherwise C , λ R = λ L (S34) =⇒ F = a R λ L ; C = a R λ R ; E = 0 ; D = 0 (S35)
And the solution becomes

p R = a R λ R e (λ R -λ L )x , otherwise a R λ R , λ R = λ L (S36) p L = a R λ L e (λ R -λ L )x , otherwise a R λ L , λ R = λ L (S37)
And since the solutions are continuous at λ R = λ L :

p R = a R λ R e (λ R -λ L )x (S38) p L = a R λ L e (λ R -λ L )x (S39) Let's find a R , a L : a R = L 0 P L (x ) e -λ R x dx = L 0 (p L (x ) + a L δ (x -L)) e -λ R x dx = L 0 p L (x ) e -λ R x dx + a L e -λ R L = L 0 a R λ L e (λ R -λ L )x e -λ R x dx + a L e -λ R L = a R 1 -e -λ L L + a L e -λ R L (S40) a L = e -λ L L L 0 P R (x ) e λ L x dx = e -λ L L L 0 (p R (x ) + a R δ (x )) e λ L x dx = e -λ L L L 0 p R (x ) e λ L x dx + a R e -λ L L = e -λ L L L 0 a R λ R e (λ R -λ L )x e λ L x dx + a R e -λ L L = a R e -λ L L e λ R L -1 + a R e -λ L L (S41) Hence a R e λ R L = a L e λ L L (S42)
Normalisation:

1 = L 0 P R (x) dx = L 0 (p R (x ) + a R δ (x )) dx = L 0 a R λ R e (λ R -λ L )x + a R δ (x ) dx = a R λ R e (λ R -λ L )L -1 λ R -λ L + a R (S43) a R = λ R -λ L λ R e (λ R -λ L )L -λ L ; a L = λ L -λ R λ L e (λ1-λ2)L -λ R (S44) In the limit λ R = λ L = λ 1 = a R λ R e (λ R -λ L )L -1 λ R -λ L + a R → a R λ R L + a R =⇒ a R = 1 λL + 1 = a L (S45)
The solutions are

p R = λ R -λ L λ R e (λ R -λ L )L -λ L λ R e (λ R -λ L )x (S46) p L = λ R -λ L λ R e (λ R -λ L )L -λ L λ L e (λ R -λ L )x (S47)
All in all,

P R (x) = λ R -λ L λ R e (λ R -λ L )L -λ L λ R e (λ R -λ L )x + δ (x) (S48) P L (x) = λ L -λ R λ L e (λ L -λ R )L -λ R λ L e (λ L -λ R )(L-x) + δ (L -x) (S49)
The solutions obey the following symmetry:

P R (x; λ L , λ R ) = P L (L -x; λ R , λ L ) B. The spatial distribution
Back to equation S1, we can now write:

ρ R (x) ∆x = x <x p R (x )∆x d>x-x λe -λd ∆d • min (d, L -x) M ean length • ∆x min (d, L -x) (S50)
In the above equation we used the correct term min (d, L -x) whilst in eq.uatio we used the conceptually simpler d. That's because even though the object was intended to traverse a length d, it was thwarted by the edge of the system. Also, we write ρ R , to emphasise that the calculations are made for the segments in which the object moves to the right. Since the tube is closed, and there is therefore no net current of the object in any direction, ρ R (x) = ρ L (x), and 0.5(ρ R (x) + ρ L (x)) = ρ(x) of Eq.S1.

ρ R (x) = 1 M ean length x 0 p R (x )dx ∞ x-x λe -λz dz = 1 M ean length x 0 λ R -λ L λ R e (λ R -λ L )L -λ L λ R e (λ R -λ L )x + δ (x ) λ R -λ L λ R e (λ R -λ L )L -λ L dx ∞ x-x λ L e -λ L z dz = 1 M ean length x 0 λ R -λ L λ R e (λ R -λ L )L -λ L λ R e (λ R -λ L )x + δ (x ) λ R -λ L λ R e (λ R -λ L )L -λ L e -λ L (x-x ) dx = e -λ L x M ean length x 0 λ R -λ L λ R e (λ R -λ L )L -λ L λ R e (λ R -λ L )x + δ (x ) λ R -λ L λ R e (λ R -λ L )L -λ L e λ L x dx = e -λ L x M ean length λ R -λ L λ R e (λ R -λ L )L -λ L e λ R x -1 + λ R -λ L λ R e (λ R -λ L )L -λ L = 1 M ean length λ R -λ L λ R e (λ R -λ L )L -λ L e (λ R -λ L )x (S51)
We will calculate

M ean length = L 0 λ L e -λ L x 1 -λ R λ L e (λ R -λ L )L + λ R e -λ R x 1 -λ L λ R e (λ L -λ R )L + δ (L -x) λ R -λ L λ R e (λ R -λ L )L -λ L e -λ L x xdx = 1 -e -λ L L (λ L L + 1) λ L -λ R e (λ R -λ L )L + 1 -e -λ R L (λ R L + 1) λ R -λ L e (λ L -λ R )L + λ R -λ L λ R e (λ R -λ L )L -λ L e -λ L L L = 1 λ L -λ R e (λ R -λ L )L - λ L L + 1 λ L e λ L L -λ R e λ R L + 1 λ R -λ L e (λ L -λ R )L - λ R L + 1 λ R e λ R L -λ L e λ L L + λ R -λ L λ R e λ R L -λ L e λ L L L = e λ L L -e λ R L λ L e λ L L -λ R e λ R L (S52) Finally we get ρ R (x) = 1 e λ L L -e λ R L λ L e λ L L -λ R e λ R L λ R -λ L λ R e (λ R -λ L )L -λ L e (λ R -λ L )x = λ R e λ L L -λ L e λ L L e λ R L -e λ L L e (λ R -λ L )x = λ R -λ L e (λ R -λ L )L -1 e (λ R -λ L )x (S53) ρ R (x) = λ R -λ L e (λ R -λ L )L -1 e (λ R -λ L )x (S54)
Checking normalisation:

L 0 ρ R (x) dx = L 0 λ R -λ L e (λ R -λ L )L -1 e (λ R -λ L )x dx = λ R -λ L e (λ R -λ L )L -1 e (λ R -λ L )L -1 λ R -λ L = 1 (S55) C. Relative time difference
The relative time difference spent near the active side as shown in Fig. 2b is defined by:

T RT D = d 0 ρ (x) dx - L L-d ρ (x) dx d 0 ρ (x) dx + L L-d ρ (x) dx (S56)
where d is the distance considered from each exit, and L is the tubes length. Substituting equation S54, we get:

T RT D = tanh ∆λ (d -L) 2 (S57)
Without loss of generality, we assume that the right side is the more active side, having larger flux coming in through it. Thus, we can use the fits from Fig. 3a and get the two probabilities of turning per cm, as a function of the f rel :

λ L = Ae B•∆f λ R = Ae -B•∆f ∆λ = λ R -λ L = 2A•sinh(-B • ∆f ) (S58)
Where ∆f is the f rel , and A and B are the exponential parameters found from fitting the curves in Fig. 3a.

We can now get the expected curve of the relative time difference (assuming the load follows a biased random walk), as a function of the f rel , for the different sizes of loads.

T RT D (∆f ) = tanh (A • (L -d) sinh (B • ∆f ) ) (S59) D.
Step size and bias

The mapping between the step size and the turning probabilities is shown in Eq.1:

a = 1 λ L + λ R
we can now find the step size as a function of the f rel through equation S58:

a = 1 2A (cosh (B • ∆f ) ) (S60)
The step size has a maximum at ∆f = 0.

In the same way we can find the bias as a function of the In the one side experiments, the mean distance is essentially the persistence length for f rel of -1. b. Persistence length as a function of the f rel . This graph is just the inverse of the direction-changing rates in Fig. 3a. The persistence length values for f rel -1 are the mean distance values in a. The thickness on graph a is much smaller than graph b amplitude. In order to compare the influence of the occupancy on the persistence length, and the f rel on the persistence length, lets add the same amount of flux, once by keeping the f rel constant, and once by changing it. For example, we can compare the changes in the "red" load persistence length in both graphs. While moving from (F,0) with f rel =-1, to (2F,0) with f rel =-1 only about doubles the persistence length in graph a, moving from (F,0) with f rel -1, to (F,F) with f rel 0, increases the persistence length by a factor of about 30. each point represents a 15 minute window slice, where the filled circles represent two side experiments and the + symbols represent one side experiments.

f rel : b = (tanh (B • ∆f ) ) 2 (S61)

S5. MICROSCOPIC MODEL

Attached to a one dimensional object, ants are split up into two groups: those attached to its right and those to its left (Fig. S8). In each group ants assume one of two roles: they either pull the object towards the side they're attached to, or lift it, thereby applying no force along the line of motion. The number of ants that assume the former role will be notated n R/L , the sub-index denoting the side, or group, and N R/L will denote those who assume the latter role. The total number of ants that can be attached to each side of the object will be denoted by N . N will be referred to as the size of the object.

Assuming the ants are equally strong, we can write the total force exerted on the object, F , as F = f 0 (n R -n L ), with f 0 being the force a single ant exerts. We will be working in a unit system in which f 0 = 1.

The dynamics of the object are assumed to be over damped, given by the equation

F = γv (S62)
where v is the object's velocity, and γ a damping coefficient.

A. Informed and Uninformed Ants

In our model, there are two types of ants who attach themselves to the object: ants who have a predetermined preferred direction in mind, dubbed informed, and ants who has no preferred direction, dubbed uninformed (see Fig. S8). Whenever we will want to emphasise that the uninformed ants have just joined in, as opposed to already having been attached for a while, we will call them cloud. The uninformed ants initially join as lifters and as they feel the total force applied on the object, choose their role according to the statistics in Eqs.2. The informed ants assume, upon attachment, the role that maximises the total force in their preferred direction and stick to it regardless of the total force on the object, e.g. if an ant wants to take the object to the right, it will pull if it latches onto the right or lift if it attach itself to the left. Informed ants 'forget' their preferred direction after some time and become uninformed. The rate at which they forget their preferred direction is denoted by k f orget . The rate at which informed FIG. S7: Evidence for an emergent Weber's law in experiment (panels a-b) and simulation (panels c-d). a. Empirical turning rates for an object of radius 0.28 [cm] . The probability of turning per cm is presented as a function of the relative flux (main panel) and the flux difference (see inset). b. Relative flux is more informative to empirical ant collective motion than flux difference. The mutual information between probability of turning per cm (as in panel a) and either f rel (pink markers) or flux difference (purple markers) was calculated for all the load sizes. The errors are estimated by randomly filtering out 50% of the graphs data, and calculating the resulting mutual interaction of the graph. this is done for a 100 samples, from which the STD of the 100 samples is used as our estimation of the mutual interaction error. Relative flux is consistently more informative than flux difference in regards to the ants' collective motion.c. Simulated turning rates for an object with a load capacity of 6 ants. The probability of turning per cm is presented as a function of the relative flux (main panel) and the flux difference (inset). d.Relative flux is more informative to simulated ant collective motion than flux difference. The mutual information between probability of turning per cm (as in panel c) and either f rel (pink markers) or flux difference (purple markers) was calculated for different load sizes. Errors were estimated as in panel b. Relative flux is consistently more informative than flux difference in regards to the ants' simulated collective motion.

ants join their preferred side (as pullers naturally) is denoted by k (R/L) on , and the rate at which they join the opposite side (as lifters) is denoted by αk

(R/L) on
, where α will be referred to as leakage. The rate at which uninformed ants join the object is denoted by k cloud and is assumed to be equal on both sides. We further assume that k cloud is proportional to the total rate of attachment of informed ants on the object, i.e. 2k cloud ∝ k

(R) on + αk (R) on + k (L) on + αk (L)
on , or rather

k cloud = 1 2 α cloud (α + 1)(k R on + k L on )
, with α cloud being the proportion factor. Why do we need all these complications? Without leakage and cloud whatever (namely α = 0, α cloud = 0), there would be an extremely unbalanced occupation on the object, especially in one-side experiments. Namely, the side facing away from the the entrance having either no ants at all while the other side potentially full. This is not what we observe in the experiments (Fig. S9).

So what if we only allowed cloud and no leakage? The flaw in this scenario can be demonstrated by considering the case of only one side that is open. In this case the occupation on the side facing away from the entrance determines the flux of uniformed ants, and as the side facing the entrance is ever so slightly more occupied, the flux of informed ants needed in order to create that slight occupation imbalance is much smaller than the cloud, resulting in the object's moving being dominated by the uninformed attached ants. This leads to an unrealistic motion, which is weakly affected by the flux of informed ants from the exit.

The flaw in having either leakage or cloud (but not both) is that it makes the ratio of occupied places on both sides proportional to that of the unoccupied ones, whereas experiments show otherwise: the proportion ratio was found to differ in 38% between experiments. Therefore, we'll be bound to fail to explain quantitatively every single experiment this way, so we'll aim to explain them qualitatively.

It was found that a combination of leakage and cloud better explained the experimental data. The values of the relative cloud flux and relative leakage of informed ants to the other side were found using the data from all the experiments, including two-side experiments that will be discussed in the next section.

B. Boundary Conditions

Empirically, upon bumping into the entrance, some ants fall off the object, and the object quickly moves the other way, especially in the ballistic regime. In Fig. S9 one can see the average occupation on each side of an object from one one-side experiment, as a function of its position, when it moves towards and away from the exit (the exit being on the left). From the red and purple data one can see the drop-off in ants upon bumping into the entrance, which was estimated to be 20% on average. The other side of the object (blue and yellow) is scarce affected. One can also see the occupation imbalance between the two sides of the object, which was previously mentioned.

The drop-off in ants alone can't explain the change in direction seen in experiments, as the side which bumped into the entrance would be quickly filled up with informed ants trying to pull the object again to the entrance, not allowing it to change direction. Moreover, when the object bumps into the entrance, it happens because the ants toting it are -for want of a better term -polarised in that direction, an effect more prominent in the ballistic regime. That means that if after the drop-off there is still a non-zero force in the direction of the entrance, the ants will tend to maximise that force, and the object won't venture away from the bumping point. It is therefore essential that we set the force to zero at the entrance, or make it point the other way. One way to do that is as follows: since the object cannot and does not move any further at the time it reaches the entrance, the ants feel no net force exerted on the object, and therefore choose their roles randomly, and the object will leave the entrance once a statistical fluctuation will result in more pullers on the opposite side than the side closest to the entrance. Unfortunately, that is not enough as informed ants join in too, and align themselves so that the object won't move to the other side. The way we chose to overcome this situation is by having all the ants remaining on the side next to the entrance become uninformed lifters, and have some of the lifters on the opposite side become pullers. It was found that the simulation was not sensitive to the number of lifters that became pullers upon the collision, so we chose it to be 50%.

To recapitulate our boundary conditions, on bumping into the entrance, 20% of the ants on the side that touched the entrance are removed (regardless of their roles); those who remain attached there become lifters; and 50% of the lifters on the opposite side become pullers. In addition to that, all informed ants that are left become uninformed, but keep the same role.

With these boundary conditions we do not capture what exactly happens at the boundaries -which is an intricate process by itself -but rather describe, on average, the conditions in which the object leaves the boundaries. When we came to fit the model to the experiments, it was clear that the model could never explain each experiment individually for the following reasons: First, by assuming the attachment rules described above, our model can produce only a set of allowed occupation profiles while experimentally we see that other occupation profiles are available. Second, and more importantly, the experimental setup is not purely one-dimensional. The object can move in all directions and worse yet, can spin, thereby mixing ants from group Right with group Left, which in part accounts for the mentioned theoretically unexpected occupation profiles. It is clear now that the fact we cannot predict the occupation correctly is just part of the problem. A more pressing problem is that the populations that occupy the object (pull/lifters, un/informed) get mixed and that changes the dynamics. We tried to account for that mix, partly, by allowing informed ants to occupy the side of the object opposite to where they came from. This might have worked if the rotations were random, so one could say that informed ants attached to their 'preferred' side may find themselves on the other side at some rate; but we saw that in the larger objects rotations occur mostly when the object changes direction (see Fig. S10). Similar relation between rotations and changes of direction was also observed in a previous study [3], and this behavior is beyond the description using the simple one-dimension model. Furthermore, when the object bumps into the confines of the setup (not the exit), some ants fall off, and if the object starts spinning at the moment of the bumping, it 'shaves off' other ants which were attached to it (see Fig. S10). This phenomenon cannot be simply averaged over by increasing the detachment rate, for these are drastic changes in occupation that happen relatively fast and can result in the object's changing direction (either because many pullers dropped off, or the impact force from the collision had ants change their roles to follow that new force direction).

More sources of potential discrepancy between the one-dimensional representation and experiments include the ants' ability to exert a tangential force that serves to rotate the object, and the fact that the object's round, so ants may apply forces in other directions than the long axis of the channel. In particular, some will be located in a direction perpendicular to the axis of the channel. Estimating the occupations, we tried to overcome this issue by only looking at ants situated within a 120-degree aperture relative to the long axis of the channel.

It is our aim to try and find the essential physics of the system, and model it in the simplest way possible. Therefore, accepting that our model won't be able to explain each experiment quantitatively, we will try to see if there's a global behaviour observed in all experiments put together, that could be explained quantitatively. Indeed, from the data that was collected, the most significant trends were seen in graphs of the Turning Probability vs. f rel (Fig. 3a). It is for that reason that we chose to work with those kind of graphs in order to evaluate the parameters of our model. To estimate the parameters of our model -F ind , the percentage of informed ants going to the opposite side α, and the percentage of uninformed ants joining α cloud -we scanned the three dimensional space spanned by these parameters, and for each point in that space we ran various simulations with different fluxes, creating the Turning Probability vs. f rel graphs we explained earlier, fitted them to the phenomenological curves (Fig. 3a), and chose the set of parameters whose fitted curves were closest to the experimental data, using χ 2 minimisation. We used only fluxes that generated a relative occupation somewhere between 60% to 80% as seen in the experimental data in Fig. S11.

To estimate the standard deviations of the fitted parameters we checked to what extent they need to change from their optimal values in order to effect a change of one standard deviation in χ 2 . As the sample of the three-dimensional parameter space was scant and sparse, owing to the time and memory each point in that space required, we can only give extrapolated estimates or bounds to those standard deviations. The fitted parameters are given in Table I, while the additional parameters which we extracted from direct experimental measurements and from previous works are given in Table II. In Fig. S12 we show a comparison between experimental data from one one-side experiment and a simulation. We choose to show one-side experiments because they had constant ant flux, unlike the changing, time-dependent fluxes in two-side experiments. The parameters of the simulation are given in Table II, while γ = 11[ kg sec ] (the size of the object). The experiment-contingent parameters were taken as: N = 11[ant] -the maximal number of ants on each side, while the value of the on-rate parameter: k on = 0.078[ 1 sec ] was set to engender the same total average occupation as in the experiment. Not optimal though this fit looks, we can still see that it captures the dynamics qualitatively: [START_REF] Sasaki | The psychology of superorganisms: collective decision making by insect societies[END_REF][START_REF] Biro | From compromise to leadership in pigeon homing[END_REF][START_REF] Adam J Calhoun | Maximally informative foraging by caenorhabditis elegans[END_REF]7] available sluts, for large to tiny load). d. Mean load occupancy in one side and two side experiments. We note that except for the largest load, the average occupancy in the two side experiments were larger by about 10 percent compared to the average occupancy in the one side experiments. In figures a and c, each point represents a 15 minute window slice, where the filled circles represent two side experiments and the + symbols represent one side experiments.

k of f [ 1 sec ] k [ 1 sec ] k f orget [ 1 sec ] γ0 [ kg sec ]
the velocity distribution is double-peaked, having one velocity grater than the other, and the spatial distribution is centred close to the exit.

It is instructive to see also the less successful fits. One such example is the smallest object we worked with -having a capacity of about 8 ants in total. Using the same best-fitted parameters and fixing the attachment rates so as to reproduce the experimental mean occupation, we got what can be seen in Fig. S13.

The model doesn't fit well the data for smaller objects since in the experiments their motion becomes highly twodimensional, having a diameter of 0.2-0.3[cm], much smaller than the width of the tunnel in which it moves, 3[cm]. As a result, the projection of the velocity on the long axis of the tunnel is not solely determined by the number of ants attached to the object, but also on its direction. This, in part, is what makes the velocity distribution in Fig. S13 smoother than the discrete one coming from a simulation. For these small sizes the approximation of treating the motion of the object as one-dimensional breaks down. The simulation results, for the rate of direction changes as function of the relative flux and cargo sizes (Fig. 4), fits exponential relations that are in reasonable agreement with the experimental data (Fig. S14a). The bias and step-size calculated from these direction changes rates, are also in agreement with the experimental data (compare Fig. S14b,c with Fig. 3).

FIG. S14:

Collective load motion as a random walk simulations. a. Comparison of the simulated and experimental turning probability per cm. The experimental data (colored points) is compared to the exponential fit to the simulation data (full lines Fig. 4e). b. Bias as a function of f rel . The Bias is calculated using the turning probabilities found in Fig. 4e, and the mapping in Eq.1. The bias decreases as the two fluxes from both sides become equal (corresponding to f rel → 0). The full lines are the theoretical curves calculated with the use of the λ dependencies found in Fig. 4e, assuming a run-and-tumble model (see Eq.S61). Compare to the experimental results in Fig. 3b. i. Step size as a function of f rel . The average step size is calculated using the turning probabilities found in Fig. 4e, and the mapping in Eq.1. The step size increases as the two fluxes from both sides become equal (corresponding to f rel = 0). The brown horizontal line is the size of the system in log scale. The full lines are the theoretical curves calculated using the λ dependencies found in Fig. 4e, assuming a run-and-tumble model (Eq.S60). Compare to the experimental results in Fig. 3c. The simulation data is taken such that the occupancy of the load is between 0.6 -0.8 (except if written otherwise), as found in our 2 side experiments (Fig. S11). .

S6. KRAMER'S ESCAPE RATE APPROXIMATION

A. From Kramers Theory to Weber's law Having established the relevance of this microscopic model to the ant system we now study it towards a deeper, analytic understanding of the following questions: what is the origin of Weber's law in this system and why is the turning rate an exponential function of the relative flux f rel ? (Fig. S7). As shown above, the details of the turning rates and their dependence on ant fluxes are the crucial component in the collective decision making properties of the ant group.

In order to answer these questions we turn to a simpler version of our microscopic model, with fixed occupation by ants and wherein informed ants are treated as an external force [3,4]. This simplified model allows us to calculate the turning rates. We do this by analyzing an escape process in velocity-space [5] described by Kramers theory [6], which should be valid at low temperatures, in the phase where the ants are coordinated (see the next subsections of this SI). We obtain the following approximate analytic expression for the turning rate when the ant fluxes from both sides are equal (Eq.S88)

r Kramer (f rel = 0) ∼ k π e -2N βN 2 e -βN 2 (S63)
This equation gives the dependence of the turning rate on the size of the object (N ) and the inverse temperature (β) and stands in reasonable agreement with the simulated turning rates (Fig. S15). Next, we calculated the effect of non-zero values of f rel on the turning rate where the fluxes from each exit determine the average occupation by both uninformed and informed ants on each side. When the flux through a particular exit is large, both of these effects bias the motion in the same direction. The difference in uninformed ants induces a shift in the total number of ants on one side when compared to the other: N and N -δ N , respectively. The effect of a difference in the number of informed ants induces a net external force that is proportional to: δ = n R -n L . From our analytic approximation of the turning rate (Eq.S63) we find that each of these effects modifies the turning rate in a simple exponential manner (see details below)

r Kramer (δ, δ N ) = r Kramer (f rel = 0)e -(δ+δ N )( β 2 +2) (S64)
where the sign in the exponential changes if the turning is towards or against the bias. Using the full one-dimensional simulation model, we calculated the average occupation of informed and uninformed ants as a function of the fluxes of ants that enter from the two exits (section S7, Eqs.S110), and use it to write δ and δ N as functions of the incoming fluxes (Eqs.S117,S118). These turn out to be (in the limit of an object saturated by attached ants, as in the experiments)

δ, δ N ∝ f R -f L f R + f L = f rel (S65)
where f R/L are the fluxes of ants ant sec coming from the right/left exit. Substituting Eq.S65 in Eq.S64 brings us to the conclusion that the turning rates depend on ant fluxes through f rel (Eqs.S64,S65). This suggests an explanation for Weber's law found in the simulations (Fig. 4d,e) and, specifically, for the fact that the turning rates exhibit an exponential dependence on the f rel (Fig. 4e).

We can give an intuitive explanation for the result given in Eq.S65, which relates the extent of the bias in the cargo motion to the signed relative flux. The bias in the motion depends on an imbalance of pulling ants on each end of the object (see SI section S7). The number of pulling ants on each side is naturally proportional to the flux of informed ants arriving from the exit that faces this side. However, any resulting bias is diminished by uninformed ants attaching evenly on both sides, and informed ants "leaking" from the opposite side (which act as pullers). These latter processes increase with the total flux from both sides, and diminish the bias of pulling ants towards the exit with the larger flux. The average number of pullers at each side is therefore given by the flux entering from that side, divided by an additive combination of both fluxes (Eqs.S110). The difference between the average number of pullers on both sides, in the limit of an object that is saturated with ants, is therefore found to be proportional to f rel (Eq.S65), and directly enters the turning rates due to Kramers theorem (Eq.S64).

Note that the dependence of the response on the signed relative flux f rel is another form of Fold-Change Detection (FCD), which is observed in biology on different scales, from bacteria to humans [7]. This property provides a beneficial increase in the dynamic range over which the system is sensitive to changes in the environment. It requires different mechanisms for its realization in different biological contexts, and is never exact. In our system, it emerges only in the limit in which the load is saturated by ants (Eqs.S117,S118).

B. Derivation of the General Expression

We start with a general Fokker-Planck equation for the probability density of measuring a value of v to some statistical variable at time t, that is to say p(v, t) [6]: where α 1 (v) is a force creating a drift in v-space, and α 2 (v) is the diffusion. We recognise the probability current J J(v, t) = α 1 (v)p(v, t) -1 2

∂p(v,
∂ ∂v (α 2 (v)p(v, t)) = - 1 2 e 2 v α 1 (v ) α 2 (v ) dv ∂ ∂v (e -2 v α 1 (v ) α 2 (v ) dv α 2 (v)p(v, t)) (S67)
For convenience' sake, we define

F (v) := 2 v α 1 (v ) α 2 (v ) dv (S68)
In equilibrium J(v, t) = 0, meaning e -F (v) α 2 (v)p eq (v) = const., and therefore

p eq (v) ∝ e F (v) α 2 (v) = e -U (v) (S69)
where U (v) is defined thus:

U (v) = -F (v) + log α 2 (v) (S70)
At this point we are going to assume that in the steady state p eq (v) is a double-peaked function (corresponding to the ordered phase of the ants problem), and that at the peaks, in v-space, the object is locally in a steady state, that is to say ∂p(v,t) ∂t = 0, and therefore J = const. We will now integrate eq.S67 (after a slight rearrangement) along some interval [v 1 , v 2 ], in and get 2J v2 v1 e -F (v) dv = e U (v1) p(v 1 , t) -e U (v2) p(v 2 , t) (S71)

We will choose v 2 to be a peak of p eq (v), dubbed v max , and choose v 1 to be a point away from the peak where we set p(v 1 , t) = 0 as an absorbing boundary condition. We do not care where exactly v 1 is, as we assume that the object only lingers at the peaks of p eq (v) in equilibrium, so once it leaves one of them, it will go immediately to the other, the time spent in the region between the peaks is negligible compared to the lingering time at the peaks. We evaluate the integral on the left side using the steepest slope approximation: where v min is the velocity in which F (v) is minimal, and is assumed to be unique and lie between v 1 and v max . Substituting that into the previous equation, we get J = -1 2 e U (vmax) p(v max , t)e F (vmin) F (v min ) 2π (S73)

where the minus sign means that the probability leaks from the bigger velocity to the smaller. The escape rate from the well (i.e. the peak of p eq ), r, is by definition:

r = |J|/P (S74)
where P is the probability of being in a vicinity of v max , namely in the well, and is

P = u2 u1 p(v)dv (S75)
where u 1 and u 2 are the boundaries of the well (bounding the majority of the probability distribution in the well).

We are going to assume that in the well the object is locally in a steady state, that is to say p(v) ≈ p eq (v) = p eq (v max )e U (vmax)-U (v) (see eq.S69). We get P = p eq (v max ) (S85)

F (0) = β - 2 N ∼ β (S86) F (v max ) = N (βN -2) -β(N tanh βvmax 2 ) 2 (N cosh( βvmax 2 ) -N tanh βvmax 2 sinh( βvmax 2
)) We will now see what happens to the turning rate in Kramer's approximation when the number of ants coming from each entrance is different. Such biased fluxes will result in a different number of informed pullers (on average) on each side of the object, and in a different number of uninformed ants (also on average). We will see how each of these changes affects the turning rate separately.

a. External Force When there's a biased occupation of informed pullers (on average) on the object, it manifest itself in the mean field approximation in the form of an external force exerted on the object. We define δ = m R -m L where m R/L is the mean number of informed pullers on the right/left (see section S7). With this addition we now have (v+δ) (S89) v max and v min become solutions to the equation

Γ ± = k N ∓ v 1 + e ∓β
v = N tanh β(v + δ) 2 (S90)
and the rate becomes We assume the following dynamics: A constant attachment rate per site of informed pullers F R/L on the right/left; a constant attachment rate per site of informed lifters αF L/R on the right/left (we assume that a portion α of the informed ants coming from one side attach to the opposite side, and become lifters); a constant attachment rate per site of uninformed ants F C on the right/left; a constant detachment rate per site (regardless of the ant's role) k of f ; and a constant rate at which informed ants forget their preferred direction and become uninformed (Fig. S16), k f orget .

We define the total relative occupation P as the number of ants attached to the object divided by its capacity:

P = M R + m R + m L R + M L + m L + m R L 2N (S101)
In steady state, each group of ants in Fig. S16 reaches an average occupation when the rate at which ants enter the group equals the rate at which ants leave it. Following Fig. S16, we have for the blue group:

F R (N -m R -m L R -M R ) = (K of f + K f orget )m R (S102)
where the LHS is the total rate at which ants enter the group, and the RHS the total rate at which ants leave the group. Notice that N -m R -m L R -M R is the empty attachment slots on the right. Equivalently for the orange and green groups respectively (Fig. S16):

αF L (N -m R -m L R -M R ) = (K of f + K f orget )m L R (S103) F C (N -m R -m L R -M R ) + (m R + m L R )K f orget = M R K of f (S104)
And for the left side:

F L (N -m L -m R L -M L ) = (K of f + K f orget )m L (S105) αF R (N -m L -m R L -M L ) = (K of f + K f orget )m R L (S106) F C (N -m L -m R L -M L ) + (m L + m R L )K f orget = M L K of f (S107) (S108)
F C is assumed to be proportional to the total rate of informed ants attaching themselves to the object, hence

F C = c(1 + α)(F R + F L ) 2 (S109)
Using the equations above we can write the average occupancy P, M R , m R , m L R , M L , m L , m R L as a function of the fluxes F L , F R , F C :

m R = F R N K of f (F R + αF L + F C + K of f )(K of f + K f orget ) m L = F L N K of f (F L + αF R + F C + K of f )(K of f + K f orget ) M R = N F C (K of f + K f orget ) + K f orget (F R + αF L ) (F R + αF L + F C + K of f )(K of f + K f orget ) M L = N F C (K of f + K f orget ) + K f orget (F L + αF R ) (F L + αF R + F C + K of f )(K of f + K f orget ) m L R = αF L N K of f (F R + αF L + F C + K of f )(K of f + K f orget ) m R L = αF R N K of f (F L + αF R + F C + K of f )(K of f + K f orget ) P = K of f 2(F C + K of f ) ( F R + αF L F R + αF L + F C + K of f + F L + αF R F L + αF R + F C + K of f ) + F C F C + K of f (S110)
We define δ as the difference between the number of informed pullers on the right, and the number of informed pullers on the left, and 2δ N as the difference between the number of uninformed ants on the right, and the number of uninformed ants on the left:

δ = m R -m L (S111)

FIG. 1 :

 1 FIG. 1: Experimental arena and sample trajectories. a1-d1. Sample snapshot of one exit (a1,b1) and two exit experiments (c1,d1), with loads of radii 1.1 [cm] (b1,d1) and 0.1 [cm] (a1,c1). Full lines indicate recent load trajectories.The direction to the nest is up for all panels yellow arrow). Images a1, b1 show only the left half of the single exit corridors, which are as long as the double exit corridors. a2-d2. Sample time lines of loads position along the main channel axis. Numbering as above. A histogram of loads position is plotted to the left of each time line. Exponential fits (orange) are provided for the single-exit experiments.

FIG. 2 :

 2 FIG. 2: Global properties of collective motions. a. Mean distance traveled towards closed side in one exit experiments as a function of load size. Presented values correspond to the length-scale of the exponential decay in the spatial distribution of the load away from the exit (Fig. 1a1,b1). Error-bars represent standard error of the mean over, from largest object to the smallest one, N = 21, 20, 12 and 6 fifteen minute time windows. b. In two exit experiments, the relative time, T rel = (TH -TL)/(TH +TL), i.e. the normalized difference between the time spent at the exit with the higher ant influx and that with lower influx, rises with the relative flux advantage of the majority entrance, f rel = (fH -fL)/(fH + fL). Curves are calculated theoretically for a run-and-tumble model (Eqs. S56-S59), and rely on the exponential fits for the dependence of the turning probabilities (λ) on f rel (Fig. 3a. Each experimental data point represents a 15 minute window slice, where the filled circles represent two side experiments and the + symbols represent one side experiments. Color code as in panel a.

FIG. 4 :

 4 FIG. 4: Microscopic model captures empirical properties of motion. a-b. Simulated sample trajectories for one exit (a) and two exit (b) trajectories and two load sizes (4 and 15 ants). These are qualitatively comparable to the experimental trajectories shown in Fig. 1a2-d2. c. Mean distance traveled towards closed side in one side experiments. Data points were calculated assuming mean ant occupancy values that coincide with those measured in the one-side experiments (Fig. S9). Error-bars represent standard error of the mean over, from largest object to the smallest one, N = 11, 5, 7 and 8 independent runs of the simulation (each on the order of hundreds of hours). These results can be compared to the experimental results shown in Fig. 2a. d. Simulated relative time (see Eq. S56), with d = 10[cm] and L = 55[cm]) spent near the two exits function of the relative flux, f rel . Full lines are the theoretical curves calculated with the use of the exponential fits of the probabilities of turning (λ) as a function of f rel (Fig. 4e, Eqs. S58), assuming a run-and-tumble model (see Eq. S59). Compare to the experimental results shown in Fig. 2b. e. Simulated turning probability per cm, λ, as a function of the signed relative flux f rel . Full lines represent an exponential fit to the data (linear when plotted on a logarithmic scale, Eqs. S58), with a larger slope for larger loads. The points at the ends ( f rel = ±1) represent averaged turning probabilities from one side experiments.

FIG. 5 :

 5 FIG.5: Abstract obstacle circumvention model. a. The model describes an obstacle which can be circumvented using two separate routes (black squares on left hand column) each of which can offer either easy (blue) or difficult (red) traversal. There are therefore exactly four distinct obstacle combinations (central column). Circumvention time for symmetric obstacles is independent of strategy. However, for asymmetric obstacles (right hand column) an optimal circumvention strategy depends on external information encoded by the parameter q which specifies the probability that the easily traversable path is on the right. b. Optimal time balancing strategies. The relative difference in the time invested in one of the routes as a function of the relative evidence indicating it to be the easy route. Different colors signify different values of the parameter γ = p diff /peasy, the ratio between the traversal efficiency for the the two routes. γ = 0 corresponds to the case where only one route is traversable (equivalent to the key search example, see text) and displays sub-linear behavior: even very small evidence towards one route dictates large search times in that direction. Increasing the value of γ leads to super-linear behavior where evidence towards a route dictates little to no search time invested there.

FIG. S2 :

 S2 FIG. S2: Image analysis. a1 .Load of radius 1.1 [cm] as viewed from camera. a2. Identification of inner shape of said load. a3. Estimation of center and orientation of said load. b1. Load of radius 0.2 [cm] as viewed from camera. b2. Identification of inner shape of said load. b3. Estimation of center of said load. c1. Ants within the corridor as viewed from camera. c2. Identification of the ants. c3. Tracking of the ants.

  FIG. S3: Time window selection. a. Example of location histogram of a an entire experiment, concealing the expected exponential dependence expected from a biased random walk. b. Example of location histogram of a short experiment, revealing the expected exponential dependence expected from a biased random walk. c. Stability of flux rate entering a single exit. Each point represents an entire experiment (typically 1 to 2 hours long), in which the value is the standard deviation of the flux rate over the average flux rate. d. Sample of an ant entry time interval histogram, in a 15 minute time window. The histogram shows a memoriless exponential distribution with a specific mean value (on the order of one ant per second).

FIG. S6 :

 S6 FIG. S6: Persistence length in experiments. a. Mean distance traveled towards the closed side in one side experiments as a function of the flux.In the one side experiments, the mean distance is essentially the persistence length for f rel of -1. b. Persistence length as a function of the f rel . This graph is just the inverse of the direction-changing rates in Fig.3a. The persistence length values for f rel -1 are the mean distance values in a. The thickness on graph a is much smaller than graph b amplitude. In order to compare the influence of the occupancy on the persistence length, and the f rel on the persistence length, lets add the same amount of flux, once by keeping the f rel constant, and once by changing it. For example, we can compare the changes in the "red" load persistence length in both graphs. While moving from (F,0) with f rel =-1, to (2F,0) with f rel =-1 only about doubles the persistence length in graph a, moving from (F,0) with f rel -1, to (F,F) with f rel 0, increases the persistence length by a factor of about 30. each point represents a 15 minute window slice, where the filled circles represent two side experiments and the + symbols represent one side experiments.

  FIG. S8: A pictorial description of attachments. Informed ants, denoted by k (R/L) on, can join to both side of the object with a proportion parameter α for the leakage. Uninformed ants join both sides with a rate of k cloud .

FIG. S9 :

 S9 FIG.S9: Average occupation as a function of object's position in a one-side experiment, the exit being on the left. N R/Loccupation on the right/left side of the object. Positive velocity (v > 0) means the object is moving away from the exit. The object having spent most of the time in the vicinity of the exit, data coming from x > 0 is erroneous due to lack of statistics there. The object's capacity is 12 ants on each side. The purple line indicates the average occupation on the left side of the object as it moves towards the exit; the red line shows the increase in ants on the left side as the object moves away from the exit, having bumped into it; the green line indicated the drop-off in ants owing to the collision.

C.

  FIG. S10: An experimental snippet of an object changing direction. The snapshots are ordered chronologically from top to bottom in time jumps of 2sec. That's the biggest object we worked with, 2.2cm in diameter.

F ind f 0 α

 0 (leakage) α cloud (cloud) Value 0

FIG. S11 :

 S11 FIG. S11: Number of carriers and occupancy of load in experiment. a. Number of carriers as a function of the total flux entering the tube from both sides. each point represents the average number of carriers holding the load during a 15 minute window slice. b. Mean number of carriers as a function of the total flux entering the tube in one side and two side experiments. The bar values represent averages over all the 15 minute window slices, per load and type of experiment (one or two sides) c. Load occupancy as a function of the total flux entering the tube from both sides. Load occupancy is calculated by dividing the number of carriers in panel a, by the number of available sluts around the load. (in our system[START_REF] Sasaki | The psychology of superorganisms: collective decision making by insect societies[END_REF][START_REF] Biro | From compromise to leadership in pigeon homing[END_REF][START_REF] Adam J Calhoun | Maximally informative foraging by caenorhabditis elegans[END_REF] 7] available sluts, for large to tiny load). d. Mean load occupancy in one side and two side experiments. We note that except for the largest load, the average occupancy in the two side experiments were larger by about 10 percent compared to the average occupancy in the one side experiments. In figures a and c, each point represents a 15 minute window slice, where the filled circles represent two side experiments and the + symbols represent one side experiments.

FIG. S12 :

 S12 FIG. S12: Experimental data (orange) compared with simulation (blue) for a one-side experiment. The real object had a radius of 0.62[cm], which corresponded to a simulated object with N = 11 ants on each side. (a) The probability of finding the object at a position x, the exit being on the left in the figure. (b) The probability of seeing the object with a velocity v, positive velocity signifying movement away from the exit. The values of the parameters that were used to create this simulation and the description of the object appear in the text where the figure is first referred to (see also TablesI and II).

  FIG.S13: Experimental data (orange) compared with simulation (blue) for a one-side experiment (parameters as in Fig.S12). The real object had a radius of 0.4[cm], which corresponded to a simulated object with N=4 ants on each side (a) The probability of finding the object at a position x, the exit being on the left in the figure. (b)The probability of seeing the object with a velocity v, positive velocity signifying movement away from the exit. A description of the object and the parameters' values appear in the text where the figure is referred to.

2 F

 2 (vmin)(v-vmin) 2 dv = e -F (vmin) 2π F (v min ) (S72)

e- 1 2U 2 U

 12 -(U (v)-U (vmax)) dv ≈ p eq (v max ) u2 u1 e (vmax)(v-vmax) 2 dv ≈ p eq (v max ) (vmax)(v-vmax) 2 dv = p eq (v max ) 2π U (v max ) (S76)Plugging eqs.S73,S76 into eq.S74 gives us the rate we have been looking for:r = 1 4π U (v max )F (v min )e U (vmax)+F (vmin) (S77)We will assume that α 2 (v) does not change significantly around v max , and hence α 2 (v) ≈ α 2 (v max ) and U (v max ) ≈ -F (v max ), so that eq.S77 becomesr = 1 4π α 2 (v max ) |F (v max )|F (v min )e F (vmin)-F (vmax) (S78) v min = 0 (S82) v max = N tanh βv max 2 ⇒ v max ∼ N -2N e -βN (S83) F (0) + U (v max ) = 2 0 vmax N tanh βv 2 -v N -v tanh βv 2 dv + log k(N -v max tanh βv max dv + log 4kN e -βN = -N (β + 2) + log(4kN ) (S84) F (v) = N (βN -2) -βv 2 (N cosh( βv 2 ) -v sinh( βv2)) 2

FIG. S16 :

 S16 FIG.S16: Attachment-detachment dynamics. We divide the ants on the right to three groups according to their information. The rates at which ants enter, leave, or move to a different group all appear in the text in the beginning of this section along with the meaning of each variable. This figure pertains to the left side as well with the change of indices R↔L.

TABLE I :

 I The best-fitted parameter values used in the simulations.

TABLE II :

 II The rest of the parameter values used in simulations.

Scientific reports, 8(1):1-8, 2018.

Acknowledgements

We would like to thank Jacobo Levy-Abitbol for running the initial experiments, Jonathan E. Ron for initial simulations and Guy Han for technical help. This work has received funding from the European Research Council (ERC) under the European Unions Horizon 2020 research and innovation program (grant agreements No. 648032 and 770964). N.S.G thanks the support of the Minerva Grant no. 712601. OF is the incumbent of the Henry J Leir Professorial chair. EF is the incumbent of the Tom Beck Research Fellow Chair. N.S.G. is the incumbent of the Lee and William Abramowitz Professorial Chair of Biophysics. This work is made possible through the historic generosity of the Perlman family.

Supplementary Information

PACS numbers:

S1. EXPERIMENTAL SYSTEM

The tube had entrances at each of its two ends, which where so narrow as denied passage of anything larger than an ant. The tube was 70cm end to end (including the corridors), 6cm high, and 3cm wide. The width entrance exits was small enough to ensure that the carried loads could pass through. Inside the tube was a circular object, its outer circumference serrated and rubbed with cat food, which the ants carried. We used objects of diameters 1.1cm, 0.62cm, 0.28cm, and 0.2cm (S1b).

A few centimetres past each entrance, and inside the tube, were removable, cleft partitions impassable by anything larger than an ant. These served a double purpose: They created rooms in the tube which were separated from the hustle of the carrying that went on inside, making for easier tracking of ants entering and leaving the tube in these regions. Also, thanks to their arrow-like shape, they reduced the area of the object touching the partitions during collisions, and prevented the ants from losing grip due to the collision but also from lifting the object and tilting so it is vertical to the surface. These bind the motion to occur solely on the floor of the setup.

The experiments were video recorded by two cameras having a frame rate of 25 frames per sec, each positioned above a half of the tube with a small overlap between them. This was done because the tube was too long to be fully captured by one camera without losing resolution. In order to synchronise the cameras, a randomly pulsating flashlight was used in the overlap region in the beginning of each experiment. Each experiment produced a 1-2 hour long film.

S2. IMAGE ANALYSIS

A designated image processing program was developed using MATLAB programming language. The programs goals are consistent, high-quality tracking of the load and the ant fluxes going in and out of the tube. In our theoretical, one-dimensional model, the object's velocity can take only a finite number of values, which, when ordered from biggest to smallest (respecting their sign), form a ladder of possible velocity. The object can go up and down the ladder one "rung" at a time, namely go up to the nearest higher velocity or down to the nearest lower velocity. The rates of going up/down the ladder from a velocity v are denoted by Γ +/-and are given by

where v is dimensionless, in units of the basic ant-driven velocity, so its equivalent to net number of pulling ants. In Kramer's approximation for the escape rate we define

and v max and v min in eq.S77 will satisfy the following equation:

We plug the expressions for α 1/2 that appear in Eq.S80 into Eq.S78 and plot it numerically in Fig. S15 (dashed lines) for various object sizes. The little cusps at the bottom left are the transition that comes to pass at the critical temperature. We plot alongside it the turning rate extracted from simulations of the discrete "ladder" rates that appear in Eq.S79 (continuous lines, that are very noisy as the temperature decreases due to numerical limitations).

FIG. S15: The numerical solutions to Eq.S78 for different object sizes (values of N appear in the legend) appear in dashed lines, while the simulations (solid lines) gave the more noisy line. There is reasonable agreement over an "effective temperature" range approaching the transition (where there are cusps in the dashed lines).

We see that there is a range of "effective temperatures" larger than the critical value of F ind (which is observed as the cusp in the analytic graphs, dashed lines in Fig. S15), where the approximation works rather well. This is indeed the regime that corresponds to our experiments when we used the experimental data to fit the model: In our simulations we use F ind = 0.5, which even for the smallest object (N = 4) is on the ordered (right) side of the transition point (cusps).

We will now find an asymptotic approximation for Eq.S78 (given α 1/2 in Eq.S80) in the limit β → ∞. We will make use of tanh(x) ∼ 1 -2e -2x in the limit x → ∞. Hereby by we present a list of the asymptotic approximations that the functions and parameters in Eq.S78 take in the limit of low temperatures:

)) 2

(S94)

It's necessary to belabour a point here -from the ants' perspective, the above rate in eq.S97 is the rate of turning given that the object is moving towards the right. The rate of turning when the object is going to the left is r(0)e +δ( β 2 +2) . b. Biased occupation Now we will see how Kramer's escape rate changes when we introduce a biased occupation: N ± δ N between the two groups of ants, but the net pull of the informed ants is balanced. We begin with

It now looks exactly like the previous case of external force (compare eq.S89). Therefore, we deduce

S7. CALCULATING THE SIGNED RELATIVE FLUX USING THE PARAMETERS OF THE MICROSCOPIC MODEL

Here we derive the dependence of the average difference in ant occupation (informed and uninformed) between the two sides, namely δ and δ N , on the f rel . We will be interested only in the information the ants have, and not in their role. Hence, we will introduce new variables: We define m R/L as the number of informed pullers on the right/left,

R/L as the number of informed lifters on the right/left; M R/L as the number of uninformed ants on the right/left, such that 2δ

It turns out empirically that the detachment rate K of f and the forgetting rate K f orget , are (approximately) equal, K = K of f = K f orget and this simplifies the expressions:

Let us look at two opposite limiting cases: 1.The load is depleted from ants, that is, the fluxes are much smaller than the detachment rates F L , F R K. 2.The load is saturated with ants, that is, the fluxes are much larger than the detachment rates F L , F R K.

Depleted case (F

and the fitted parameters α = 0.6, c = 0.6, we get

2 )+α ≤ 0.202, and therefore both in this limit:

Now when we plug eq.S7 into eqs.S97,S100, bearing in mind that these equations were derived under the assumption the object was moving to the right, we get that the type of relative flux shown in eq.S7 is, in that context, f rel . we hence proved that the turning rate is exponential in f rel in the saturated limit. We will now check to which of the theoretical limits written above the experiment was closer. We will use the occupation seen in the experiments (Fig. S11) to determine the ratio of (F L + F R )/K. The lower limit on this ratio, is given when the sum of the fluxes that corresponds to a given occupation, P , is minimal. This happens when F L = F R = F , since the occupation vs the flux is a monotonically increasing concave function. Let's therefore plug F L = F R = F into the last equation in eqs.S110, and extract 2F/K of f as a function of P . Here's what we get:

Using the values α = 0.6, c = 0.6, we plotted the above equation in Fig. S17, where we see that for all the experimentally observed occupations (P > 60%), this ratio is larger than 1. Therefore, the experiments correspond to the saturated limit, and the dependence of the occupation imbalance between the two sides depends on the f rel (Eqs.S117-S7).

Note that the attachment rates in our model, denoted by F R/L , are not the ant fluxes measured in the experiments. The experimental fluxes are the rates at which ants enter the tube through the exits, whilst the attachment rates in our model are the rates at which ants attach themselves to a vacancy on the object. We do not know how these two different types of rates are related, but we assume that they are proportional to each other.

S8. THEORETICAL INVESTIGATION OF EXPLOITATION WITHOUT FEEDBACK

A. The "lost key" Model Consider the scenario in which you lost your key in the apartment. You know that the key is either in the kitchen with probability q K = q, or in the living room with probability q L = 1 -q. It is given that for every minute of search in the "correct room", i.e., the room where the key is, you have probability p to find the key. You consider a family of memoryless strategies, which are defined by a parameter 0 ≤ α ≤ 1. For each minute, you flip a coin, and with probability α choose to search in the kitchen; Otherwise, with probability 1 -α, this minute is dedicated to searching in the living room. For simplicity, the time it takes to move between rooms is assumed to be much shorter in comparison to the time between coin flips, and thus neglected in this analysis. The question is what is the optimal α that would minimize the expected time until you find the key?

With the aforementioned parameters, the expected time until the key is found is:

FIG. S17: Ratio of the influx rate to the detachment rate as a function of load occupancy (see Eq.S120). Applying the mean occupancy in our experiments(Fig. S11d) (about 70 percent) we get that in the worst case 2F/K = 1.8.

We would like to minimize this quantity. First note that the answer is independent of p. To find the minimum we simply take the derivative of T with respect to α, and then find which α makes the derivative equal to zero. The derivative T (α) is proportional to

Since T (0) = T (1) = ∞ and the derivative is zero for a unique α then this α achieves the minimum of T . The time allocation in the two rooms as a function of the evidence q are depicted by the blue curve in Fig. 5b.

B. Generalized Model

We next generalize the aforementioned key-search scenario into a model which is more comparable with obstacle circumvention. The model describes an obstacle which can be bypassed via two routes. We assume a simplified environment wherein each of these routes can be either "easy" or "difficult". An "easy" (respectively, "difficult") route means that it can be passed with probability p easy (respectively, p diff ) on each attempt, where p easy ≥ p diff . The values of p easy and p diff depend on the context, but are assumed to be fixed and known. We define the parameter γ = p diff /p easy to describe the relative success rates. Note that the "lost key" example presented above is equivalent to choosing p diff = 0 (or, equivalently, γ = 0). In this simplified problem there are exactly four options for an obstacle which include the possible permutations of easy and difficult routes: (1) both circumvention routes are easy, (2) both are difficult, (3) an easy route on the left and a difficult one on the right, and (4) the mirror image with a difficult route on the left and an easy one on the right. In cases where both passages are of equal difficulty, circumvention efficiency is independent of how time is partitioned between the two options and are thus not interesting. We therefore focus on the two asymmetric cases, namely (3) and (4), where one route is easy and the other is difficult.

What are the search strategies that minimize the expected circumvention time around asymmetric obstacles? Of course, if it is known which of the two asymmetric options one currently faces, the optimal decision would become trivial -simply invest all the time at the easy route. Similarly to the "lost key" example, when information is not perfect, the optimal strategy can benefit from external evidence which we model by the parameter q. This parameter signifies the probability that the route on the right hand side is the easy one. Without loss of generality we assume that q ≥ 1 2 . Based on the parameters γ and q we seek the optimal way to partition time between the two routes. As in the aforementioned "lost key" example, we consider memoryless strategies where the right-hand route is approached with probability α, and the left-hand route is approached with probability 1 -α. The expected time until the obstacle is circumvented is:

We note that the minimization of T (α) depends on the ratio γ = p diff peasy ≤ 1 but not on p easy or p diff . Taking the derivative of T with respect to α, and comparing to zero yields: (γ -1)q (α(1 -γ) + γ) 2 -(γ -1)(1 -q) (α(γ -1) + 1) 2 = 0 Or in other words, q (α(1 -γ) + γ) 2 = (1 -q) (α(γ -1) + 1) 2

Implying that α(1 -γ) + γ α(γ -1) + 1 = q 1 -q .

Substituting Q = q 1-q , we obtain:

α(1 -γ) + γ = Q • (α(γ -1) + 1) = αQγ -αQ + Q.

Rearranging, we get

Implying that

Next, observe that T (α) = ∞ when α = γ/(γ -1), and when α = 1/(1 -γ). Since 0 ≤ γ ≤ 1, the former case happens when α ≤ 0 and the latter happens when α ≥ 1. Since the solution to α in Eq. (S122) is unique, this implies that in the range [γ/(γ -1), 1/(1 -γ] there is a unique minimum to T (α) (see Fig. 5b).

In particular, this implies that if the expression in Eq. (S122) gives α > 1, then the minimum of T (α) in the range [0, 1] is obtained at α = 1. This corresponds to the case that Qγ > 1, or, in other words,

Hence, this case happens when q is large with respect to the difference between the quality of the routes.

[1] Aviram Gelblum, Itai Pinkoviezky, Ehud Fonio, Abhijit Ghosh, Nir Gov, and Ofer Feinerman. Ant groups optimally amplify the effect of transiently informed individuals. Nature communications, 6:7729, 2015.