Every prey and predator is an independent agent with its own position, heading and energy. Prey wander and forage, gaining energy at a rate set by food availability; once an individual's energy is full it has a per-second chance (set by reproduction rate) to split off an offspring nearby, spending half its energy to do so. When a predator comes within sensing range, prey steer directly away from it.
Each predator continuously steers toward the nearest prey. Catching one (getting within a short capture distance) refills the predator's energy and removes the prey; predators lose energy steadily over time and die of starvation if they go too long without a catch. Predator count lets you add or remove hunters instantly to see how the balance shifts.
- Low food + high predator count → prey population crashes, then predators starve in turn.
- High reproduction rate can outpace predation, letting prey overrun the field.
- The prey:predator ratio and catch count are the same kind of population signals real Lotka–Volterra models track.