Predator and Prey Population Simulator
Equations in this simulation
| R, F | numbers of rabbits and foxes | ||
|---|---|---|---|
| a | Rabbit birth rate a (births per rabbit per day) | without foxes the rabbits would grow exponentially, or level off at K | |
| b | hunting rate: rabbits caught per fox per rabbit per day | Hunting success ÷ the 2,601 patches of the field, the chance a fox and a given rabbit share a patch on a given day | |
| c | Fox births per rabbit eaten c (equations) | ||
| d | Fox death rate d (per fox per day, equations) |
With the current values:
| R*, F* | equilibrium numbers | where both populations stop changing; the cycles circle around this point |
|---|
With the current values:
| T | period of small cycles | larger cycles take longer; the measured period is from the peaks of the rabbit numbers |
|---|
With the current values:
| V | conserved quantity of the Lotka–Volterra equations | constant along each cycle when K = 0, so the orbits are closed loops; a carrying capacity makes it fall and the cycles die away |
|---|
With the current values:
How to use the predator and prey simulator
- With Animals on a field, each one simulated, every rabbit and fox moves on its own. Rabbits eat the grass on their patch, which then takes time to regrow, and breed; foxes catch the rabbits they meet, and starve when they go too long without one. Watch the numbers rise and fall in turn: more rabbits feed more foxes, the foxes eat the rabbits down, then starve.
- The chart is a phase plot of foxes against rabbits: the run traces loops around the equilibrium, where the blue and orange lines cross. Change the rabbit birth rate, the hunting success or the food a fox gets from a rabbit, and see whether both species survive, or the foxes die out and leave the rabbits to the grass.
- Switch to The Lotka–Volterra equations to run the classic model instead. Without a carrying capacity its cycles repeat for ever; set one and they die away to a steady state. The results give the equilibrium numbers and the period, and the Bacterial Growth Simulator shows a single population growing on its own.
Frequently asked questions
What are the Lotka–Volterra equations?
Two equations for a predator and its prey, written by Alfred Lotka and Vito Volterra in the 1920s: dR/dt = aR − bRF for the prey and dF/dt = cbRF − dF for the predators. Prey grow exponentially and are eaten in proportion to how often the two meet; predators are born in proportion to what they eat and die at a steady rate. Their solutions are endless cycles.
Why do predator numbers peak after prey numbers?
Foxes need rabbits to breed, so their numbers climb only after the rabbits have become plentiful, and keep climbing while rabbits are still common. By then they eat more rabbits than are born, the rabbits crash, and the foxes starve a little later. The predator peak lags the prey peak by about a quarter of a cycle.
Is the lynx and snowshoe hare cycle an example?
It is the famous one: the Hudson’s Bay Company’s fur records show Canadian lynx and snowshoe hare rising and falling about every ten years. Later studies found the hares cycle partly because of their food and stress as well, so the real story is more than predator and prey alone.
Why do the populations sometimes die out?
In the equations a population can shrink to a tiny fraction and recover, but real animals come in whole numbers. When the foxes fall to a handful they can all die by chance, and when the rabbits crash to nothing the foxes must starve. Small, isolated populations are the most at risk.
It says WebGL is turned off.
The 3D view needs WebGL, which every current browser has. It can be switched off by hardware acceleration being disabled in the browser settings, or by a very old graphics driver. Turn hardware acceleration on, or try another browser.
Is anything uploaded?
No. The simulation is drawn by your own browser with WebGL; nothing is sent anywhere, and it keeps working offline once the page has loaded.