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 attempt at implementing one of those systems and I think it turned out pretty well. You can see, run, edit, and fork the code on openprocessing.org.

to close this and watch the boids.