Boids is an interactive browser-based flocking simulation that demonstrates emergent behavior from simple rules. Watch as individual agents (boids) interact with their neighbors using separation, alignment, and cohesion rules to create realistic, organic group movement patterns.
This project is part of Winter of Open Source, where contributors can improve simulations, add new features, optimize performance, and enhance the overall project.
The simulation is based on three core flocking behaviors:
- Separation: Boids steer to avoid crowding local flockmates
- Alignment: Boids steer towards the average heading of local flockmates
- Cohesion: Boids steer to move towards the average location of local flockmates
Each behavior contributes a steering force weighted by configurable parameters, allowing you to fine-tune the simulation dynamics.
In order to understand how things work under the hood, read EXPLANATION.md.
- Clone the repository:
git clone https://github.com/datavorous/boids.git
cd boids- Open
index.htmlin your web browser (or use a local server):
# option 1: python 3
python3 -m http.server 8000
# option 2: node.js
npx http-server
# option 3: JUST OPEN THE index.html IN YOUR BROWSER!- Navigate to
http://localhost:8000in your browser
Please follow CONTRIBUTING.md for step-by-step guidance on:
- Setting up your development environment
- Understanding the codebase structure
- Making improvements and submitting PRs
- Code style and best practices
- Testing your changes
Please follow CODE_OF_CONDUCT.md to ensure a welcoming and productive environment for all contributors.

