Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.87 KB

README.md

File metadata and controls

44 lines (26 loc) · 1.87 KB

Boids simulation

Check it out here!


Disclaimer

This project builds on Ben Eater's Boids algorithm demonstration repo (copyright 2020 Ben Eater).

Check out his repo, ⭐️ it and read the original project's readme for more details!

This code is MIT licensed.


What is this

This is a boids (bird-oid objects) simulation done for a Multi-Agents Systems class, taken on 2022 at ENSTA Paris. More details on report.pdf.

Improvements

We have developed on Ben's original code by adding some functionalities:

  • Predators (red triangles) that scare the boids
  • Leaders (yellow triangles) that leave traces of their direction behind, helping other boids find their way running away from the predator – this was done to create an indirect communication scenario
  • Turbulence areas (yellow circles), that throw boids away on a given direction
  • Obstacles (black circles), that block boids from passing
  • Optional use of the mouse as a leader (in this case, it does not leave traces behind)

How do I run this code?

It should run in any web browser. Download (or clone) the files. Then, just double-clicking on index.html on most computers will open the simulation in your web browser.

In case this does not work, another way is to open the repo on VSCode, instal the LiveServer extension and activate a live server while on the index.html file.

You can then edit boids.js to tweak and experiment with the algorithm. Simply save your changes and reload the web browser page to see the effect.

Authors

Built on top of Ben Eater's awesome work.