What are boids?

For my 10th grade science fair project, I studied artificial intelligence and its inspiration from nature through the lens of emergent behavior and distributed agent systems and in particular by writing a graphical simulation in Python based off of the boids algorithm developed by Craig Reynolds. In other words, I created life modeled after birds or fish through the interactions of dumb particles which can flock, avoid obstacles while seeking goals, and even hunt in packs!

Picture of boids in a preditor-prey simulation Picture of boids avoiding obstacles Picture of boids flocking
Screenshots of simulation in action. From left to right: predator/prey simulation, obstacle avoidance, and good old flocking.

Awards

This project won 1st place out of the entire high school for the science fair.

But wait, there’s more!

I have been keeping this project under somewhat active development and any ideas, recommendations, and even code requests are welcome. Currently, I am eyeing adding a genetic algorithm to optimize the weights of the various boid rules.

I have open sourced the code, and you can check it out on Github here . It is pretty neat if I may say so myself, so feel free to just clone and run it if this piques your interest.

If you are really interested, you can even check out the paper I submitted for it (all 18 pages worth), here although it is in French which might be a barrier.