When a hawk shows up
How a flock dodges a hawk, even though most birds never see it.
What you are looking at
A larger dot moves through the flock. The flock opens around it, splits, and closes up again behind it.
The idea
Add one more thing to the flock: a hawk. Each bird adds a fourth rule to the three it already has: turn away from the closest danger.
Only the birds near the hawk see it. They turn. Their neighbors, who are following the "fly the same way" rule, turn with them. And their neighbors turn too. The turn passes through the flock like a wave, and birds far from the hawk dodge before the hawk gets anywhere near them.
The hawk has a hard time. Every time it picks a target, the target's neighbors move and the target slips away into the confusion of the crowd. The flock has no plan to beat the hawk. It simply works because of how the rules fit together.
Where else you see it
- Fish schools that open up around a seal.
- A crowd parting when something rushes through it.
- The reason lone birds are easier prey than birds in a group.
Go deeper: the proper names and the math
Predator avoidance is added to the flocking rules as a repulsive term that falls with distance from the predator. Real flocks show escape waves: the turn spreads through the flock as an information wave, and it can cross the flock quickly because each bird copies the turn of its neighbors.
The confusion effect and the dilution effect are both thought to help the group: a predator finds it harder to focus on one target when many move at once, and each bird has a lower chance of being the one that is caught. These ideas are studied in collective behavior and used in the design of robot swarms that need to react together.