<canvas>
This is boids! Described by Craig Reynolds in 1987, boids is an algorithm for simulating artificial life. It models the motion of animals that travel in flocks, like birds or fish.
I’m fascinated by systems where simple rules yield complex behavior. This was my first try at implementing one of those systems and it turned out to be a ton of fun.
For more on boids, wikipedia has a good overview or read the original paper on Craig’s website.