Labs · Autonomous Agents

Flocking (Boids)

Flocking (Boids) simulation

Craig Reynolds' boids: each bird follows three local rules and only sees neighbours within its perception radius.

No bird is in charge, and no rule describes "a flock", yet flocks emerge. This is emergence. A spatial grid keeps neighbour lookups fast enough for hundreds of boids.

Set cohesion to 0, then separation to 0, and see how each rule shapes the flock. Click to add boids.

Controls

Evolved into Predators & Prey, Crowd Evacuation.