Skip to content
/ boids Public
forked from beneater/boids

Project for Multi-Agents course at ENSTA Paris

Notifications You must be signed in to change notification settings

pmorelr/boids

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boids simulation


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?

This section has been kept from Ben's original Readme

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.

About

Project for Multi-Agents course at ENSTA Paris

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 81.5%
  • HTML 16.0%
  • CSS 2.5%