Skip to content

A simulation of swarming behavior using simple rules: separation, alignment, and cohesion, creating dynamic, emergent movement

License

Notifications You must be signed in to change notification settings

josephclydemar/boid-world

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

47 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Boid World

Visualizes the collective movement of agents (boids) following simple rules to mimic natural flocking behavior. Each boid follows three rules: separation (avoiding crowding neighbors), alignment (matching velocity with nearby boids), and cohesion (steering towards the group’s center). The simulation dynamically adjusts to changing environments, creating emergent, lifelike swarm behavior.


Instructions

Step 1: Install dependencies

pip install -r requirements.txt

Step 2: Run program

python ./src/main.py


Player Controls

  • Press w key to move forward.
  • Press d key to steer clockwise.
  • Press a key to steer counter-clockwise.
  • Press SPACE key to speed up.
  • Press q key to summon Boids.







Block Orientation

       e1
 c0 _______ c1
   |       |
e0 |       | e2
   |_______|
 c3    e3   c2

About

A simulation of swarming behavior using simple rules: separation, alignment, and cohesion, creating dynamic, emergent movement

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages