In this project we try to visualise the behavior of boids. To the simple formulation by Reynolds we add predators, obstacles and boid-individuality.
Install the requirements using pip.
Run the simulation: python -m boids
Quit: Esc
Add obstacles or attractors: Go to where they should be added with the mouse and press o/a.
This example shows some flying boids (blue triangle) which are hunted by the predators (red triangle) and avoid the obstacles (red circle).
A report for this university project can be found here.
A big shoutout to Michael Dodsworth for providing the baseline for this work free of use. See his original work at: https://github.com/mdodsworth/pyglet-boids