Play n Tools

Free tools & games for everyone

Free · No sign-up · No accounts

Predator & prey simulator

Watch rabbits and foxes rise and fall in turn. Lotka-Volterra cycles, balance point, a limit on prey, and exponential vs logistic growth.

Prey (e.g. rabbits)

Predators (e.g. foxes)

prey   predators

How to use

  1. Pick an example, or type your own numbers for the prey and predators.
  2. Press Run. The first chart shows both populations over time; the second plots predators against prey, so a repeating cycle draws a loop around the balance point (the dot).
  3. Tick Limit on prey to give the prey only so much food. The swings then die down towards the balance point, or the predators starve if the limit is too low.
  4. One population compares growth with no limit (exponential) and growth that slows near a limit (logistic).

Keyboard and touch

TabMove between boxes and buttons
EnterRun after typing a number
SpaceTick or untick the prey limit

Tips

  • The predator peak always comes after the prey peak: predators need food before they can breed.
  • The balance point does not depend on the starting numbers: prey settle at g ÷ c and predators at a ÷ b.
  • Surprise: making prey breed faster (a bigger a) raises the number of predators at balance, not the number of prey.
  • Without a prey limit, the model cycles forever. Real populations also have disease, weather and other species, so real cycles are messier.
  • The famous Canadian lynx and snowshoe hare records show cycles of about 10 years, the kind of pattern this model describes.

About this simulator

It uses the Lotka–Volterra equations (Alfred Lotka, 1925; Vito Volterra, 1926): prey grow at rate a and are eaten at rate b × prey × predators; predators grow at c × prey × predators and die at rate g. With a prey limit K, prey growth becomes logistic: a × prey × (1 − prey ÷ K).

The equations are solved step by step with the fourth-order Runge–Kutta method in steps of 0.01 time units. The test suite checks that the model's conserved quantity stays constant, that small swings repeat every 2π ÷ √(a × g) and that the logistic curve matches its exact formula.

The numbers are smooth averages, so they can be fractions of an animal. Everything runs on your device.

See you tomorrow!

A fresh daily puzzle every morning, and new tools added every month.

Browse every product