100

Alignment in boids describes how each agent adjusts its direction based on the average heading of nearby neighbors. Instead of moving randomly, a boid “looks around,” senses which way others are going, and gently steers to match that general direction.

This creates the impression of coordinated motion, like birds turning in unison. Alignment doesn’t force identical movement; it simply nudges each boid toward a shared heading. When tuned well, it produces smooth, flowing group dynamics that feel intentional and alive, especially in dense flocks or fast‑moving swarms.

80

Cohesion ensures that boids stay together as a group rather than drifting apart. Each boid calculates the average position of nearby neighbors and steers slightly toward that center. It’s not a hard pull but a soft attraction that keeps the flock unified. Without cohesion, the group would quickly scatter into isolated individuals.

With it, clusters form naturally, creating the organic, cloud‑like shapes we associate with flocking behavior. Cohesion balances nicely with separation and alignment to maintain both structure and fluidity in the simulation.

100

Separation prevents boids from crowding or colliding with each other. When another boid gets too close, the agent steers away to maintain personal space. This rule introduces a repulsive force that counteracts cohesion’s pull, ensuring the flock doesn’t collapse into a single point.

Separation is crucial for creating realistic, jittery micro‑movements within the group, giving the simulation its lively, reactive feel. Properly tuned, it keeps the flock airy and dynamic, allowing individuals to weave around one another while still contributing to the overall collective motion.