Computer Science · Simulator 056
Each bird (“boid”) follows three simple rules about its nearby neighbours only. There is no leader and no plan, yet the group swirls and flows like a real flock. Turn each rule up or down, release a predator, and see which behaviour each rule controls.
Craig Reynolds' boids (1987) steer by three local rules, each a small force computed from neighbours within a vision radius:
Speeds are kept between a minimum and maximum, and the world wraps around. The order parameter (length of the average heading vector, from 0 = random to 1 = all aligned) measures how coordinated the flock is.
A predator adds a strong flee force for boids within its range, producing the splitting and re-forming seen in starling murmurations and fish schools. Lookups use a spatial grid so hundreds of boids stay fast.
An agent-based illustration, not a calibrated model of any species. Starting positions use a fixed seed.
Which single rule would you remove to make boids crash into each other, and which to make them never gather into groups?
Without separation, cohesion and alignment pull boids on top of each other, so they collide. Without cohesion (and with little alignment), nothing draws them together, so they stay spread out. Try each with the sliders.