Reynolds (1987) boids: three local rules — separation, alignment, cohesion — produce emergent flocking behavior. Click to add an obstacle or scatter. Tune weights to transition between swarming and flocking.
Emergent collective behavior from purely local interactions: no central controller, no global information. The three rules (separation prevents collision, alignment creates ordered motion, cohesion keeps the flock together) are sufficient to reproduce murmuration-like dynamics.