Emergent behavioural phenotypes of swarming models revealed by mimicking a frustrated anti-ferromagnet

Self-propelled particle (SPP) models are often compared with animal swarms. However, the collective animal behaviour observed in experiments often leaves considerable unconstrained freedom in the structure of a proposed model. Essentially, multiple models can describe the observed behaviour of animal swarms in simple environments. To tackle this degeneracy, we study swarms of SPPs in non-trivial environments as a new approach to distinguish between candidate models. We restrict swarms of SPPs to circular (periodic) channels where they polarize in one of two directions (like spins) and permit information to pass through windows between neighbouring channels. Co-alignment between particles then couples the channels (anti-ferromagnetically) so that they tend to counter-rotate. We study channels arranged to mimic a geometrically frustrated anti-ferromagnet and show how the effects of this frustration allow us to better distinguish between SPP models. Similar experiments could therefore improve our understanding of collective motion in animals. Finally, we discuss how the spin analogy can be exploited to construct universal logic gates, and therefore swarming systems that can function as Turing machines.

FIG. 1. Different self-propelled particle (SPP) models are studied in confining channels.Isolated system: The macroscopic behavior of a ring containing swarming animals is approximated by interacting agents moving in a linear, semiperiodic channel, for simplicity.Clockwise/anticlockwise collective motion in the ring, analogous to a spin, corresponds to motion up/down the semi-periodic channel.Frustrated system: The motion within three rings arranged on a triangular lattice is frustrated when interactions are permitted across windows between the tracks.This is again simulated using linear semi-periodic channels for the SPP model (which remain linear but are shown as kinked in the middle panel for clarity; periodic linear channels with windows between all pairs cannot easily be represented in a 2D image).This system is analogous to a geometrically frustrated anti-ferromagnet.
ducing this stylized behavior.It is a challenging task to distinguish structurally distinct candidate models by comparison with data like this.Our approach is to seek to break the behavioral degeneracy between models.In order to achieve this we first consider two ring-shaped channels arranged near to one-another that share a (section of) boundary through which the individuals can pass information but cannot physically cross.This could be arXiv:1408.1593v1[q-bio.PE] 7 Aug 2014 realised experimentally by connecting the rings by a window.In animals that mainly employ a sense of vision a transparent window would be appropriate; for animals that use touch a limited physical opening might be used.This window provides a coupling between the two rings.
Here we extend the interactions between individuals to include neighbours that are visible through the window, as well as those that are visible within the same ring, and use the same behavioral rule for both cases.For highly polarised swarms, driven by co-alignment, we would then expect a ring polarised anticlockwise (an "up" spin) to be most stable when it is adjacent to a ring polarised clockwise (a "down" spin), or vice-versa: Only in this situation would neighbours connected through the window also find themselves co-aligned.The coupling across the window is therefore antiferromagnetic in character.
Inspired by the extensive literature on frustrated antiferromagnetic systems [26][27][28] we analyse motion in three rings arranged so they each each share a boundary with the other two, see the frustrated system panels Fig. 1.In this way we create a system similar to geometrically frustrated antiferromagantic atoms on a triangular lattice.It is no longer possible for all three rings to remain highly polarised and co-aligned across all windows.As in the analogous magnetic system we no longer expect a unique pair of symmetric ground states to exist.We anticipate that additional information can be obtained from the resulting behavior, whatever it may be, that can be used to better distinguish microscopic models when they are constrained against observed behavior.
In what follows we compare two different SPP models frustrated in this way.Apart from the boundary conditions both take a fairly standard form in which N particles move in a periodic box with a constant speed v 0 = 1.When combined with a (unit) time step this defines our units of length throughout.At each discrete time step every particle orientates its velocity along the average direction of motion of its neighbours.The only difference between the two models studied here will be how these neighbours are identified.Writing those neighbours to the i th particle as N i the equation of motion involves the average velocity of its neighbours v t j j∈Ni ≡

Noise is introduced by randomly orientated unit vectors ηt
i that are uncorrelated between individuals and in time ηt i • ηt j = δ ij δ tt .The position, r t i , and velocity, v t i , of particle, i at time t are then given by the following equations, where the parameter φ n < 1 controls the relative weighting of the noise term and a hat ˆindicates a unit vector throughout.
The first of our models is typical of a class that identify nearest neighbours according to a metric-based measure of distance (the model due to Vicsek and coworkers [10] is often cited as a prototype).Here a particle co-aligns with others that lie within a fixed interaction range R.This definition means that individuals can have as few as zero or as many as N − 1 neighbours.The second model selects nearest neighbours according to a metricfree scheme, motivated by the evidence for interactions with this character in bird flocks [29,30].In this model each particle aligns with the N c nearest particles, irrespective of absolute separation.Both these models generally exhibit two distinct states, ordered, in which the particles achieve a high level of polarization and all their velocities are locally highly aligned, and disordered, in which there is no net polarization and the velocities of individuals are largely uncorrelated.The transition from the disordered to ordered state is primarily controlled by two quantities: the noise weighting φ n and the density of particles.For sufficiently low noise, φ n , and high density the system is ordered.As the noise is increased (or the density is decreased) the system undergoes a transition into the disordered state.Here, we simulate swarms of N = 100 SPPs in a semi-periodic box of width and height W = H = 2.5 and length L = 25 in the x, y and z direction respectively.This is an unconventional choice in that the system is only periodic in the z direction, instead of in x, y and z.If a particle reaches a boundary perpendicular to the x or y directions it undergoes an elastic collision, or reflection, in which the component of its velocity perpendicular to that boundary is reversed.
In this way the swarm can be confined to a slender, periodic channel, see SI for details.This leaves three free control parameters, the number of particles, N , the noise weighting, φ n , and the interaction range, R for the metric and N c for the metric-free models (see SI for details).Simulation were computed for 90,000 time steps after a 10,000 time step pre-equilibration (except for the spatial inhomogeneity data where ten realisations each of 10,000 time steps were more appropriate).
Due to the nature of the semi-periodic box, the swarm cannot sustain a high level of polarization unless it is aligned nearly parallel, or anti-parallel, to the z axis.This is because orientation in either the x or y direction will result in collisions with the non-periodic boundaries and the individuals in the swarm will then rapidly change direction in an incoherent fashion until order along z reemerges.For this reason it is possible to quantify the polarization of the system using only the z-component of velocity, analogous to the polarization of circulation.
For disordered swarms P t z ≈ 0, and for highly ordered swarms P t z ≈ ±1.Swarms of SPPs confined in these channels support both ordered and disordered phases (with high and low polarizations, respectively), with a transition between the two around φ n ∼ 0.5, see Fig. 2 (single channel).Near this transition the swarms are polarised, P t z ∼ 0.5 and have a clear direction of motion along the channel, but there is still sufficient noise that the swarm can re-verse direction, evidenced by the autocorrelation times for P t z .As φ n is decreased, the rate of these directional switches decreases and the direction of polarization eventually no longer changes on timescales that are accessible in our simulations.A similar outcome is observed for both SPP models, reproducing the behavior of insect swarms enclosed in a ring and previous simulations thereof [20].2. The behavior of the metric and metric-free models can be more easily distinguished when the system is frustrated.Simulations are performed in a single channel (top panel), and a system of three fully frustrated channels (bottom panel).Shown is the average polarization magnitude ( |Pz| , left column), polarization correlation, or persistence, time (τP z , middle column), and the spatial inhomogeneity (ξ, right column) for various interaction ranges (R or Nc for metric or metric-free models respectively) and noise levels (φn), see text for details.

Single Channel
In order to introduce a coupling between two adjacent channels they are positioned alongside each other so that they share a face normal to the y axis (say), i.e. particles in channel 1 can be thought of as being restricted to x ∈ [0, W ] and particles in channel 2 to x ∈ [−W, 0].This means that the minimum distance between two particles in different channels is zero and particles in different channels can co-align if the line-of-sight connecting them passes through a region designated as a window.No transport of particles is allowed across the window.We can adjust the degree of coupling between two channels by changing the length of the windows.With pairwise coupling between three channels we can arrange them so as to be mutually frustrating, see Fig. 1.
Since we are not restricted by geometrical considerations in these simulations, it is possible to extend the windows to run along the full length of the channel, with each channel sharing such a window with each of the other channels.We refer to this as a fully frustrated system.The results of simulations on such fully frustrated systems are as follows (see SI for details): For weak interactions (short ranges R or small number N c ) little difference is observed in the behavior of the swarms, see Fig. 2 (frustrated system).However, when the interaction becomes stronger SPPs with metric-based interactions no longer reach long lived states with nearly constant polarization.When the interaction range becomes comparable to the width of the channels, W ∼ R, two swarms in adjacent channels are unable to pass by each other without interacting.This often results in one of them reversing direction.It also acts to push the swarms into high density bands since the leading front is the first to be affected by a band in another channel (see SI movies).This is evidenced by the higher values of ξ, defined as the maximum time-averaged variance in the number of particles observed in any constant fraction of the channel length.In contrast to this, SPPs with metric-free interactions exhibit high polarization and long polarization autocorrelation times, τ P z .As these swarms clump into bands the majority of nearest neighbours remain sited in the same channel, which leads to a weaker coupling between swarms in adjacent channels; this allows them to pass each other without a significant effect on the polarization.Hence the fall in persistence times is not seen for metric-free swarms.We also studied partially frustrated systems in which the windows extend over only a third of their length (resembling the physical system sketched in the bottom left panel of Fig 1).This show qualitatively similar, but slightly weaker, effects (see SI).
In the final part of this letter we explore further the the spin-like nature of the motion within these channels to construct an information processing device.First we define a "bit" as We now study the arrangement of channels shown in Fig. 3.Here the polarization of the Out channel depends on the polarizations of channels In 1, In 2 and L (for Locked).Adopting a state that minimises the overall frustration would (and does) lead to the logic table shown in Fig. 3, which is equivalent to an OR gate [31].
To validate that the logic table shown in Fig. 3 is indeed realised we employ SPP particles with metric-based interactions of range R = 2.5 and noise level φ n = 0.5.In the absence of frustration this would lead to moderately polarised swarms with long persistence times, see We study a SPP system in the corresponding arrangement of semi-periodic channels (middle column).The table shows the polarization directions that minimise frustration for different combinations of input polarizations (right column); this corresponds to the output of a logical OR gate.
Fig. 2. We include fewer particles in the Out channel and assign it a width that is smaller than the interaction radius in order to make it reverse direction more rapidly than the In and L channels when it is frustrated (see SI for details).This results in an essentially deterministic logical output, rather than one that is only realised statistically, because the Out channel responds to the In channels, and not the other way around.This effectively means the In and L channels don't spontaneously reverse polarization.In order to probe the systems response we manually invert the directions of all particles in either of the In channels in order to study the corresponding outputs, see Fig. 4 and SI movies.
In summary, we show that different models can better be distinguished when the particle (animal) motion is frustrated.We achieved this by introducing windows through which particles confined to different channels can interact.We then use a channel geometry that mimics a geometrically frustrated antiferrognet.This approach promises to allow us to better distinguish between models for animal behaviour by comparing them with experimental data that is itself obtained in frustrated geometries.Ultimately this could lead to an improved insight into the behavioural mechanisms that lead to swarming, one of the prototypical examples of emergent order in nature.Finally, we use a spin analogy to propose confining geometries in which the swarm(s) perform the operation of a universal logic gate.These could be combined to perform more complex computational tasks, placing a bound on the computational capability of animal swarms, at least those that are artificially confined in this way, to that of a Turing machine.Although the computation that is being performed in this class of confining geometries is unlikely to more than very loosely related to the computation that is being performed in swarms of unconfined animals our results underline the fact that there is no known limit to the emergent computational power of a swarm.
FIG.2.The behavior of the metric and metric-free models can be more easily distinguished when the system is frustrated.Simulations are performed in a single channel (top panel), and a system of three fully frustrated channels (bottom panel).Shown is the average polarization magnitude ( |Pz| , left column), polarization correlation, or persistence, time (τP z , middle column), and the spatial inhomogeneity (ξ, right column) for various interaction ranges (R or Nc for metric or metric-free models respectively) and noise levels (φn), see text for details.

FIG. 3 .
FIG.3.Rings containing SPPs, as model for animal systems, that are predicted to perform a logical OR, with the direction of polarization of the Out ring the output, and In 1 and In 2 the inputs (left column).We study a SPP system in the corresponding arrangement of semi-periodic channels (middle column).The table shows the polarization directions that minimise frustration for different combinations of input polarizations (right column); this corresponds to the output of a logical OR gate.

FIG. 4 .
FIG.4.The polarization of SPP particles with metric-based interactions moving in the system shown in Fig.3.The polarization in each channel is recorded over the course of a simulation run in which the particle polarizations in the In 1 (red trace) and In 2 (green trace) channels are manually inverted at intervals of (a) 10,000 and (b) 2,000 time steps.Also shown is the Out channel (black trace) and Locked channel (designated L, blue trace), the latter maintaining a positive polarization through.After inversion the polarization of the Out channel undergoes a spontaneous and rapid transition to the state shown in the table under panel (a), if necessary, and will maintain this for more than 99% of subsequent time steps under both slow (a) and fast (b) switching of inputs.Such systems can therefore mimic the behavior of a deterministic, rather than statistical, logic gates (see SI for details).