From organized internal traffic to collective navigation of bacterial swarms

Bacterial swarming resulting in collective navigation over surfaces provides a valuable example of cooperative colonization of new territories. The social bacterium Paenibacillus vortex exhibits successful and diverse swarming strategies. When grown on hard agar surfaces with peptone, P. vortex develops complex colonies of vortices (rotating bacterial aggregates). In contrast, during growth on Mueller–Hinton broth gelled into a soft agar surface, a new strategy of multi-level organization is revealed: the colonies are organized into a special network of swarms (or ‘snakes’ of a fraction of millimeter in width) with intricate internal traffic. More specifically, cell movement is organized in two or three lanes of bacteria traveling between the back and the front of the swarm. This special form of cellular logistics suggests new methods in which bacteria can share resources and risk while searching for food or migrating into new territories. While the vortices-based organization on hard agar surfaces has been modeled before, here, we introduce a new multi-agent bacterial swarming model devised to capture the swarms-based organization on soft surfaces. We test two putative generic mechanisms that may underlie the observed swarming logistics: (i) chemo-activated taxis in response to chemical cues and (ii) special align-and-push interactions between the bacteria and the boundary of the layer of lubricant collectively generated by the swarming bacteria. Using realistic parameters, the model captures the observed phenomena with semi-quantitative agreement in terms of the velocity as well as the dynamics of the swarm and its envelope. This agreement implies that the bacteria interactions with the swarm boundary play a crucial role in mediating the interplay between the collective movement of the swarm and the internal traffic dynamics.

modeled before, here, we introduce a new multi-agent bacterial swarming model devised to capture the swarms-based organization on soft surfaces. We test two putative generic mechanisms that may underlie the observed swarming logistics: (i) chemo-activated taxis in response to chemical cues and (ii) special align-andpush interactions between the bacteria and the boundary of the layer of lubricant collectively generated by the swarming bacteria. Using realistic parameters, the model captures the observed phenomena with semi-quantitative agreement in terms of the velocity as well as the dynamics of the swarm and its envelope. This agreement implies that the bacteria interactions with the swarm boundary play a crucial role in mediating the interplay between the collective movement of the swarm and the internal traffic dynamics.

Introduction
Swarming is a method of movement in which bacteria use flagella to migrate rapidly over surfaces en masse [1]. A simple view of swarming is an uncoordinated expansion in which individual cells cooperate minimally [2] but otherwise compete, for example to occupy the colony periphery with the best access to nutrients. In this scenario the primary sensory input and communication between individuals is at the level of group decision as whether to swarm or not (and when to stop) and may include chemical communication (e.g. quorum sensing), assessment of nutrient levels and recognition of a suitable surface [3][4][5][6]. Indeed, detailed analysis of swarming in Escherichia coli suggest short term contacts between cells with little interaction between cells beyond simple physical effects such as collisions [7] and the time scale in which masses of moving cells maintain dynamic structures, such as jets and streams, is typically milliseconds to seconds.
Paenibacillus vortex is a Gram-positive bacterium that is a highly effective swarmer with its progress over agar plates aided by collective secretion of surfactants [8][9][10]. This bacterium survives in the complex and challenging environment surrounding plant roots (the rhizosphere). DNA sequencing suggests microorganisms from this habitat tend to devote a very high proportion of their genomes to information processing [11]. A successful behavioral strategy of the P. vortex is to cooperatively form and develop large and intricately organized colonies of 10 9 -10 12 cells. Being part of a large cooperative, the bacteria can better compete for food resources and be protected against antibacterial assaults [11].
When grown on hard peptone agar surfaces, P. vortex generates special aggregates of dense bacteria that are pushed forward by repulsive chemotactic signals sent from the cells at the back [11][12][13]. These rotating aggregates (termed vortices), pave the way for the colony to expand. The vortices serve as building blocks of colonies with special modular organization. In contrast, when grown on Mueller-Hinton (MH) soft agar surfaces, the collective motility is reflected by the formation of foraging snake-like swarms that act as arms sent out in search for food [8][9][10][11]. These swarms have an aversion to crossing each other's trail and collectively change direction when food is sensed. The swarms can even split and reunite when detecting scattered patches of nutrients. Bacteria move collectively as swarms, travelling between different parts of the colony so that resources and information on the environment are shared. Thus, the entire colony appears to be a logistic network facilitating growth throughout the colony-both at the interior where most of the nutrients have been depleted, and at the expanding boundary. From this perspective, the growth and food searching strategy as well as the organization of the colony resembles that of far more complex eukaryotic organisms such as insects or slime mold.
The internal dynamics of a P. vortex swarm is organized into stable traffic lanes, resembling crowd dynamics [14,15]. Attraction toward nutrients occurs in a situation where there is organized traffic of two outer lanes heading toward nutrient sources and one central lane heading away. Swarms collectively navigate (e.g. avoid other swarms) and incorporate nonmotile organisms as cargo [8,11,12]. In this respect, swarming of P. vortex challenges the classical view of swarming as a turbulent-like and mixing dynamics and raises questions as to the balance between cooperation and competition between individuals in group survival. These questions have been considered in other social organisms, e.g. in the selfish herd versus genuine cooperation points of view [16]. The P. vortex swarm may allow insights here, as it appears to be a more cooperative, structured entity with a greater degree of collective decision making than swarming E. coli. In fact, the dynamics of P. vortex shares similarity with human pedestrians which are known to form lanes of organized movement in crowded areas to optimize mobility. In this latter examples, the boundary of the region in which pedestrians walk has a pivotal influence on the internal dynamics [14].
Several multi-agent modeling approaches have been utilized previously to describe collective motion including swarming bacteria [17][18][19][20][21][22][23][24][25][26][27]. We found that the special swarming logistics observed in P. vortex during growth on soft surfaces, in particular the formation of traffic lanes, indicate the action of putative underlying mechanisms that have not been incorporated in previous models. Therefore we devised here a new model which incorporates two special features inspired by close inspection of the observed swarming: first one is chemo-activated taxis in response to chemical cues. The model presented here to study the special aspects of P. vortex swarming during growth on soft surfaces differs from the previous multi-agent model devised to study the special characteristics of P. vortex swarming on hard surfaces [12,13,28]. In both models, the agents (each represents hundreds of cells) are selfpropelled with a fixed maximal velocity (the ratio between self-propulsion and drag). However, the current model incorporates the effect of chemical cues in a special way devised to fit the observations: the influence of increased rate of change in the concentration of a chemical signal (or equivalently a decreased concentration of nutrients) is to shorten the time to reach the maximal velocity. This dependence can be explained as the result of increased coordination between bacteria. A second unique feature of the current model is an align-and-push interaction between the individual bacteria and the swarm envelope (the edge of the lubricant fluid secreted by the bacteria). This is in accordance with the observation that the bacteria swim in a lubrication layer with a well-defined physical edge [12,13]. The model also incorporates bacteria-bacteria collective orientation interactions, similar to the approach of Grossman et al [29], which affect the agent's direction of motion.
The modeling challenge has to do with the fact that the swarm boundary is dynamic-it is pushed forward by the flow of bacteria that move along the envelope. Observing experiments (e.g. movies 2 and 3, available from stacks.iop.org/NJP/15/125019/mmedia), it is evident that bacteria do not collide with the envelope but flow along it. Hence, the boundary does not move due to momentum transfer from bacteria but due to the collective effect of aligning with thousands of bacteria or, possibly, deposition of material. Therefore, from a mathematical point of view, the model is a multiscale free boundary problem. This approach allows us to capture and describe the unique effective interaction between the cells and the envelope. By incorporating the new features described above, the model reproduces a large part of the observed behavior in advancing P. vortex. Moreover, it offers a putative mechanism in which bacteria navigate and effectively steer the swarm by rearranging the internal dynamics.

Swarm dynamics and collective navigation
The complex and structured colonies of P. vortex bacteria are highly sensitive to environmental conditions (mimicked in our experiments). We restricted our study to a particular setup which results in a specific but particularly interesting pattern-that of a branched colony structure; an organized network of streams of motile bacteria. The thin snake-like branches connect larger, densely populated compartments with cells flowing through these connecting highways. This structure facilitates a continuous mixing of cells throughout the colony acting like a highway system. Inside this network of highways, we recognize a new form of collective dynamics in A bacterial colony is three dimensional. A moving group, imaged in two dimensions, is around ten bacteria deep. One of the assumptions that are fundamental to our analysis is that the velocity of layers at the same two dimensional positions is similar. Results from the image analysis on the video tracking data show that the length between cells with opposite velocity directions is approximately 10 µm. The height of a colony is 3 µm which is smaller than the minimum difference between opposite cells. Because of the large depth of focus (almost half to all the colony depth with a ×10 objective lens) relative to the height of microbial colonies the movies analyzed were representative of the overall movement of cells within the colonies. This assumption was checked by adjusting the focus, and did not result in a different view of the traffic within a branch. These observations support the two dimensionality assumption in the model. Within the branches, cell density (estimated from movies and sampling defined volumes using microcapillaries, followed by cell counting) varied by less than 30% fold.
The width of a stream or branch is approximately 200-1000 µm (the width of an individual cell is about 0.4 µm). Inside, the branch is organized in lanes along which cells move toward and away from the tip. The speed of the bacteria is practically constant, typically 4.7 ± 0.4 µm s −1 , and independent of the motion of the branch which can move from zero to 4 µm s −1 . Therefore, the bacteria and the branch front can advance at speeds of the same order of magnitude. Constant speed is an interesting property of P. vortex in this situation. In other bacteria, e.g. E. coli, the speed distribution varies considerably both in space and time [30].
This suggests different gearing (comparing P. vortex to E. coli) in terms of the relationship between the speed of individual motility and the overall progress of swarming masses of bacteria into new territory. Individual cells of E. coli move faster but the rate of swarm front progression is similar or slower for E. coli [7,8,27]. Swarming P. vortex were apparently more efficient in translating individual cell motion into collective action and coordinated in a way not observed in E. coli. As bacteria move faster than the front of the branch, those moving toward the tip are eventually forced to change direction and return. Surprisingly, the inter-branch dynamics occurs in a highly ordered fashion showing self-organization into traffic lanes, separated by a thin interface region of about 10 µm. This behavior is similar to the emergence of traffic lanes in human crowds [15]. Figure 2(A) shows the outline of an advancing branch at uniform time intervals. This is characterized by alternating periods of forward progress, in which bacteria inside the branch pave the way forward, and arrest-reminiscent of stop and go motion in other organisms such as insects. The main feature associated with the switch between these two periods is the internal organization of bacteria in the branch. When the branch advances, the bacteria inside organize into three lanes-two outer lanes of forward moving bacteria, and a central lane of returning bacteria. However, during periods in which a branch does not move, bacteria re-organize into a two lane system and move along the boundary of the lubricating fluid. This suggests a link between single cells and their global motion.

Quantification of self-organized traffic
The dynamics of bacteria moving inside a branch was characterized and investigated using three quantitative measures from physics and fluid mechanics-the velocity profile across the swarm, the flow vorticity and an order parameter. See figures SI3, SI4C, SI4D for comparisons between experiments and simulations.

Velocity profile
The velocity field describes a local average of the instantaneous velocity of bacteria as obtained from video analysis of the experiments. Subplots B and C show the location of the virtual cuts used for analyzing the bacterial flow. Subplots E and F show the branch's instantaneous direction of growth (red) and the normal to the envelope at the point in which the swarm changes its heading (blue).

Vorticity
The local vorticity field quantifies the tendency of the flow of bacteria (agents) to generate eddies. More precisely, it is a local average of the curvature of the trajectories of the individual cells, calculated as the norm of the curl of the velocity field. It is largest (in absolute value) at the center of a vortex and zero where bacteria move in straight lines.

Order parameter
The order parameter field quantifies the local order in the flow. It is defined as the correlation coefficient between the velocity at a given point and its surroundings. A high order parameter (close to 1) indicates that the motion is locally ordered (all the cells move in similar direction), while a value close to zero corresponds with disordered motion (the cells move in random directions).

Group navigation and collective memory
In a branch organized in three lanes, bacteria move forward in the side-lanes toward the tip and turn backwards to the middle-lane. The point of return is where bacteria accumulate from the side-lanes and switch their direction of motion. The relative position of this point varies in time. We found that the point of return is correlated with the global direction of the branch with a To quantify this observation, we define the outer normal to the envelope at the point of return, n r (t), and compare it to the direction in which the normal speed of the envelope is maximal, n e (t). Figure 4 shows the cross-correlation between the two directions n r (t) ·n e (t + τ ) t as a function of a lag time τ . Here, · t denotes averaging over the imaging frames taken during the experiment. The cross-correlation is maximal at a lag time of about 15 s.

Reaction time
In the well-studied run-and-tumble swimming, the direction of bacteria after each tumble is independent of its past. Attractive/repulsive chemotaxis toward/away from high concentration of external chemical field is entailed by lengthening/shortening the runs between tumbling for attractive/repulsive chemotaxis. In order to achieve this biased random walk bacteria frequently measure the present concentration of the chemical field, compare it to previously measured values and lengthen/shorten the runs according to temporal changes in concentration. Hence, the process requires information storage and retrieval, effectively a form of cellular 'memory'. Previous studies found that the memory of individual cells appears to be short, e.g. between 1 and 10 s [31]. In particular, in order to bias the length of runs, the response time (the characteristic time of change of direction) has to be shorter than the average run durations, which is about 1-5 s. This has also been found to be the typical auto-correlation time in the velocity field of swarming Paenibacillus dendritiformis [6] and Bacillus subtilis [32,33]. This is in contrast to the longer reaction times of 15 s or longer observed in P. vortex.

Modeling agents with a self-generated moving envelope
We devised a new agent-based modeling approach in which the edge of the lubrication layer generated by the bacteria is an integral part of the model [34,35]. Since the model incorporates a direct modeling of the interactions between bacteria and the envelope it provides a link between the local forces acting within the swarm and the swarm navigation (see figure 5(A) for a snapshot of the simulation and movies 5-9 (available from stacks.iop.org/NJP/15/125019/mmedia) for simulation results under different external fields). In particular, we show that the organization into well-ordered lanes is an emergent phenomenon as agents self-organize into traffic lanes which are dynamical states of the system. Moreover the preferred existence of each configuration (two or three lanes) depends on the dynamics of the envelope and vice versa. Local forces include the force that the envelope applies on the agents and the force that the agents apply on the envelope. From a mathematical perspective, the interactions between the agents and the boundary are specified via appropriate boundary conditions and a dynamic equation for the moving interface.

The motion and chemo-activated taxis of individual agent
The model consists of N circular agents with radius r . To link with the experimental parameters, we note that each agent represents coarse graining of groups of several hundred bacteria. Hence, r corresponds to about 10 µm. As simulation concentrate on the tip of an advancing branch, the simulations involved several hundred agents representing the bacteria close to the swarm tip.

Agent propulsion
The agents are self-propelled and subject to a high viscosity (associated with the parameter of the lubrication layer). Since the maximal steady velocity of the bacteria is known while the values of the propulsion force and the drag force are not known, we represents the movement of an individual non-interacting agent (i) by where v i is the velocity vector and i is the rate (with units of 1 s −1 ) to reach the asymptotic speed v max . In the simulations, equation (1) is implemented as a forward- In accordance with experiments, v max is of the order of 5 µm s −1 .v i = v i /|v i | is the agent direction of motion. Several previous models assume that agents move at constant speed while only the direction changes. However, in some cases the agents never reach their asymptotic speed due to collisions with other agents and the envelope. This is particularly important when agents form a vortex (in which bacteria close to the center move slower than those at the periphery of the vortex), turn close to the tip of the branch, or move in the interface region between lanes. Finally, the agent vector location x i is determined by dx i /dt = v i . In order to facilitate comparison between simulations and experiments, length in the simulations is measured in units of 15 µm (so the agent radius r is about 2/3 in dimensionless units), the velocity is measured in units of 5 µm s −1 (v max = 1 in dimensionless units) and hence time is measured in units of 3 s. See supplementary data (available from stacks.iop.org/NJP/15/125019/mmedia) for additional information.

Chemo-activated taxis
Bacteria respond to chemical cues represented by an external chemical field (e.g. the concentration of nutrient released from a food source or chemical signals sent from other cells), in different ways. The widely studied mechanisms are the movement toward (attractive) or away (repulsive) high chemical concentrations in the run-and-tumble chemotaxis of swimming bacteria and the faster movement in response to high chemical concentration in chemokenesis of some gliding and swarming bacteria. The observations of the P. vortex swarming on soft surfaces, in particular the movement away from the advancing tip of bacteria in the central lane, suggest a different type of response to chemical cues. For example, our experiments show that bacteria clearly move in a direction opposite to the direction of the moving tip, for example, in the middle lane of three-lane traffic. Motivated by the observation of increased cell movement, we hypothesize that the bacteria respond the external field by increasing the local motility coordination according to the magnitude of the chemical gradient. In other words, the bacteria increase its speed but do not bias it toward or away from high concentrations (perhaps due to increased local order and more coherent motion). This hypothesis is incorporated in the simulation by an increase in the rate an agent can reach its maximal speed in response to a larger gradient in the external concentration. Accordingly, we incorporate the effect of an external field n(x) via linear dependence of the rate i , on the magnitude of the gradient of the external field, so that where c e is a constant. Since the concentrations field of nutrients and other chemicals cues change and diffuse slower than the typical time scale of the simulation, n(x) is taken to be constant in time. We also did not include cell proliferations which occur on a longer time scale (over 30 min) than the recorded time swarm motion (several minutes) which we model here.

Collective orientation interactions
The agent-agent interactions where incorporated following the approach of Grossman et al [29]. In this approach, agents interact via two mechanisms-collisions and reorientations. Collisions are inelastic, i.e., at each collision, the total velocity of the agents is conserved and not the kinetic energy, so a fraction of the kinetic energy is lost. Reorientations occur within an interaction distance r int and include direction alignment, mutual speed adjustment and a bias toward a lower concentration of agents. We estimate that r int is about the length of fully stretched flagella, which can be up to 50 µm long.

The simulation steps
To incorporate both orientation interaction and repulsion interaction, at each simulation step, the following directions are computed: (i)v i -the averaged direction of motion of all the cells within r int . (ii) d i -the direction from the agent location x i to the location of the minimal local density. Note that this direction defines a trajectory of minimal collisions between the agent and the other agents. Next, the new direction of the agent is evaluated as a weighted average of its former directionv i , the local average directionv i and the direction of minimal collisions d i .
More specifically, each of the simulation iteration includes the following steps: • Calculate the average velocityv i = |x i −x j |≤r int v j and center of massx i = |x i −x j |≤r int x j of all agents within r int from x i .
• The new speed is given according to equation (1), • Update positions, • Find all colliding agents (i.e. pairs closer than 2r ). Each collision is processed according to the usual rules of inelastic collisions (see supplementary data, available from stacks.iop.org/NJP/15/125019/mmedia).
The simulation time step was taken to be t = 0.18, which corresponds to about 0.55 s in real units. The dimensionless parameters α and β in equations (3) and (4) represent the balance between the effect of the different inputs on the response of cells. More specifically, each individual cell can sense its local environment. An agent, representing a group of cells respond to the average values of different inputs with some balance.

Modeling the envelope dynamics
The boundary of the lubricating fluid is represented by a smooth envelope which is displaced as the swarm moves forward. The envelope at time t is parameterized as a curve {γ (t; s)|s ∈ [0, 1]} as is illustrated in figure 5(B). The envelope dynamics is specified by the speed of points in the normal direction, denoted dγ n /dt. This displacement is generated by the effect of agents within a boundary layer up to a distance r env from the envelope as is explained next. We estimate that r env is of the order of r int , i.e., about 50 µm.

The agents-envelop align-and-push interactions
Experimental observations reveal that bacteria arriving to the vicinity of the envelope change direction and move parallel to it. This is incorporated in the model by imposing that upon collision with the envelope, agents lose the velocity component normal to γ , thus continuing in a direction tangent to the envelope. In the presence of external chemical field there is additional force acting on the envelope, analogous to the force generated by a magnetic field on a moving particle [28], resulted from the fact that when the agent changes the direction to become tangential to the envelope, it changes its direction relative to ∇n-the gradient of the external field ( figure 5(B)). Collective expansion of the lubrication layer by the bacteria is a highly complex process which involves secretion of the lubrication agent, adjustment of it viscosity by protease secreted by the bacteria and collision-based kinetic wetting of the surface. The collision-based outward translocation force generated by the bacteria colliding with the envelope acts against the lubricant surface tension (proportional to the curvature) and both static (constant) and kinetic (proportional to speed) friction forces. The combined speed of propagation in the normal direction of the envelope is given by where κ(s) is the curvature of γ at s and [·] + = max{·, 0}, σ is the surface tension coefficient, f k and f s is are kinetic and static friction coefficients, respectively and C γ a forcing coefficient. Combined, the size of the force is proportional to the agent's speed and to the norm of the gradient of the driving external field. Note that the effect of agents on the envelope is maximal when their velocity is perpendicular to the gradient. Furthermore, due to the friction, the envelope cannot shrink, i.e., it can only expand outward and not retract. In simulations, (5) is implemented as a forward-Euler step with step size t. All parameter values used in simulations are detailed in the supplementary data (available from stacks.iop.org/NJP/15/125019/mmedia).

Remarks on the modeling approach
The purpose of the model described above is to offer a possible explanation to the observed experimental phenomena, in particular the apparent connection between the local organization of the swarm and the dynamics of its interface. It includes a few non-standard modeling approaches, such as the chemo-activated taxis which depends on the norm of the gradient of nutrients and the rotational agent-envelope interaction described in equation (5). These elements, which can be viewed as phenomenological, can be observed in experiments. For example, bacteria in the middle lane of three-lane traffic accelerate against the direction of propagation of the tip, i.e., against the presumed nutrition gradient. Bacteria 'hitting' the boundary in a direction perpendicular to the direction of the growing tip do not seem to move it. The underling physical and biological mechanisms responsible for these terms are highly interesting. In addition, different constituents of the model may be redundant in the sense that they produce analogue dynamics in some simplified situations. For example, in [36] it is shown that non-elastic collisions can produce alignment and speed-matching between agents. However, these works typically involve a simplified geometry (no external field or no dynamic boundary). Moreover, they do not attempt to reproduce actual experimental observations. This research is beyond the scope of the current manuscript and will be explored in greater depth in future publications.

Lane formation and forward motion
The model can successfully capture the key dynamical features of the observed bacteria traffic.
In particular it led to the self-organization of two and three lane traffic, as well as agreement of the vorticity and local order parameter fields compared to experiments (see supplementary data). The simulations can also generate spontaneous transitions between fast and slow propagation states in agreement with the observed swarm movement. Moreover, the model captures the correspondence between these propagation states and the internal traffic organization inside the branch into two or three lanes, respectively. Thus, the simulations demonstrate how the internal organization of the swarm is associated with its macroscopic behavior. The three lane formation requires that bacteria abruptly change their direction when reaching the tip. This implies a higher angular velocity and, in turn, enables a larger transfer of momentum or lubrication fluid to the tip, compared with bacteria moving in two-lane formation. As a result, the edge of the lubrication layer propagates faster. Furthermore, the model offers an explanation to how the pattern of lane organization can control the global motion of the branch, which is discussed further below. We note that this is only a putative explanation and other mechanisms, not taken into account by the model are also possible. In particular, several features of the real biological system, such as bacteria reproduction, the dynamics of nutrient depletion and added surfactants may also have an important role in the dynamics of the swarm and its boundary.

Swarm-swarm interactions
Laboratory experiments reveal an intriguing swarm-swarm repulsive interaction. As two branches approach, the faster one starts a 'collision avoidance maneuver' by effectively changing its direction as if to avoid the other branch. Avoidance can be beneficial in cases of a lack of nutrients in the medium, where nutrients in the proximity of nearby groups of bacteria have been depleted [23]. Based on the model study, we expect that the change in the swarm direction emerges from a collective response of the bacteria inside the branch to external signals secreted by the bacteria in the other swarm or to depletion of nutrients in the region between the swarms. To test this hypothesis we simulated the repulsion from a neighboring swarm by placing a single branch in the hypothesized effective repellent signaling field secreted by a neighboring swarm. As expected, the simulation revealed a swarm-swarm repulsive dynamics qualitatively similar to the observed one. As the model consists of only a single external scalar field, this situation is also equivalent to depletion of nutrients. See figure 1(B) (movies 3 and 4, available from stacks.iop.org/NJP/15/125019/mmedia) for experimental observations. Figure 6(C) and movie 7 show the corresponding results for the simulated repelling movement between two swarms.

Navigation toward food sources
Next, the model was exploited to investigate navigation toward a local food source as is shown in figure 6(D) and movie 8. It has been observed [8] that the swarms usually do not navigate directly toward the food source, but rather pass it and then turn sharply as seen in figure 1(C). This behavior is analogous to the sharp turning observed when repelling from a neighboring branch. Another interesting scenario is movement toward two food sources.
Here, both experiments [8] and simulations show that initially the branch moves toward one of the food sources and then splits or widens to engulf both food sources. See figure SI2 for experiments and figure 6(E), movie 9 for simulation results.

Conclusions
The lesson learned from the simulations is that the special interaction between the bacteria and the swarm envelope mediates a coupling between the internal swarming traffic and the swarm propagation and navigation. The simulations also revealed that alignment and matching of speeds with neighbors dominate over the inelastic collisions between agents. Therefore, even though inelastic collisions are included in the model, we expect that their importance will be reduced in finer simulations with a larger number of agents. How can local interaction rules control the internal swarm organization? Simulations suggest that agents which are closer to the food source increase their speed. An uneven accumulation of cells on the side of the branch tip closer to the food source results in shifting of the tip to the other side. The lag time between the return angle and the angle of instantaneous maximal growth, shown in figure 4, may reflect the existence of this mechanism and provides an estimate of its characteristic time. Indeed, the simulations qualitatively reproduce a collective navigation of the swarm in the direction of a source (figure 4 and movies 7-9 (available from stacks.iop.org/NJP/15/125019/mmedia)).

Looking ahead
The management of resources logistics in a distributed system is a general concept, which appears in different fields ranging from nature to technology. Nature, being the product of natural selection, offers magnificent solutions to practical logistical problems as seen in the architecture of termite mounds and the complexity of ant trail networks. Even simpler, non-neuronal organisms, such as slime molds, were shown to create efficient and resilient networks [37,38]. In this paper, we described a new form of resource and risk management within a prokaryotic (bacterial) colony created from continuously moving cells. Swarms of P. vortex show cooperation and collective strategy selection across different scales-from their internal organization within a swarm to the entire colony. Its logistic network includes movement and interaction between swarms through a complex network of highway-like branches connecting densely populated areas. The self-organized swarming logistics, which relies only on local interactions between cells and their environment allows transport of nutrients, spores and even other organisms across the colony [9,10]. These new types of collective behaviors constitute a link to multi-cellularity, persistence and swarming intelligence. Here, we focused on the scale of a single swarm. Future work will involve a multiscale analysis and modeling of the swarm network with particular emphasis on the effect of a heterogeneous environment, for example, by designing experiments and simulations with obstructions. This will allow a thorough investigation of the difference constituents of the model in order to establish which ones are necessary in order to model the observed phenomena, which are redundant, and in what situations.
We envision that the model can be generalized and applied to other examples of swarm formation during collective migration including crowd dynamics, slime-mold networks and metastatic cancer cells.