I’ve been intrigued by flocking, schooling, and herding algorithms since running across the Boids web site.
The emergent “behavior” of flocking actually comes from three basic rules.
- Grouping – tell the Boids to group together.
- Alignment – tell the Boids to move in the same general direction.
- Avoidance – tell the Boids to avoid one another to avoid over crowding.
It’s a little mesmerizing to watch for an extended period of time. On occasion, the prey will seem to not avoid the predator as much as they do other times. I’m not entirely sure why that is. But the interesting thing is that all of this behavior is provided by only a few basic rules. You can read more about Boids via the following link.