0% found this document useful (0 votes)
14 views2 pages

2 ABM Slides

Uploaded by

乔George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views2 pages

2 ABM Slides

Uploaded by

乔George
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

ABMs are an interactive modeling experience and nice playgrounds for testing 'what-if' scenarios in a

virtual world

For an ABM to also be good science and give us meaningful conclusions, we need to wrap the technical
aspects of its design up with proper methodology and ensure we are considering the:

specific problem to be solved by the ABM


availability of data
method of model validation

Sayama says that: "Meaningful conclusions" implies there are implications for the real-world system
being modeled:

Building an ABM using assumptions derived from empirically observed phenomena, and then
produce previously unknown collective behaviours
Building an ABM using hypothetical model assumptions, and reproducing empirically observed
collective phenomena

I agree.

But Sayama also says that: analysis is "generally not easy to conduct an elegant mathematical analysis of
an ABM", which is why there is no “Analysis” chapter on ABMs in his textbook. I disagree. I think
'meaningful conclusions' requires a proper analysis

The Complexity Explorables are typically lacking in the analysis department

Today we'll return to the Vicsek explorable (https://www.complexity-explorables.org/slides/horde-of-the-


flies/), in particular, and and analyse it properly.

VICSEK MODEL
This model was introduced by Tamás Vicsek (and colleagues not fortunate enough have the model
named after them) in 1995 to simulate the collective motion of self-propelled particles

Vicsek's particles adjusted their velocities to align with the average velocities of the neighbouring agents

That's it. Nothing more, nothing less. And it is exactly this minimal nature that gives us a chance of
mathematical analysis

“...I had designed the moving version of the Heisenberg model." —


Vicsek (https://www.nature.com/articles/529016a)

See the original publication here: https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.75.1226

Our understanding of emergent phenomena such as phase transitions and criticality, and the quest for
universal laws and patterns of collective behaviour has gained enormous benefit from the study of simple
models like this

This model plays a prototypical role, similar to the one played by the Ising model for equilibrium
ferromagnetism and has been adopted as the starting point for many generalisations and variations.

ISING MODEL
Ising model of ferromagnetism in statistical mechanics

The model consists of discrete variables that represent magnetic dipole moments of atomic "spins" that
can be in one of two states (+1 or -1) i.e. 1D

Neighbouring spins that agree have a lower energy than those that disagree; the system tends to the
lowest energy but heat disturbs this tendency, thus creating the possibility of different structural phases

The model allows the identification of phase transitions as a simplified model of reality

By HeMath - Own work, CC BY-SA 4.0, https://commons.wikimedia.org/w/index.php?curid=37327967

XY MODEL
XY is a generalisation of the Ising model with the dipole able to have any state i.e. 2D

Magnetic dipoles that rotate and align with the magnetic field of their surrounding

If the dipoles are initialised randomly then what will happen?

https://www.complexity-explorables.org/explorables/if-you-ask-your-xy/

Inspired by this, Vicsek and his team began to think about what it would mean for the spins in a
ferromagnet to have the freedom to move

(The Heisenberg Model is a more general model of three-component spins (i.e. 3D), so technically Vicsek
had designed the moving version of the XY model).

MODEL SPECIFICS
the world and environment: 2D square domain with periodic boundaries, the environment has no
state.
the agents: N point particles
the possible states (or attributes): position and velocity (direction)
the initial state: random
the interaction network: metric with maximum distance r
the rules for updating the agent state: assume average direction of neighbours + some noise,
synchronous updates for all agents at each time step. Note this describes "overdamped
dynamics" as the inertial effects are negligible, and the motion of the agents is primarily
determined by the forces acting on them (change their relative position according to their velocity
fluctuations), rather than by their own momentum. The system is far from equilibrium because the
particles are self-propelled.

In the original model:

we choose a convenient set of space and time units, such that Δt = r = 1


set speed = v = 0.03.
model behaviour only depends on three control parameters: the noise amplitude η and total
density of particles N/V .

MODELLING STEPS
1. initialise a domain (square domain with periodic boundaries, agent.velocity is a random direction
with constant speed, agent.position is random inside of domain)
2. initialise N agents and their attributes:
position: A tuple representing the x and y coordinates of the agent.
velocity: A tuple representing the agent's current velocity, v defined by the heading θ
and a constant, speed.
3. determine each agents' neighbours (defined as those inside of a circle of radius, r, centred at the
agent)
4. average the velocities of each agents' neighbours (including self in neighbourhood)
5. update agent attributes:

θ(t + 1) = ⟨θ(t)⟩r + Δθ
x(t + 1) = x(t) + v(t)Δt

Δθ is a random number chosen with a uniform probability from the interval [−η/2, η/2].

NOISE
The role of randomness in models of complex systems:

account for uncertainties and the unpredictable nature of complex systems


reflects the inherent variability in complex systems
analagous to temperature in equilibrium systems (driving phase transitions)
gives a more robust and realistic model, e.g. showing how coherent motion can emerge even in
the presence of imperfections

Different sources of noise:

Scalar/Intrinsic noise: agent makes "mistake" when moving in the (perfectly determined)
direction
θ(t + 1) = ⟨θ(t)⟩r + Δθ
Vectorial/Extrinsic noise: errors/uncertainties in the particle-particle communication
mechanism/assessment of neighbour directions
θ(t + 1) = ⟨θ(t) + Δθ⟩r

The Vicsek model is robust to the source of noise provided that no long-range correlations are
introduced.

LIMITING CASES

Limiting cases are often interesting and worth exploring as the model reduces to well-known models of
equilibrium statistical physics

e.g. in the limit, v → 0, the interaction network is fixed and the individuals are just selecting a new
direction without moving at each time step. The model reduces precisely to that of a two-dimensional XY
model. We interpret he velocity of the individual as the local spin, the strength of the alignment
interaction is proportional to the density like an external magnetic field and the noise is like temperature

Other limiting cases:

r → 0: non-interacting persistent random walkers with equilibrium distribution with some


temperature given by the noise term
r → ∞: long ranged interaction, system is globally coupled and the connectivity matrix is trivially
static
v → ∞: for v >> L, any small fluctuation in the orientation will push nearby particles infinitely
apart. With periodic boundary conditions this is equivalent to random rewiring of interactions and
hence motion decouples from alignment

It is not possible in general to deduce properties of the Vicsek model in general from the study of the
limiting cases.

QUALITATIVE ANALYSIS
The first thing we did with our model is to simulate it and play around, observing how the agents move
over time and the group behaviour that emerges

This gives us a qualitative understanding of the behaviour of the collective and how it depends on the
parameter settings for L (which is effectively density) and η (the amount of stochasticity)

The simulations are nice for our understanding but they are typically relegated to supplementary material
in publications in favour of snapshots in time or trajectories:

Image source: https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.75.1226

Again, we are seeing simple interactions among individuals leading to complex global patterns

To really understand the system we need to do some quantitative analysis.

QUANTITATIVE ANALYSIS
We seek a generalisable and statistically reliable description of observations via appropriate metrics at
the individual or group level

Flocking models lean heavily on methods and measures successfully used in statistical physics

Order parameters characterise how ordered the macroscopic state of the system is

In keeping with the spin-model analogy, the Vicsek model used the average normalised velocity as a
polarisation order parameter, va :

1 ∣ N ∣
va = ∣ ∑ v→i ∣
Nv ∣ i ∣

N is the number of agents


v→i is the ith agent's velocity
v is the (constant) speed of all agents

This is a value that ranges from 0 to 1, where 0 indicates no order and 1 indicates maximal order and
coherent motion (this is why we can refer to it as an order parameter)

It tells us something about the group behaviour.

What would va be for each of these behaviour regimes?

Image source: https://journals.aps.org/prl/pdf/10.1103/PhysRevLett.75.1226

The variety in behaviour is a consequence of different parameters

In the Vicsek model the relevant parameters are:

density via the size of the domain, L, with fixed particle number
noise, η

There are other parameters in this model, such as the speed v but 'According to our simulations, in a
wide range of the velocities (0.003 < v < 0.3), the actual value of v does not affect the results' -
Vicsek et. al [1995]

Here, 'the results' refers to the physical properties of the emergent behaviour

Many other model variations are equally irrelevant:

noise distributed according to a Gaussian


small, short ranged repulsion force to account for volume exclusion
position xi at time t + Δt may be determined by the velocity at time t + Δt and not at time t
...

We'd like a more general understanding of how these parameters influence the behaviour. In particular,
we want answers to:

Under what conditions are the different behaviours are happening?


How do we transition from one behaviour to another?

PARAMETER SWEEPS
The phase transitions are bifurcations in the macroscopic properties, captured by changes in the relevant
state variables

We track these properties as we vary the relevant parameters

For Vicsek, that means we compute the polarisation order parameter for each simulation as we vary the
noise and/or density

It's akin to a transition from solid to liquid to gas as temperature and pressure are varied.

ENSEMBLE RUNS
To properly demonstrate phase transitions we must show that they occur in general, because a single
simulation doesn't tell you much (and may even be misleading)

Monte Carlo are a broad class of computational algorithms that rely on repeated random sampling to
obtain numerical results that statistical measures can be calculated from

The original paper runs five simulations at each parameter setting and states that the error bars are
generally within the size of the symbol. If this wasn't the case you'd need to show the variation.

More common approach nowadays is to address everything at once

Here Couzin computes two different order parameters (polarisation and rotation) and shows the mean of
30 replicates:

Original publication: https://www.sciencedirect.com/science/article/pii/S0022519302930651?


via%3Dihub

(See Flock n Roll: https://www.complexity-explorables.org/explorables/flockn-roll/ for the Explorable)

If you aren't re-initialising when starting a new simulation then interesting things can happen

This effect is called hysteresis

It means that the state of the system depends on its history.

The ensemble of simulations is necessary to:

capture the range of possible outcomes owing to variability (inherent randomness, stochastic
processes, or sensitivity to initial conditions)
explore effects of uncertainty, providing a distribution of possible outcomes
reduce noisy or outlier results and identify (and estimate probability of) rare events
give a better understanding of parameter sensitivities
highlight emergent behaviour as consistent patterns or structures that emerge across different
simulations
validate the robustness of model predictions.

This gives a more comprehensive and reliable picture of the system.

BRINGING RESULTS BACK TO THE REAL WORLD


We have a complete understanding of the physical laws that lead all spins in a ferromagnet to self-
organise and produce a spontaneous magnetisation (self-organisation) but when it comes to birds, until
about 15 years ago we knew almost nothing

The basic rules of interaction assumed by Reynolds, Couzin etc were just educated guesses as opposed
to well-established scientific fact

Empirical insight came from Cavagna and Gardina's work as part of STARFLAG

STARFLAG used stereoscopy (two simultaneous images of the same object taken from different positions
in space to reconstruc the exact 3D position of an object. Our eyes and brain use it to estimate distances
and give sense of 3D)

Correspondence problem: We need to match the individuals in the two images but due to the different
positions of the left and right cameras (25 metres apart and ~100 metres from the birds), the flock can
look very different
This allowed a comparison of models on a quantitative basis to real flocks, whereas previously we could
only assess similarity qualitatively.

TO SUMMARISE...
An agent-based simulation is interesting but not scientific

To properly report results we need to:

1. quantify the observed behaviour (at the macro and maybe also the micro-levels) with something
like an order parameter
2. demonstrate how the behaviour depends on parameters with
parameter sweeps
ensemble runs to report statistics

You might also like