Boids / Swarm Intelligence

Three local rules. One flock. No leader.

boids 200 · fps 60
Trails Mouse: off Edges: bounce

How it works

Each boid only sees neighbours inside its perception radius and obeys three steering rules — separation (avoid crowding), alignment (match heading), cohesion (move toward the local centre). The global flock pattern is emergent: nobody computes it.

Why it matters

Reynolds' 1986 model shows how decentralised agents produce coordinated collective motion. The same idea drives crowd simulation in films and games, swarm robotics, and optimisation algorithms like particle swarms.