Predator-Prey Dynamics

Explore the fascinating interplay between hunters and hunted in this extension of the classic Boids algorithm. Green prey agents flock together for safety while red predators hunt them down. Watch as natural selection plays out: predators must catch prey to survive, while prey must evade and reproduce. Energy dynamics create realistic population oscillations reminiscent of Lotka-Volterra equations.

Prey
Predator
FPS: 60
Prey Population: 150
Predator Population: 15
Total Captures: 0
Prey Spawned: 0

Ecosystem Dynamics

Prey: Flock for safety, flee from predators, reproduce when safe

Predators: Hunt nearest prey, need energy from captures to survive

Watch population cycles emerge from simple rules!