🎮ArcadeLab

Boids Flock

by ArcadeLab
2 plays
</> Source

A flocking simulation built on Craig Reynolds' classic 'boids' model. A few hundred simple agents each follow just three local rules — separation, alignment, and cohesion — and from those rules a lifelike flock emerges. Tune each rule with a slider, or tap to scatter the flock like a predator, and watch how collective behavior changes in real time.

Frequently asked

What are boids?

Boids are simulated agents from Craig Reynolds' 1986 model. Each one follows three rules relative to nearby neighbors — steer away to avoid crowding (separation), match their average heading (alignment), and move toward their center (cohesion).

Why is this a good example of emergent behavior?

No boid is told to 'form a flock.' The flock is emergent: it arises purely from many agents following the same simple local rules. Adjusting the sliders shows how small rule changes reshape the whole group's behavior.

Can I publish a simulation like this?

Yes. This is one self-contained HTML file using the 2D canvas — no libraries. Paste a complete HTML file at arcadelab.ai/publish to host an interactive simulation with a permanent URL.

Explore more