Craig Reynolds Boids Flocking

Complete emergent behavior simulation with interactive forces, real-time parameters, and visual debugging.

🐦 Watch boids flock together! Click to add boids, hold mouse to attract/repel

Flocking Rules

  • Separation: Steer to avoid crowding local flockmates
  • Alignment: Steer towards average heading of neighbors
  • Cohesion: Steer to move toward average position of neighbors
  • Emergence: Complex flocking behavior from simple rules

Interactive Features

  • Mouse Interaction: Attract or repel boids with mouse
  • Real-time Controls: Adjust flocking parameters live
  • Edge Behaviors: Wrap, bounce, or avoid boundaries
  • Debug Mode: Visualize perception radii and forces