mljr.eu
Back

Boids

No leader and no plan — each boid only looks at its close neighbours, and flocking falls out of that on its own. Sliders reweight the three steering rules live.

How it works

Craig Reynolds' 1986 "boids" model: every boid follows three simple rules based only on the neighbours within a short radius around it — steer away from ones that are too close (separation), match the average heading of nearby boids (alignment), and drift toward their average position (cohesion).

None of the three rules mention "the flock" — each boid only ever reacts to whichever handful of neighbours happen to be nearby at that instant. The coordinated, flowing group motion is an emergent property: it arises from many simple local interactions rather than being programmed in directly anywhere.

The three sliders reweight how strongly each rule pulls on every boid's steering, live, while the simulation keeps running: push separation up and the flock spreads out and gets jittery; push cohesion up alone and it collapses into a tight, slow-moving blob; alignment dominant on its own produces long, parallel-flowing streams.

each boid only reacts to neighbours inside its own radiusseparation + alignment + cohesion → flock