An interactive aquarium where fish school together using real flocking behaviour (Boids algorithm). Feed the fish, add new species, and watch the emergent beauty of coordinated movement.
Fish follow three rules: keep distance from neighbours (separation), match group direction (alignment), and stay close to the group centre (cohesion). These produce the stunning swirling schools seen in real oceans.
Click the Feed button to drop food and watch fish rush toward it. Use sliders to add more fish or change their speed. Click anywhere in the water to scatter the school.
A school of fish has no leader — every fish follows and leads simultaneously. This leaderless coordination lets schools react to predators in milliseconds, faster than any central nervous system could manage.