Reynolds Flocking — Boids

Three local rules → global flocking. Click canvas to add an obstacle.

Craig Reynolds' Boids algorithm (1987): each agent follows three rules — separation (avoid crowding), alignment (steer toward average heading), cohesion (steer toward average position). No central control; complex flocking behavior emerges from local interactions.