Tested tool guide
Tested browser tools
Checked August 16, 2026
What Predator-Prey Simulator does, with a checked example
This tool integrates the classic Lotka-Volterra pair of differential equations - prey grow at rate alpha, are removed at rate beta per predator, predators grow from eaten prey at rate delta and die at rate gamma - stepping both populations forward from the initial counts you set. It plots the two time series, the predator-versus-prey phase portrait, and the coexistence equilibrium. The surprise: the standard model is neutrally stable. Every starting point traces its own closed loop; nothing damps the swings, and any disturbance moves the system onto a different cycle.
Worked example
A concrete input and expected output from the current implementation.
Input
alpha = 1.5 (prey growth), beta = 0.5 (attack rate), delta = 0.5 (conversion), gamma = 0.75 (predator death); initial prey 2.0, initial predators 2.0; run 30 time units.
->
Expected output
Both populations rise at first - prey at 1.0 per time unit, predators at 0.5 - then cycle around the equilibrium at prey = gamma/delta = 1.5, predators = alpha/beta = 3.0. Prey crest first, as predators pass 3.0; predators crest about a quarter cycle later, as prey fall back through 1.5. Near equilibrium the period is about 2*pi/sqrt(alpha*gamma) = 5.9 time units and lengthens with amplitude, so the run shows several full loops in the phase portrait.
The coexistence point (gamma/delta, alpha/beta) is a neutrally stable center, so the orbit is closed and the small-amplitude period follows from the linearized frequency sqrt(alpha*gamma). The quarter-cycle lag between peaks comes from the sign structure of the rates: prey stop rising exactly when predators cross alpha/beta, and predators stop rising exactly when prey cross gamma/delta.