block by HarryStevens a82fc63f8bed339d64ccdcc49a635a05

Bad Boids

Full Screen

This is my first attempt at implementing Craig Reynolds’s boids flocking simulation. Click and drag to add boids.

If you compare this to successful implementations, such as this, this and this, you’ll see that adjusting the parameters should have a more significant affect on the behavior of the boids. I don’t know how to implement the separation parameter correctly; I don’t know what factors should affect the boids’ velocity; and I don’t understand why the boids have a tendency to move to the right. Finally, this implementation uses no spatial index, so it runs in quadratic time.

Even though it is very flawed, I thought it’d be fun to publish a notebook of this early version to track my progress. And the boids still exhibit some pretty cool emergent behavior.