Three rules, no leader
In 1987 the animator Craig Reynolds showed that you can get a convincing flock from three local rules, applied by every bird to the birds near it. He called his simulated birds “boids.” Nothing in the rules mentions the shape of the flock. The shape comes out of them.
- SeparationDon't crowd anyone. Steer away from neighbours that get too close.
- AlignmentFly the way your neighbours are flying. Match their average heading.
- CohesionDon't drift off alone. Steer toward your neighbours' average position.
The “alignment” number in the corner of the sky measures how well the whole flock agrees on a direction. At 0 the birds point every which way. At 1.00 every bird flies the same heading.
Which neighbours?
7Reynolds' boids reacted to every bird within a fixed distance. Real starlings don't seem to. In 2008 a team in Rome filmed flocks over the city's railway station with synchronized cameras and rebuilt each bird's position in 3-D. They found that a starling tracks a fixed number of neighbours, about six or seven, however near or far those birds are. Physicists call this a topological rule, as opposed to a metric one.
That difference matters most when the flock is stretched. With a distance rule, a bird at a thinning edge can end up with nobody inside its radius and fly off alone. With a count rule, it always has seven birds to follow, so the flock holds together as it thins, folds and pulses. That's the behaviour you see over a reed bed at dusk.
Why the waves
When a falcon dives, only the birds closest to it see it. They swerve, the birds watching them swerve too, and the turn passes from neighbour to neighbour as a wave. Birds far from the falcon turn without ever seeing it. A 2010 follow-up from the same group found that in real flocks these correlations span the whole flock, however big it is.
- C. W. Reynolds, “Flocks, herds and schools: A distributed behavioral model,” SIGGRAPH ’87, Computer Graphics 21(4), 1987.
- M. Ballerini et al., “Interaction ruling animal collective behavior depends on topological rather than metric distance: evidence from a field study,” PNAS 105(4), 2008.
- A. Cavagna et al., “Scale-free correlations in starling flocks,” PNAS 107(26), 2010.
The simulation here is 2-D and simplified for the sake of a phone screen. Real starlings fly in three dimensions, and the 2008 study measured between six and seven neighbours, not exactly seven.