Vous êtes sur la page 1sur 13

Milling and meandering: Flocking dynamics of stochastically interacting agents with a

field of view

Trilochan Bagarti and Shakti N. Menon


The Institute of Mathematical Sciences, CIT Campus, Taramani, Chennai 600113, India
(Dated: May 3, 2018)
We present a stochastic agent-based model for the flocking dynamics of self-propelled particles that
exhibit velocity-alignment interactions with neighbours within their field of view. The stochasticity
in the dynamics arises purely from the uncertainties at the level of interactions. Despite the absence
of attractive forces, this model gives rise to a wide array of dynamical patterns that exhibit long-time
arXiv:1805.00755v1 [cond-mat.stat-mech] 2 May 2018

spatial cohesion. To classify these patterns, we present an algorithm that determines the number of
spatial clusters and their associated angular momenta.

The collective movement of large groups of microor- field of view on the dynamics of particles that undergo
ganisms, insects, birds, and mammals are amongst the stochastic velocity alignments remains an open question.
most spectacular examples of self-organized phenomena Moreover, while certain types of position-dependent in-
in the natural world [1, 2]. Species across a range of teractions can facilitate cohesion in a flock [18, 19], it
length scales exhibit a rich variety of collective patterns is intriguing to consider how this outcome might be
of motion that are united by similar underlying char- achieved with velocity alignments alone. Furthermore,
acteristics [3, 4]. Advances in experimental techniques while some flocking models have incorporated the accel-
for investigating flocking [5] has sustained interest in un- eration of particles to describe short-term memory [20],
covering the principles that underpin this emergent phe- collision avoidance [21], consensus decision making [22]
nomenon. For instance, recent experiments have demon- and other experimentally observed features [23], the role
strated that pairwise interactions motivated by biological of position-independent stochastic acceleration remains
goals play a crucial role in determining insect swarming to be established.
patterns [6]. Flocks may fundamentally be viewed as dry In order to address these questions, we propose in this
active matter, namely systems of self-propelled particles letter a novel paradigm for flocking in which long-time
that do not exhibit conservation of momentum [7], and spatial cohesion can emerge through a stochastic acceler-
their dynamics can be understood as a process similar to ation, despite the absence of attractive forces or explicit
the long-range ordering of interacting particles [8]. Fol- confinement. We assume that the interaction between
lowing the seminal work of Vicsek et al. [9, 10], the dom- a chosen pair of particles depends only on their respec-
inant paradigm in models of flocking is that stochasticity tive velocities, in contrast to the typical assumption of
in the dynamics can be accounted for through external two-body or mean-field interactions that depend on the
noise (either additive or multiplicative). While this ap- relative positions of particles. While most previous flock-
proach may be suitable to describe systems of Brownian ing models account for stochasticity through an external
particles, where fluctuations arise from the surrounding noise, here it is a consequence of uncertainty in velocity
media, it cannot account for the source of stochasticity in alignments. This leads to a variety of emergent collective
flocks, namely variability in the behaviour of individual dynamical patterns whose spatio-temporal characteris-
particles [11, 12]. Furthermore, the collective dynamics tics vary significantly. Finally, in order to classify these
of a swarm is known to be density-dependent [13, 14], patterns in a unified manner, we present a cluster-finding
which tacitly suggests that variations in individual be- algorithm that determines the the number of clusters and
haviour may have a cumulative impact. Hence, it is of their associated angular momenta.
significant interest to consider the emergent flocking be- We consider an agent-based model of N interacting
haviour in a system where stochasticity arises purely from point-like particles. The state of each agent i at a time
the uncertainties at the level of inter-particle interactions. step t is described by its position xi (t) and velocity vi (t).
At step t + 1, the state of agent i is
In situations where individual particles are unable to
vi (t + 1) = vi (t) + ai (t) , with probability Pi , (1a)
uniformly survey their neighbourhood due to physiologi-
cal or other constraints, their interactions would be lim- xi (t + 1) = xi (t) + vi (t + 1) , (1b)
ited to neighbours that lie within a field of view [15]. It where ai (t) is a stochastic acceleration that occurs with
was recently shown that such a restriction can yield a probability Pi , and which is given by
jamming transition, even at extremely low particle den- 
sities, in a lattice model of flocking [16]. Furthermore, −vi (t) + |vi (t)| η̂, if Ωi = ∅,
ai (t) = (2)
a range of flocking patterns can be observed in a sys- α[v0 − vi (t) + f (v0 + vi (t))], otherwise,
tem with position-dependent short range interactions re- where the coefficient α < 1 is the strength of interac-
stricted by a vision cone [17]. However, the role of a tion, η̂ is a unit random vector, Ωi is the set of all agents
2

with which agent i may interact with, and v0 = vi0 (t) a1 a2


0.2
a3
for a given i0 ∈ Ωi . The initial condition is specified
as xi (0) = x0i and vi (0) = vi0 for all i = 1, 2, . . . N . The L
stochastic acceleration ai (t) in Eq. (1a) occurs with prob- −0.2
40 2000
ability Pi = 1 if Ωi = ∅, and Pi = p(x0 , v0 |xi (t), vi (t))
otherwise. In the situation where agent i finds no one 0 t(×104 ) 2
to interact with (i.e. Ωi = ∅), there is simply a ran- b1 b2 b3
40
dom rotation of the agent’s velocity. As a consequence,
isolated agents near the edge of the flock perform Pear- L 0
son walks, which makes them more likely to locate other
100 100 −40
agents than if they were to move away ballistically. Thus,
the presence of a random rotation term in the equation 0 t(×104 ) 8
for stochastic acceleration is crucial in maintaining the c1 c2 400 c3
observed cohesion of the flock.
When Ωi 6= ∅ the ai (t) depends on the velocity v0 of L
a randomly chosen particle. In this situation, the linear 400 400
term v0 − vi (t) in Eq. (2) describes an alignment inter- −200
0 t(×104 ) 6
action. The nonlinear term f (v0 + vi (t)) allows for the 20
d1 d2 d3
stablization of velocity around a critical value |vi | = vc ,
so that all the particle move, on an average, at the same
L
speed. The precise functional form of f (v) is not qualita-
tively significant, provided that f vanishes at large v, and 20 20
near a critical speed vc it follows f (v) ' v sgn(vc − |v|). 0
0 t(×104 ) 6
Assuming vc = 1 with no loss of generality, we define
e1 e2 0.4 e
f (v) := v(1 − |v|)/(1 + |v|β ), a functional form that en- 3

sures that the velocity remains bounded for β > 2 (for


L 0
our simulations, we use β = 3). Here, we would like
to emphasize that as the stochasticity in the dynamics 2 2
depends locally on each Ωi , the noise in the system is −0.4
0 t(×104 ) 6
spatially heterogeneous and varies with the local density.
For our current investigation, we assume that every agent
i has a field of view, symmetric around its direction of FIG. 1. Examples of the spatially contiguous dynamical flock-
ing patterns exhibited by the model for a system of N = 103
motion, that is delimited by a maximum bearing angle agents. In each row the left panel displays a snapshot of the
θmax . The state of a randomly selected agent j ∈ Ωi is flock, the right panel displays the angular momentum per par-
(xj (t), vj (t)), and θi,j is defined to be the angle between ticle L over a duration of time, and the middle panel displays
vi and the vector xj −xi (see Supplementary Information the corresponding movement of the center of mass of the flock
for more details). We assume that most of a particle’s x̄(t) over the same duration. (a1 -a3 ) Agents moving in a band
interactions are with agents at an optimal interaction for the case σ = 6, θmax = 90 and α = 0.1. (b1 -b3 ) Agents
length, and that the probability of selecting a neighbour moving in a wriggling pattern for the case σ = 5, θmax = 40
and α = 0.8. (c1 -c3 ) Agents moving in a closed trail for the
lying very close to, or far away from it, approaches zero. case σ = 3, θmax = 50 and α = 0.1. (d1 -d3 ) Agents moving in
The probability p(xj , vj |xi , vi ) that i aligns with j can a milling pattern for the case σ = 1, θmax = 20 and α = 0.025.
be hence expressed in terms of the transition rates (e1 -e3 ) Agents moving in a flock with a meandering center of
mass for the case σ = 3, θmax = 15 and α = 0.02. The num-
|xi −xj |2
bered solid bars in the left and central panels of every row
ωi,j = |xi − xj | e− 2 2

2σ 2 1 − θi,j /θmax , (3)
provides a measure of spatial distance in each case.
and ωi,j = 0 for θi,j > θmax , where σ is the mean in-
teraction length. In the limiting case θmax = π, there
are no random rotations as, by definition, Ωi 6= ∅ ∀ i. the critical velocity vc by scaling x → x/vc and v → v/vc
In this situation any initial randomness will eventually in our model. In our simulations, the agents are initially
get redistributed over the whole population, and it is ex- distributed randomly over a small region of size ∼ O(σ).
pected that the velocities will converge to that of the
initial mean velocity. Furthermore, here an agent i has Upon varying the parameters σ, θmax and α for a sys-
the highest likelihood to align with any neighbour j that tem of N = 103 agents, we find that the model exhibits
approximately lies at a distance |xi − xj | = σ (i.e. where a wide range of patterns (see Fig. 1), many of which are
ωi,j is at its maximum). Since we assume that time is reminiscent of those observed in various flocking systems
dimensionless, we can express the parameter σ in units of in nature. We find that the resulting patterns can sus-
3

a b
8
milling
10 meandering 0.12
trail milling

P(s, t)
wriggling
band
6
10 200
0 t
hs i 2 0 s 100 2000
c
4
10 0.06
wriggling

10
2
P(s, t)
200
0 t
2
t
4 0 s 800 2000
10 10

FIG. 2. Statistics of the center of mass trajectories (a) Time-


dependence of the average mean-squared displacement (MSD)
of the center of mass hs2 i, calculated over 104 trials, for each
of the five sets of parameter values considered in Fig. 1. The
dashed line, shown for reference, indicates the MSD for the
case of normal diffusion. (b-c) The probability distribution
function P (s, t), calculated over 5 × 104 trials, shown over a
range of displacements s and time t for the cases (b) σ = 1,
θmax = 20, α = 0.025 (a milling pattern), and (c) σ = 5,
θmax = 40, α = 0.8 (a wriggling pattern). The arrow in panel
(b) indicates a large excursion. FIG. 3. Parameter space diagrams obtained using the
cluster-finding algorithm described in the text. The results
are displayed over a range of values of the mean interac-
tion length σ and the maximum bearing angle θmax for (a)
tain their cohesiveness over a very long period of time α = 0.01, (b) α = 0.05, (c) α = 0.1 and (d) α = 0.5. The
(t ∼ 106 steps). These observed patterns include an ex- regimes are classified on the basis of the ensemble-averaged
tended band-like flock that can move ballistically for long quantities hNc i and hΛi, and are coloured in accordance with
the displayed table.
durations (Fig. 1(a)), a spatially extended wriggling pat-
tern (Fig. 1(b)), a very large and narrow closed trail pat-
tern (Fig. 1(c)), a flock that exhibits a milling, or vortex-
like, pattern (Fig. 1(d)), and a flock with a meandering case of the band-like patterns (Fig. 1(a2)) to winding be-
center of mass, and rotating profile, that remains con- haviour with occasional long excursions, reminiscent of a
fined to a small region of space (Fig. 1(e)). Movies of the correlated random walk, in the case of the milling pat-
patterns displayed in Fig. 1(b1 -e1 ) are included as Sup- tern (Fig. 1(e2)). To discern the macroscopic features of
plementary Information. We note that as the nature of these trajectories, we discard an initial transient period
cohesiveness locally depends on the number of agents in of duration t0 = 103 and compute the probability distri-
a given region, the specific pattern that can be obtained bution function P (s, t), where s = |x̄(t) − x̄(t0 )|, and the
for a choice of parameter values will also depend on the mean square displacement (MSD) of the center of mass,
total size of the flock. Furthermore, in addition to the hs2 i. While the trail and wriggling patterns show a su-
patterns displayed in Fig. 1, this system can exhibit mul- perdiffusive behaviour at small time scales they appear to
tiple interacting clusters whose characteristics depend on converge to normal diffusion hs2 i ∼ t asymptotically (cf.
the constituent number of agents. In Fig. 1(a3 -e3 ), we dashed line in Fig. 2(a)). In contrast, the milling and
show the temporal variation of the angular momentum the meandering patterns are initially subdiffusive and
per particle, L = N −1 i (xi − x̄)×vi for the asymptotically converge to normal diffusion, while the
P
P correspond-
ing flocking patterns, where x̄(t) = N −1 i xi (t) is the band pattern is superdiffusive at all times. The prob-
center of mass of the flock. We observe that this quantity ability density function P (s, t) for the milling and the
exhibits remarkably distinct temporal profiles for each wriggling patterns are shown in Fig. 2(b) and (c). We
of the displayed patterns, and captures the spontaneous find that the patterns show a qualitatively similar decay
switching/reversal in the direction of rotation of the flock of P (s, t) at small times. However, as indicated by an
which manifests as a change in the sign of L. arrow in Fig. 2(b), the center of mass of the milling pat-
As can be seen in Fig. 1(a2 -e2 ), the trajectories of the tern exhibits a higher probability of large excursions at
center of mass of the flock, x̄(t), illustrate the diversity later times, which corresponds to durations where rota-
of collective dynamics that this model is capable of ex- tion ceases due to an internal reorganization of the flock.
hibiting. These range from near-ballistic motion in the Flocking dynamics has long been studied from the per-
4

spective of a disorder to order transition that is typically (α = 0.05, 0.1). Several snapshots of the collective pat-
characterized using a scalar order parameter. However, terns obtained over the entire range of parameter values
it is apparent that such an approach would be unable to displayed in Fig. 3 are presented in the Supplementary
capture the breadth of complexity associated with the Information.
flocking patterns reported here. Hence, we present a A crucial feature of our model is that the stochasticity
cluster-finding algorithm that classifies the patterns in is maximum at the edges of the flock, while the stochastic
terms of the number of distinct (contiguous) clusters velocity alignments in the interior of the flock gives rise
and their associated angular momenta at a given time, to comparatively ordered behaviour through a process
through the following procedure (this algorithm is rigor- of self-organization. In addition to facilitating cohesion,
ously detailed in the Supplementary Information). We this may help explain the apparent symmetry of several of
define the resolution length R = λRmax , where 0 < λ ≤ the patterns (c.f. milling, meandering and closed trails),
1, and Rmax is the maximum separation between any two as flocks with relatively smoother boundaries have much
particles in the flock at time t. At the length scale Rmax lower stochasticity overall. In other words, the overall
the system can be viewed as comprising a single cluster stochasticity reduces through a minimization of surface
that encompasses the entire flock. For the chosen length area. In this regard, the existence of the wriggling pat-
scale R, we first compute ri,j = |xi (t) − xj (t)| for all tern, which has a rougher boundary, is due to the fact
i,j 6= i, and group the agents into distinct clusters such that the stochasticity at the edge is reduced for larger
that a pair of agents (i, j) in any given cluster satisfies the values of σ. These results are intriguing in light of re-
condition ri,j ≤ R. Next, we regroup the agents such that cent observations that the boundary of a flock plays an
if ri,j ≤ R and rj,k ≤ R but ri,k > R then the agents i, j, important role in its emergent dynamical properties [25].
and k are assumed to belong to the same cluster. The res- Additionally, we note that as the alignment probability
olution length R hence provides a lower bound on the spa- in our model is dependent on θmax , there is an inherent
tial separation of any pair of detected clusters. Once the spatial anisotropy in the stochastic interactions. Specif-
individual clusters ci (of size Ni ) have been determined, ically, for θmax < 90 agents do not interact with neigh-
we define Nc to be the minimum number of clusters bours that lie directly behind them. This may relate to
whose collective population
Pn exceeds 90% of N , i.e. Nc = the emergence of milling patterns in our model, as pre-
min {n : 0.9 N ≤ i=1 Ni , 1 ≤ n ≤ N }. The P center of vious flocking models that reported such patterns have
mass of a cluster ci is defined as x̄i = Ni−1 j∈ci xj , and typically incorporated such a “blind zone” for agents [26–
the corresponding angular momentum about the center 28]. This pattern has been observed in diverse contexts
of mass is Li = Ni−1 j∈ci (xj − x̄i ) × vj . The different
P
across the natural world including fish schools and ant
phases of flocking
PNcan then be characterized by the quan- mills [27, 29, 30]. Furthermore, it can be seen that Ωi
tity Λ = Nc−1 i=1 c
|Li |, where the absolute value sign is not invariant under the transformation vi → −vi , as
takes into account the fact that the flock may contain a consequence of the inherent anisotropy of the field of
clusters that swirl in opposite directions. In our simula- view, which hence breaks the time-reversal symmetry.
tions we have used λ = 2−4 , and find that a small varia- However, such a transformation will not affect the na-
tion R ± δ, where δ ∈ (0, R/2), does not affect the classi- ture of the pattern at the scale of the entire flock.
fication of the patterns. Note that in the limit λ → 0 we In conclusion, our model provides a mechanism
would, by definition, find N clusters that each comprise through which stochasticity can arise intrinsically from
a single agent. the interactions between agents. This framework can,
We determine ensemble-averaged values of the quan- in principle, be generalized to the case of stochastic
tity hΛi and the number of clusters hNc i for systems of many body interactions. In addition, our cluster-finding
size N = 103 over 10 trials for a range of values of θmax , method characterizes the rich dynamical patterns ob-
σ and α. As seen in Fig. 3, the parameter space can served in terms the number of distinct clusters and their
be classified into distinct regimes of collective activity. angular momenta. This method could also be used to
We observe that the patterns seen for lower values of study the evolution of experimentally observed flocking
θmax (. 20◦ ) are always characterized by a single cluster, patterns. Furthermore, the model proposed here could
regardless of σ or α. While both the milling and me- be extended to describe situations of pursuit and evasion
andering patterns are seen for θmax ≈ 20◦ , the latter is in predator-prey systems [31], as well as considering the
characterized by a much lower value of Λ. At very low role of social hierarchy in flocks [32].
θmax , we consistently observe that the patterns comprise We would like to thank Abhijit Chakraborty, Niraj Ku-
a single cluster, characterized by extremely small val- mar, V. Sasidevan and Gautam Menon for helpful discus-
ues of Λ, corresponding to cohesive but highly disordered sions. SNM is supported by the IMSc Complex Systems
flocks, reminiscent of midge swarming patterns [24]. Pat- Project (12th Plan). The simulations and computations
terns with very large Λ, which typically correspond to required for this work were supported by the Institute
single or multiple closed trails, are most likely to be ob- of Mathematical Science’s High Performance Computing
served for intermediate values of the interaction strength facility (hpc.imsc.res.in) [nandadevi], which is partially
5

funded by DST. 726 (2012).


[16] S. N. Menon, T. Bagarti, and A. Chakraborty, Europhys.
Lett. 117, 50007 (2017).
[17] L. Barberis and F. Peruani, Phys. Rev. Lett. 117, 248001
(2016).
[1] T. Vicsek and A. Zafeiris, Phys. Rep. 517, 71 (2012). [18] G. Grégoire, H. Chaté, and Y. Tu, Physica D 181, 157
[2] D. J. Sumpter, Philos. Trans. Royal Soc. B 361, 5 (2006). (2003).
[3] J. K. Parrish and W. M. Hamner (Eds.), Animal Groups [19] G. Grégoire and H. Chaté, Phys. Rev. Lett. 92, 025702
in Three Dimensions, (Cambridge University Press, (2004).
Cambridge, U.K., 1997). [20] P. Szabó, M. Nagy, and T. Vicsek, Phys. Rev. E 79,
[4] G. I. Menon, in Rheology of Complex Fluids, edited by 021908 (2009).
J. Krishnan, A. Deshpande, and P. Kumar (Springer, [21] L. Peng et al., Phys. Rev. E 79, 026113 (2009).
New York, 2010). [22] K. Bhattacharya and T. Vicsek, New J. Phys. 12, 093019
[5] A. Cavagna, I. Giardina, and T. S. Grigera, Phys. Rep. (2010).
728, 1 (2018). [23] S. Mishra, K. Tunstrøm, I. Couzin, and C. Huepe, Phys.
[6] J. G. Puckett, R. Ni, and N. T. Ouellette, Phys. Rev. Rev. E 86, 011901 (2012).
Lett. 114, 258103 (2015). [24] A. Okubo, Adv. Biophys. 22, 1 (1986).
[7] M. C. Marchetti et al., Rev. Mod. Phys. 85, 1143 (2013). [25] A. Cavagna, I. Giardina, and F. Ginelli, Phys. Rev. Lett.
[8] A. Cavagna and I. Giardina, Annu. Rev. Condens. Matter 110, 168107 (2013).
Phys. 5, 183 (2014). [26] I. D. Couzin et al., J. Theor. Biol. 218, 1 (2002).
[9] T. Vicsek, A. Czirók, E. Ben-Jacob, I. Cohen, and [27] R. Lukeman, Y.-X. Li, and L. Edelstein-Keshet, Bull.
O. Shochet, Phys. Rev. Lett. 75, 1226 (1995). Math. Biol. 71, 352 (2008).
[10] F. Ginelli, Eur. Phys. J-Spec. Top. 225, 2099 (2016). [28] D. J. Pearce et al., Proc. Natl. Acad. Sci. USA 111, 10422
[11] L. M. Aplin, D. R. Farine, R. P. Mann, and B. C. Shel- (2014).
don, Proc. Roy. Soc. B 281, 20141016 (2014). [29] U. Lopez, J. Gautrais, I. D. Couzin, and G. Theraulaz,
[12] M. del Mar Delgado et al., Philos. Trans. Royal Soc. B Interface Focus 2, 693 (2012).
373, 20170008 (2018). [30] K. Tunstrøm et al., PLOS Comput. Biol. 9, 1 (2013).
[13] J. Buhl et al., Science 312, 1402 (2006). [31] P. Romanczuk, I. D. Couzin, and L. Schimansky-Geier,
[14] C. A. Yates et al., Proc. Natl. Acad. Sci. USA 106, 5464 Phys. Rev. Lett. 102, 010602 (2009).
(2009). [32] M. Nagy, Z. Ákos, D. Biro, and T. Vicsek, Nature 464,
[15] C. K. Hemelrijk and H. Hildenbrandt, Interface Focus 2, 890 (2010).
S1

SUPPLEMENTARY INFORMATION

CONTENTS

1. Schematic of an agent’s field of view


2. Snapshots of flocking patterns observed over a range of parameter values
3. Algorithm for computing the number of clusters
4. Description of the movies

SCHEMATIC OF AN AGENT’S FIELD OF VIEW

The field of view of agent i is illustrated in Fig. S1. At each iteration, agent i attempts to select an agent that
lies within its field of view, which is delimited by a maximum bearing angle θmax , for the purposes of an alignment
interaction. An agent j within this field of view is picked by i with a probability that is related to the distance
between them, as well as the angle between the velocity of i and the line connecting the two agents. If the field of
view of agent i is empty, it performs a random rotation.

FIG. S1. Schematic of the field of view of an agent i that picks an agent j lying within this field of view. The intensity of
colour in a given region is related to the the probability with which agent i chooses an agent that lies in that region. Each
agent has the highest probability of interacting with agents that lie at a distance σ along its direction of motion. Similarly,
the intensity reduces as the angle θi,j between the velocity of i and the line connecting the agents approaches the maximum
bearing angle θmax . Thus, an agent i is most likely to align with an agent that is near its direct line of sight, and which is
separated by a distance of around σ.
S2

SNAPSHOTS OF FLOCKING PATTERNS OBSERVED OVER RANGE OF PARAMETER VALUES

Flocking patterns observed for α = 0.01, 0.05, 0.1, 0.5, and over a range of θmax and σ, are displayed in Figs. S2–S5.

1 2 3 4

1 R 10 R 10 R 50 R

5 6 7 8

200 R 200 R 100 R 200 R

9 10 11 12

50 R 300 R 400 R 800 R

6
13 14 15 15
5 11
5
6
4 13
1
σ 8
3
4 12
10
2 7
2
800 R 300 R 3000 R 1 9
3 14
20 40 60 80
θmax

hNc i 1 1 >1 1 >1 1 >1


log10 hΛi ≤ −1 (−1, 0.5] (0.5, 2] >2

FIG. S2. Snapshots of flocking patterns exhibited by the model for a system of N = 103 agents, obtained for an interaction
strength α = 0.01, over a range of values of the mean interaction length σ and maximum bearing angle θmax . The corresponding
parameter space diagram from the main text is displayed in the bottom right panel. Each grid point in this panel is coloured
in accordance with the displayed table that classifies the regimes on the basis of the ensemble-averaged quantities hNc i and
hΛi, computed over 10 trials. Each of the other 15 panels display flocking patterns observed for parameter values denoted by
the corresponding numbered red marker on the parameter space diagram. The numbered solid bars in the lower left corner of
these panels provides a measure of spatial distance in each case. The solid bar in the lower right corner of each panel indicates
the extent of the corresponding resolution length R, which we use for our cluster-finding algorithm.
S3

1 2 3 4

2 R 2 R 20 R 2 R

5 6 7 8

300 R 400 R 100 R 200 R

9 10 11 12

800 R 400 R 200 R 200 R

6
13 14 15 12
4
5
1 15
4 10
σ 6
3 5
13
9
2 2 7
14
2000 R 2000 R 400 R 1 8
3 11
20 40 60 80
θmax

hNc i 1 1 >1 1 >1 1 >1


log10 hΛi ≤ −1 (−1, 0.5] (0.5, 2] >2

FIG. S3. Snapshots of flocking patterns exhibited by the model for a system of N = 103 agents, obtained for an interaction
strength α = 0.05, over a range of values of the mean interaction length σ and maximum bearing angle θmax . The corresponding
parameter space diagram from the main text is displayed in the bottom right panel. Each grid point in this panel is coloured
in accordance with the displayed table that classifies the regimes on the basis of the ensemble-averaged quantities hNc i and
hΛi, computed over 10 trials. Each of the other 15 panels display flocking patterns observed for parameter values denoted by
the corresponding numbered red marker on the parameter space diagram. The numbered solid bars in the lower left corner of
these panels provides a measure of spatial distance in each case. The solid bar in the lower right corner of each panel indicates
the extent of the corresponding resolution length R, which we use for our cluster-finding algorithm.
S4

1 2 3 4

1 R 2 R 5 R 10 R

5 6 7 8

200 R 200 R 400 R 200 R

9 10 11 12

40 R 80 R 20 R 800 R

6
13 14 15 11
4 15
5
1
4
10
σ 9
3 13
8
2 2 5
12
500 R 800 R 10 R 1 7
3 6 14
20 40 60 80
θmax

hNc i 1 1 >1 1 >1 1 >1


log10 hΛi ≤ −1 (−1, 0.5] (0.5, 2] >2

FIG. S4. Snapshots of flocking patterns exhibited by the model for a system of N = 103 agents, obtained for an interaction
strength α = 0.1, over a range of values of the mean interaction length σ and maximum bearing angle θmax . The corresponding
parameter space diagram from the main text is displayed in the bottom right panel. Each grid point in this panel is coloured
in accordance with the displayed table that classifies the regimes on the basis of the ensemble-averaged quantities hNc i and
hΛi, computed over 10 trials. Each of the other 15 panels display flocking patterns observed for parameter values denoted by
the corresponding numbered red marker on the parameter space diagram. The numbered solid bars in the lower left corner of
these panels provides a measure of spatial distance in each case. The solid bar in the lower right corner of each panel indicates
the extent of the corresponding resolution length R, which we use for our cluster-finding algorithm.
S5

1 2 3 4

40 R 5 R 10 R 5 R

5 6 7 8

100 R 20 R 40 R 200 R

9 10 11 12

400 R 400 R 500 R 1000 R

6
13 14 15 4 15
10
5 7
2 13
4
σ 6
3 3 9

2 12
1000 R 4000 R 5 R 1 1 5 8 11 14
20 40 60 80
θmax

hNc i 1 1 >1 1 >1 1 >1


log10 hΛi ≤ −1 (−1, 0.5] (0.5, 2] >2

FIG. S5. Snapshots of flocking patterns exhibited by the model for a system of N = 103 agents, obtained for an interaction
strength α = 0.5, over a range of values of the mean interaction length σ and maximum bearing angle θmax . The corresponding
parameter space diagram from the main text is displayed in the bottom right panel. Each grid point in this panel is coloured in
accordance with the displayed table that classifies the regimes on the basis of the ensemble-averaged quantities hNc i and hΛi,
computed over 10 trials. Each of the other 15 panels display flocking patterns observed for parameter values denoted by the
corresponding numbered red marker on the parameter space diagram. The numbered solid bars in the lower left corner of these
panels provides a measure of spatial distance in each case. The solid bar in the lower right corner of each panel indicates the
extent of the corresponding resolution length R, which we use for our cluster-finding algorithm. Note that the pattern in panel
1 is classified as a single cluster because over 90% of the agents belong to that cluster (see algorithm for details). Moreover
while the snapshots of patterns in panels 2 − 4 may appear reminiscent of the wriggling pattern, their dynamics are in fact
qualitatively similar to the meandering pattern.
S6

ALGORITHM FOR COMPUTING THE NUMBER OF CLUSTERS

At any specified time instant, the maximum possible distance between a pair of agents in the flock is denoted by

Rmax = max (|xi (t) − xj (t)|) ∀ i, j ∈ [1, N ] .

We set the resolution length R = λ Rmax by choosing a value of λ in the range 0 < λ ≤ 1. Each agent i = 1, 2, . . . , N
is assigned a label gi which is associated with an integer value that specifies the cluster to which the agent belongs
to. The cluster-finding algorithm involves determining the number of distinct clusters Nc of size ≥ R. The label of
each agent i thus lies in the range gmin (= 1) ≤ gi ≤ gmax (= Nc ).

Summary of the variables used:

N : Total number of agents in the system,


Nc : Total number of clusters found using the algorithm,
R : Resolution length of the flock (defined above),
gi : Label associated with each cluster,
bi , c : Boolean variables,
gmin : Minimum value of the array g,
gmax : Maximum value of the array g.

Pseudocode of the algorithm:

The algorithm is outlined in the following pseudocode. Comments appear in blue italicised text.
Initalize: gmax = 0, gmin = 0, and gi = 0 for all i = 1, 2, . . . , N .
For i = 1, 2, . . . , N
If agent i has not been assigned a label, we label it as one plus the maximum value of the array g.
If gi = 0 Then gi = max{gi0 , i0 = 1, 2, . . . , N } + 1.
The variable b marks all the agents in the current assignment.
Initalize: bj = 0 for all j = 1, 2, . . . , N .
Find all agents j that are at a distance ≤ R from agent i and assign j with the same label as i.
For j = 1, 2, . . . , N
If |xi (t) − xj (t)| < R Then
If gj = 0 Then gj = gi .
bj = 1.
End
End
Initalize: gmin = gi .
Consider all the marked agents, i.e. all agents j for which bj = 1.
We find the minimum value of gj and assign it to gmin
For j = 1, 2, . . . , N
If bj = 1 Then
If gj ≤ gmin Then gmin = gj .
End
For j = 1, 2, . . . , N
We assign the minimum value of the array g to all the marked agents.
If bj = 1 Then
For k = 1, 2, . . . , N
If gk = gj and k 6= j Then gk = gmin .
End
gj = gmin .
End
End
End

Compute: gmax = max{gi0 , i0 = 1, 2, . . . , N }.


S7

If more than one cluster exists, we relabel them so as to remove the value zero.
If gmax > 1 Then
For i = (gmax − 1), (gmax − 2), . . . , 1
Set: c = 0
For j = 1, 2, . . . , N
If gj = i Then c = 1 and Exit.
End
Fix gaps in the label numbers to ensure that the final set is contiguous
If c = 0 Then
For j = 1, 2, . . . , N
For k = i + 1, . . . , gmax
If gj = k Then gj = k − 1.
End
End
End
End
End

Compute: gmin = min{gi0 , i0 = 1, 2, . . . , N }, gmax = max{gi0 , i0 = 1, 2, . . . , N }.


Once each gi has been relabelled, the number of agents in each cluster i is simply the number of agents that are
labelled gi , and the total number of clusters at the chosen resolution length Nc = gmax .

Demonstration of cluster-finding algorithm at different resolution lengths:

In the following example, we present an implementation of this cluster-finding algorithm at two different reso-
lution lengths, R. As displayed in Fig. S6, we consider four clusters of agents. Each cluster consists of 50 agents
√ are chosen randomly within a 10 × 10 square centered at the coordinates (0, 0), (0, 25), (25, 0),
whose coordinates

and (25/ 2, 25/ 2).

(a) (b)
II R = Rmax/4 = 11.78 II R = Rmax/8 = 5.89
25 25
8.67 8.67
II III
20 20

15 15
15.28

15.28
9.56

9.56

10 0
26

26

10 . 10 .1
13 13
.2

.2
1

II IV
5 5

15.57 15.57
0 0

I I

0 5 10 15 20 25 0 5 10 15 20 25

FIG. S6. A demonstration of the cluster-finding algorithm. We choose resolution lengths (a) R = Rmax /4, and (b) R = Rmax /8.
The lines connect the closest agents in each pair of clusters, and the corresponding numerical value denotes the distance between
these agents. The bold lines and numbers in panel (a) indicate that the corresponding clusters are categorized as being part of
the same cluster (II). In panel (b) four clusters (I-IV) are obtained since all of them are separated by a distance > R.
S8

Upon running our cluster-finding algorithm on this flock, we find that the maximum separation between any pair
of agents is Rmax = 47.13. For the choices λ = 1/4, 1/8, we find R = Rmax /4 = 11.78 and R = Rmax /8 = 5.89. In the
displayed realization (Fig. S6), we find that the minimum distance between agents in the lower left and upper right
clusters is 13.1. Hence, at resolution length R = 11.78 these two clusters are categorized as being distinct. In contrast
the minimum distances between the agents in upper right cluster and those in the remaining clusters are less than
11.78 and hence they are categorized as being part of the same cluster. Thus, as displayed in Fig. S6(a), at resolution
length R = 11.78 we find just two distinct clusters I & II (coloured red and blue).
For the case where a resolution length R = Rmax /8 = 5.89 is used, we find that since all four clusters are separated
by a value greater than R they are categorized are being distinct. Thus, our method obtains four distinct clusters
(I-IV) at this resolution length, as displayed in Fig. S6(b) where each cluster is coloured distinctly.

DESCRIPTION OF THE MOVIES

The captions for the four movies are displayed below:

• Movie_S1.mp4
Evolution of a system of N = 103 agents moving in a wriggling pattern for the case σ = 5, θmax = 40 and
α = 0.8. The system is simulated over 2 × 104 time steps, starting from an initial condition where agents
are distributed randomly over a small portion of the computational domain. Each frame of the simulation is
separated by 50 time steps.
• Movie_S2.mp4
Evolution of a system of N = 103 agents moving in a closed trail for the case σ = 3, θmax = 50 and α = 0.1.
The system is simulated over 2 × 104 time steps, starting from an initial condition where agents are distributed
randomly over a small portion of the computational domain. Each frame of the simulation is separated by 50
time steps.
• Movie_S3.mp4
Evolution of a system of N = 103 agents moving in a milling pattern for the case σ = 1, θmax = 20 and
α = 0.025. The system is simulated over 2 × 104 time steps, starting from an initial condition where agents
are distributed randomly over a small portion of the computational domain. Each frame of the simulation is
separated by 50 time steps.
• Movie_S4.mp4
Evolution of a system of N = 103 agents moving in a flock with a meandering center of mass for the case σ = 3,
θmax = 15 and α = 0.02. The system is simulated over 2 × 104 time steps, starting from an initial condition
where agents are distributed randomly over a small portion of the computational domain. Each frame of the
simulation is separated by 50 time steps.

Vous aimerez peut-être aussi