Skip to content

Eoic/Boids

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

Prerequisites

  • Python: 3.8+.
  • Corresponding python3-devel package for your distribution.

Installation

  1. Clone the repository:

    git clone https://github.com/Eoic/Boids
    cd Boids
  2. Create and activate a virtual environment:

    # Linux/macOS
    python3 -m venv .venv
    source .venv/bin/activate
  3. 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 in pyproject.toml. These include tools for testing, linting, formatting, etc.

Usage

Once installed, you can run the Boids simulation directly from your command line:

boids

References

  1. Boids Pseudocode.
  2. Boids (Flocks, Herds, and Schools: a Distributed Behavioral Model).

About

An implementation of boids flocking algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages