← Game of Life

3. Boids

Each bird only sees nearby birds and follows 3 rules. No bird knows there is a flock. Set a rule to 0 and watch the flock fall apart. All demos Next: Genetic Algorithm →

World: click a bird to trace it

Zoom: selected bird

The 3 rules: drag to change

Flock alignment

FSM: one bird, every tick

Pseudocode, tagged by FSM state