live demo


Boids is an artificial life program, developed by Craig Reynolds in 1986, which simulates the flocking behaviour of birds. His paper on this topic was published in 1987 in the proceedings of the ACM SIGGRAPH conference. The name “boid” corresponds to a shortened version of “bird-oid object”, which refers to a bird-like object. The boids move according to a set of simple rules, which are as follows:

  • Separation: Boids avoid crowding local flockmates.
  • Alignment: Boids attempt to match the velocity of nearby flockmates.
  • Cohesion: Boids attempt to stay close to nearby flockmates.

Live Demo

The live demo is an implementation of the Boids algorithm using the HTML5 canvas and JavaScript. The boids are represented as simple triangles, and the user can interact with the simulation by adding and removing boids, as well as changing the separation, alignment, and cohesion parameters.

Source Code

The source code for the Boids algorithm can be found on my GitHub page.


© 2024 Joshua Gracie
Thanks for stopping by! Don't forget to check out my LinkedIn 💼 and TryHackMe