Home▸Articles▸Animals & Their World

Boids Three Rules Lab: Separation, Alignment and Cohesion Weights

A fascinating exploration of how simple rules can lead to complex flocking behavior in nature.

mysimulator teamUpdated June 2026≈ 3 min read▶ Open the simulation

What Are Boids?

Boids is a computer simulation that models the flocking behavior of birds or fish. The term was coined by Craig Reynolds in 1986 to describe a set of simple rules that can generate complex group behaviors.

These rules are designed to mimic real-world flocking dynamics, focusing on three key aspects: separation (avoiding collisions), alignment (matching direction with neighbors), and cohesion (moving towards the center of the group).

The Three Rules in Detail

Separation ensures that each boid avoids overcrowding by moving away from nearby boids. This rule is crucial for maintaining a safe distance between individuals, preventing collisions and ensuring smooth movement.

Alignment involves each boid adjusting its direction to match those of the boids around it. This helps maintain the overall direction and speed of the flock, contributing to coordinated group behavior.

live demo · related simulation● LIVE

Adjusting Rule Weights

By adjusting the weights assigned to separation, alignment, and cohesion, you can explore how these rules interact to produce different flocking behaviors. Higher weights for one rule can lead to more pronounced effects in that direction.

For example, increasing the cohesion weight might result in a tighter, more compact flock, while boosting the alignment weight could make the group move in a more uniform direction.

Phase Diagrams and Polarization Plots

Phase diagrams provide a visual representation of how different combinations of rule weights affect the overall behavior of the flock. These diagrams help identify distinct regimes where certain behaviors dominate.

Polarization plots show the average direction and speed of all boids, illustrating how well the group is aligned or cohesive.

Frequently asked questions

How do Boids differ from real animal flocks?

While Boids are inspired by real-world flocking behavior, they simplify complex biological interactions. Real animals may have additional factors like vision, communication, and individual personalities that influence their movements.

What is the significance of the phase diagram in this simulation?

The phase diagram helps researchers understand how varying rule weights can lead to different flocking behaviors. It provides insights into the dynamics of group behavior under various conditions.

Can Boids be used for practical applications?

Yes, Boids have been applied in fields like robotics and computer graphics to model crowd behavior or create realistic animations. They can also help in understanding traffic flow patterns.

How does changing the weights affect individual boid behavior?

Changing the weights alters how each boid responds to its neighbors, leading to different emergent behaviors. For instance, a higher separation weight might cause more erratic movement as boids avoid each other.

Try it live

Everything above runs in your browser — open Boids Three Rules Lab: Separation, Alignment and Cohesion Weights — 2D Map and change the parameters while it is running. Nothing is installed, nothing is uploaded, the whole model lives in one tab.

▶ Open Boids Three Rules Lab: Separation, Alignment and Cohesion Weights — 2D Map simulation

What did you find?

Add reproduction steps (optional)