WHERE shall we go to eat? Shall we get the bus or walk? These questions can
paralyse even a small gathering of human beings, as everyone tugs in a different
direction. But many birds, beasts and fishes seem to organise themselves
effortlessly, travelling in huge flocks, herds and schools that move like a
single creature. And yet there is no central control, no mastermind that tells
all the others which way to go. So what magic transforms a leaderless group of
animals into an orderly flock?
It’s a problem that has baffled generations of scientists. After all,
flocking creatures must get it wrong sometimes. Why, when members of a flock
must make mistakes and break formation, does the flock as a whole keep going?
Why don’t all the little errors made by each individual rip the flock apart? At
last, researchers are starting to get to grips with flocking well enough to be
able answer such questions—and they’ve come to the surprising conclusion
that the wayward behaviour of individuals actually preserves the coherence of a
flock.
The story begins in 1986, when Craig Reynolds of the American software
company Symbolics wrote a little computer program to see what happens when a
number of identical creatures all follow the same set of simple rules.
Reynolds’s creatures, dubbed “boids”, were given three rules: try to match
direction with your neighbours, head for their average position, and don’t
collide. Nowhere do the rules tell the boids to move in flocks—and yet the
boids do just that.
Advertisement
It seems that flocks just happen: flocking, to use the jargon, is an
“emergent property”. The success of Reynolds’s model has inspired researchers to
look for similar emergent behaviour in other fields, such as how brain cells
organise themselves into a thinking structure, or how well-ordered markets
emerge from a collection of independent agents. And special effects wizards have
used variations on Reynolds’s algorithm to help them create animations of
flocking animals in films such as Batman Returns and The Lion
King. But being able to model flocking on a computer isn’t the same as
understanding it, any more than following a recipe involves understanding the
chemistry of cakes.
The first person to take a deeper look at flocks was a Hungarian physicist
called Tamás Vicsek of Eötvös University in Budapest. In the
early 1990s, Eshel Ben Jacob of Tel Aviv University asked Vicsek to help explain
some odd patterns in the growth of colonies of bacteria. Sometimes the colonies
grew in intricate branching patterns, like frost on a windowpane. And Vicsek
noticed something else: small discs of bacteria formed at the tips of some of
the fractal branches. Close examination revealed that the bacteria in these
discs were all moving in concentric circles, either clockwise or anticlockwise.
“They looked like flies or birds moving coherently,” Vicsek recalls. “It was a
great puzzle to us.”
Bacteria don’t have brains, so collective planning is beyond them. Whatever
rules they follow must be very simple indeed. “Perhaps the bacteria were
sticky,” Vicsek thought. In other words, perhaps they behaved like tiny magnets.
It is natural that Vicsek should choose to think of bacteria’s behaviour in this
way, because magnets are one of the most closely studied examples of collective
behaviour in physics.
Circular dance
At the microscopic level, bar magnets consist of countless atoms, each of
which acts like a tiny compass needle by virtue of its spinning electrons. Each
of these tiny needles can point in any direction, but is also affected by the
magnetic field of its neighbours. This mutual influence makes it preferable for
two atoms to align their magnetic fields in the same direction.
That preference can easily be swamped by the thermal jiggling inherent in all
materials, so at high temperatures the atoms all point in random directions. But
if the material is cooled, a point is reached when the magnetic interaction
between atoms becomes stronger than the thermal noise. A few neighbouring atoms
line up in some arbitrary direction by chance, other atoms follow suit and
suddenly almost all of the atoms point in a single direction—the bar
becomes a magnet. A similar mechanism, Vicsek reasoned, must make his bacteria
perform their circular dance.
Vicsek didn’t know of Reynolds’s work on boids, so in 1994 he devised a
simple computer model to test his theory, with the help of one of his graduate
students, András Czirók. In their model, the direction of motion
of the bacteria corresponds to the direction of magnetisation of the atoms in a
magnet. At every tick of the computer clock, each bacterium looks at all the
neighbouring bacteria within a certain distance. It then adjusts its course to
head in the average direction its neighbours are moving in. If the bacterium has
four neighbours and they are all heading due north, then it will also head
north. If two of its neighbours are moving north and two are moving south, then
their average velocity is zero, so the bacterium will stop moving.
But Vicsek realised that in the real world, errors inevitably creep in. The
orientations of the atoms in a magnet are skewed by thermal noise, and it seemed
reasonable to assume that bacteria also make mistakes when calculating their
course. So for each bacterium in Vicsek’s model, a small random noise factor is
added to the average velocity of its neighbours.
Just as he had expected, when the noise level was cranked up the bacteria
moved in an incoherent tumult. As Vicsek reduced the noise, the random motion
died down until a point was reached at which the bacteria started to all move in
the same direction. The simulated bacteria colony seemed to be acting just like
a magnet.
But Vicsek was still puzzled. In his computer simulation, the bacteria moved
in a two-dimensional plane. The movement of actual bacteria is also usually two
dimensional, as is the motion of herds of animals such as wildebeest. And even
though they are moving in a 3D space, many flocks of birds are 2D. But physics
seems to say that this is impossible. According to something called the
Mermin-Wagner theorem, a 2D magnet of the sort just described can form only at
absolute zero temperature. At higher temperatures, thermal fluctuation prevents
the spins of the electrons from aligning. Likewise, although 3D flocks should be
possible, 2D flocks ought not to exist.
To see why, imagine an array of stationary boids that behave like the fixed
atoms in a magnet (see Diagram).
Turn the noise factor off, so that at each time
step all boids can precisely adjust their direction based on the directions of
their neighbours. Now start with all but one of the boids pointing due north,
that is, on a heading of 0°. The one exception is a befuddled boid that is
moving on a heading of 64° east.
The clock ticks, and each of the boids looks at its neighbours. As all four
of the befuddled boid’s neighbours are heading on a course of 0°, it will
adjust its direction to point this way as well. But these four neighbours will
each be surrounded by three boids with an orientation of 0° and the
befuddled one pointing 64° east, an average of 16°. When the clock ticks
again, these four neighbours will each point 16° east.
So the sum of all the errors is still 64°, but now it is spread among 4
boids. At the next tick, the total error of 64° will be spread among 9
boids, then 16, then 25 and so on. The total error will never decrease but will
spread like an ever widening stain. Eventually, all the boids will end up flying
in the same direction again.
But what happens if a source of noise is introduced into the flock? It turns
out that the random errors in judgment made with every tick of the clock
accumulate at exactly the same rate as they disperse in two dimensions. In other
words, the members of a flock will never all be able to align themselves in the
same direction because the errors accumulate as fast as they leak away.
Fluid flock
In a 3D flock, on the other hand, errors leak into a volume rather than an
area, and so disperse much faster. In this case the boids’ errors will not
prevent the flock all heading in one direction.
So if bacteria were exactly like magnets, they would move coherently in two
dimensions only if they never made mistakes. But Vicsek’s simulations showed
that bacteria could move together even when each one makes small errors. And we
have all seen 2D flocks of birds and herds of animals. So either the
Mermin-Wagner theorem is wrong, or something else is happening.
In 1994, Vicsek presented this puzzle during a seminar on flocking models. In
the audience were two young condensed-matter physicists, John Toner of the
University of Oregon in Eugene, and Yuhai Tu of IBM’s Thomas J. Watson Research
Center near New York. Tu and Toner were intrigued by Vicsek’s quandary and felt
that they could work out what was going on. They realised that a mathematical
theory that could be handled with paper and pencil would give them a much deeper
insight into the physics of flocks than a computer model could.
Trying to understand flocks using Vicsek’s model was like trying to
understand fluids by analysing the jostling interaction of the constituent
atoms. In theory it should be possible, but in fact nobody would consider doing
such a thing because there are far too many molecules to keep track of.
Fortunately, in the early 19th century physicists developed an equation that
beautifully describes the properties of fluids without any reference to their
constituent atoms, for the very good reason that nobody then knew that fluids
were made of atoms. This equation, known as the Navier-Stokes equation,
describes fluids in terms of their viscosity and density. “The Navier-Stokes
equation is phenomenally successful,” Toner explains. “Our idea was to write
down a similar equation for flocking.”
He and Tu combined the Navier-Stokes equation with the equations describing
magnetism. The resulting equations embodied the fact that animals generally have
no prejudice about which way to go, an indifference physicists call rotational
invariance. They do, however, know how fast they’re going, something that
molecules in a fluid don’t. This is because animals move through resistant media
such as air and water, which means Toner and Tu had to add new terms to their
equations different from those found in the equations of fluids and
magnetism.
Stirring stuff
Armed with these souped-up equations, Toner and Tu confirmed that flocks do
indeed form spontaneously in two dimensions, even when there is noise present to
confuse the boids. So the equations told them that the computer simulations were
correct. But it still took some hard thinking to understand how that was
possible, given the Mermin-Wagner theorem.
The key turns out to be that, unlike the fixed atoms in magnets, boids move.
Try gently placing a teaspoon of milk in a cup of coffee. If the coffee is not
stirred, the milk will disperse slowly, in exactly the way errors disperse in
the array of stationary boids. It would take over a day for the milk to spread
itself uniformly throughout the cup. Stir the coffee, however, and the milk will
spread almost instantly. Stirring greatly increases the rate at which
milk—and errors—disperse. And a fluid of moving boids stirs
itself.
For boids, it is the errors in direction that stir the flock. Instead of
staying put and sharing errors with a fixed set of neighbours, a wayward boid
travels through the flock, spreading out errors much more quickly. This means
that even in two dimensions, errors leak away faster than they accumulate, and
so flocks are possible.
The motion of wayward boids also produces disturbances in density that
propagate rapidly through the flock like sound waves. These waves travel at
right angles to the main motion of the flock—the side-to-side motion is
communicated rapidly by the moving birds, while disturbances that move in the
direction of the flock travel much more slowly. These waves can produce enormous
fluctuations in the density of the flock, like the weird undulations you see in
clouds of starlings at dusk.
Using these new equations, physicists can make precise, quantitative
predictions about such things as the density of birds in a flock, the way
density fluctuations move, and the probability of finding two boids within a
certain distance of each other. In some ways, flocks can now be described in as
much detail as simple physical systems like gases and liquids.
But do these equations work for flocks in the real world? Toner and Tu hope
to find out by working with biologists. This may take some time, Toner says,
because biologists rarely measure the quantities that the physicists’ models
predict.
The two physicists also plan to extend their model, to work out exactly how
flocks change direction and how they interact with other flocks. Eventually,
this might help us understand and control snarled highway traffic and tell us
why investors flock from one stock to another. For now, however, Toner and Tu
are happy to have found a beautiful explanation for an everyday miracle.
-
Further reading: More about Craig Reynolds’s boids can be found at
http://hmt.com/cwr/boids.html