Collective motion
Flocking: no leader, three rules
Every bird here sees only the few birds close to it, ahead and to the sides. No bird knows where the flock is going, and the flock has no destination. Each bird applies the same three rules to its neighbours, all at once, and that alone produces the wheeling, splitting and merging you see.
The three rules
In 1987 Craig Reynolds, then at Symbolics, needed flocks for computer animation and found that he did not have to script them. Each simulated bird (he called them boids) steers by three rules, using only the neighbours inside a short radius in front of it:
- Separation: steer away from neighbours that are too close.
- Alignment: steer towards the average heading of the neighbours.
- Cohesion: steer towards the average position of the neighbours.
Each rule asks for a change of velocity. The bird blends the three, using the weights in the controls panel, and turns by no more than a fixed amount per step. Here each bird sees 270° around itself, a bird that leaves one edge of the screen comes back at the opposite edge, and every bird decides from the same snapshot before any of them moves.
Measuring order
The Order readout measures polarisation, how well the birds’ headings line up. Draw each bird’s heading as an arrow of length 1, add up all the arrows, and divide the length of the total by the number of birds. Random headings give a value near 0; a flock flying in formation gives a value near 1. Tamás Vicsek and colleagues used this quantity in 1995 to show that this kind of system has a phase transition, a sudden change of state: turn the noise up past a critical level and the order collapses, much as a magnet loses its magnetisation above a certain temperature (the Curie temperature).
Try it: choose School, then drag the Noise slider slowly to the right and watch the Order readout. Flocks counts separate groups of at least five birds, where birds belong to the same group if a chain of close neighbours joins them.
Things to try
- Turn each rule off in turn. Without separation birds pile on top of each other; without alignment you get a swarm that holds together but goes nowhere; without cohesion small groups drift apart and never rejoin.
- Add a hawk or two. Fleeing birds pass the panic on to their neighbours through alignment, and the flock splits and flows round the predator.
- Shrink the vision slider. The flock breaks into many small groups, because birds can no longer see far enough to stay together.
What real flocks do
Real starlings do not follow these rules exactly. Studying photographs of murmurations over Rome, Michele Ballerini and colleagues found in 2008 that each starling tracks a fixed number of neighbours, about six or seven, rather than everyone within a fixed distance. Counting neighbours keeps a flock together whether it is dense or sparse; a fixed radius does not. The main point still holds: coordinated motion on this scale needs no leader and no shared plan.
References
- C. W. Reynolds (1987), Flocks, herds and schools: A distributed behavioral model, SIGGRAPH ’87.
- T. Vicsek et al. (1995), Novel Type of Phase Transition in a System of Self-Driven Particles, Phys. Rev. Lett.
- M. Ballerini et al. (2008), Interaction ruling animal collective behavior depends on topological rather than metric distance, PNAS.
