Predator–Prey Simulator illustration

Predator–Prey Simulator

The Lotka–Volterra model describes two interacting species — prey that breed on their own and predators that survive only by eating the prey. Four rates govern it: prey growth α, predation β, predator growth from eating δ and predator death γ. Set those and the starting populations and the simulator integrates the coupled equations with fourth-order Runge–Kutta, drawing two things at once: a time series of both populations rising and falling out of phase, and a phase-plane plot where the state traces a closed orbit around the coexistence equilibrium. The equilibrium point (γ/δ prey, α/β predators) is marked so you can see the orbit circle it.

Runs 100% in your browser — simulations are computed locally on your device.

Notes

  • Update rules: prey change dx/dt = αx − βxy, predators dy/dt = δxy − γy. Predators grow only in proportion to how often they meet prey.
  • The equilibrium sits at x* = γ/δ prey and y* = α/β predators; any other start orbits around it forever without settling — the cycles never damp out.
  • Predator peaks lag prey peaks by a quarter cycle: prey crash first, then predators starve and crash after them.
  • Runs 100% in your browser — simulations are computed locally on your device.