Labs · Autonomous Agents

Predators & Prey

Predators & Prey simulation

Flocking boids now share the world with predators. Prey flock and flee any predator nearby. Predators chase the nearest prey they can see, gain energy by eating, starve without food, and reproduce when well fed. Prey breed slowly when there is room.

Nothing here describes populations, yet the counts rise and fall in the boom-and-bust cycles of the Lotka–Volterra equations from ecology. Many prey → predators multiply → prey crash → predators starve → prey recover…

Lower the predator hunger rate and see whether the ecosystem collapses or stabilises.

Controls

Evolved from Flocking (Boids).

Evolved into Wolves, Sheep & Grass.