Lab
Emergence · Reynolds Boids

Flocking

No bird is in charge, yet the flock moves as one. Craig Reynolds showed in 1986 that lifelike swarming emerges from three tiny rules each agent follows, looking only at its neighbours.

move your cursor through them

How it works

  1. Separation: steer away from neighbours that get too close, so nobody collides.
  2. Alignment: match the average heading of nearby boids — move with the crowd.
  3. Cohesion: drift toward the local centre of mass, so the flock stays together. Your cursor adds a fourth rule: flee.

Emergence is the flip side of optimization: complex global behaviour from simple local rules — a reminder that you don't always need a central plan to get coordinated results.