Phatsoftware

Boids

simulations · v1.0

Description

No description yet.

Updated 28 June 2026

▶ Launch

README

Boids Simulation

A real-time flocking simulation based on Craig Reynolds' Boids algorithm (1987), which models the emergent collective behaviour of birds, fish, and other animals that move in groups.


What is Boids?

"Boids" (bird-oid objects) is an artificial life simulation that demonstrates how complex, lifelike group behaviour can emerge from just three simple steering rules applied to each individual agent:

Rule Description
Separation Steer away from nearby neighbours to avoid crowding
Alignment Steer towards the average heading of nearby neighbours
Cohesion Steer towards the average position of nearby neighbours

Each boid only perceives agents within a local radius — there is no global coordinator. The flock emerges entirely from these local interactions.


Features

  • Real-time flocking simulation with configurable parameters
  • Adjustable weights for separation, alignment, and cohesion
  • Configurable perception radius and field of view
  • Boundary handling (wrapping or bouncing)
  • Visual debug overlays (perception radius, velocity vectors)
  • Support for obstacles and predator agents