This is a simulation showing emergance of complex patterns from just 3 simple rules:
- separation - boids try not to crash into each other
- alignment - boids try to match the velocity of nearby flockmates
- cohesion - boids try to steer towards average center of nearby flockmates
Just those rules can create fascinating behavior resembling flock of birds or school of fish.