Boids
An implementation of boids flocking algorithm.
Install / Use
/learn @Eoic/BoidsAbout this skill
Quality Score
0/100
Category
Development & EngineeringSupported Platforms
GitHub Copilot
README
Boids
A Python implementation of the boids ("bird-oid objects") flocking algorithm, simulating the collective motion of animals like birds or fish.
Features
- Real-time simulation of boids movement.
- Configurable parameters (number of boids, visual range, speed, etc.).
- Uses Pygame for visualization and pyimgui for GUI.
Preview
<img src="public/preview-grid.gif" width="auto" height="700%" style="object-fit: contain; max-height: 700px;" />Prerequisites
- Python: 3.8+.
- Corresponding python3-devel package for your distribution.
Installation
-
Clone the repository:
git clone https://github.com/Eoic/Boids cd Boids -
Create and activate a virtual environment:
# Linux/macOS python3 -m venv .venv source .venv/bin/activate -
Install dependencies:
-
For running the simulation:
pip install . -
For development (including testing, linting, etc.):
pip install -e '.[dev]'- The
-eflag installs the project in "editable" mode. Changes you make to the source code will be immediately effective without needing to reinstall. .[dev]installs the main package dependencies and the extra dependencies specified under the[dev]section inpyproject.toml. These include tools for testing, linting, formatting, etc.
- The
-
Usage
Once installed, you can run the Boids simulation directly from your command line:
boids
