Science lab / collective motion

Boids: a flock made from local rules.

Add agents, draw obstacle walls, tune the behavioural weights, and watch a crowd become something that feels alive without a leader directing it.

Brief field note

Why a few rules can look like intention

Boids were introduced by Craig Reynolds in the 1980s as an artificial life model for flocking motion. The idea is intentionally modest: each agent only reacts to nearby neighbours, yet the group can form streams, clusters, waves, and sudden turns that look coordinated from a distance.

The classic version is built around three steering tendencies. Separation keeps agents from crowding each other. Alignment nudges each agent toward the average heading of nearby agents. Cohesion pulls an agent toward the local centre of mass. No agent understands the whole flock. The global behaviour appears because many small local adjustments keep feeding back into one another.

That makes Boids a useful way to think about emergence. It is not just an animation trick; it is a compact demonstration of how group behaviour can arise without central command. Computer graphics, robotics, crowd simulation, games, and biological modelling all use versions of this idea, often with extra rules for obstacle avoidance, goals, predators, terrain, or boundaries.

About this simulator

This version keeps the flock inside a bounded canvas, lets you draw obstacle walls, and lets you inject new agents while the simulation is running. Use the controls to push the flock toward tight schooling, loose wandering, obstacle-dodging streams, or chaotic swirls.

References

Advanced canvas Obstacle field

Flocking workbench

Draw obstacle walls or add new agents directly into the simulation, then tune the local rules to see how the flock adapts.

Flock running