Link to hosted project: Boid Flocking
Made with JavaScript and visualized with the p5.js library
The boid algorithm consists of 3 rules which apply to the local flock (within a perception distance and a viewing angle):
Sources:
https://en.wikipedia.org/wiki/Boids
https://www.youtube.com/watch?v=mhjuuHl6qHM&vl=en