A Python implementation of the boids ("bird-oid objects") flocking algorithm, simulating the collective motion of animals like birds or fish.
- Real-time simulation of boids movement.
- Configurable parameters (number of boids, visual range, speed, etc.).
- Uses Pygame for visualization and pyimgui for GUI.
- Python: 3.8+.
- Corresponding python3-devel package for your distribution.
-
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
-e
flag 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
-
Once installed, you can run the Boids simulation directly from your command line:
boids