Science Lab · Biology
Predators and Prey
A meadow of grass, rabbits and foxes. Every animal moves, eats, has young, grows old and dies by a few simple rules, and nobody tells the numbers what to do. Watch them rise and fall in turns on the live graphs, next to the famous Lotka–Volterra equations. Then try to break the meadow, and to save it.
Scenes
Meadow
Rabbits
Foxes
Start again
Tick “Repeat with seed” to get exactly the same run each time you start again. Leave it off for a new run each time; the box shows the seed of the run you're watching.
Live numbers
- Time
- —
- Rabbits
- —
- Foxes
- —
- Grass cover
- —
- Last fox peak came
- —
- Meadow's rhythm
- —
- This season: born
- —
- eaten / starved
- —
The rhythm is the average time between rabbit peaks over the last few cycles. A season is 90 days.
Equations (Lotka–Volterra)
dR/dt = a R (1 − F/F*) dF/dt = d F (R/R* − 1)
- Equations' rhythm
- —
- for small swings, 2π/√(ad)
- —
- Meadow's rhythm
- —
a and d are rates per season. The equations run on the same clock as the meadow and start from the same numbers.
Grass experiment
Change the grass regrowth, or start again, to measure how many foxes it feeds.
| Grass regrowth | Average foxes over 40 seasons |
|---|---|
| No results yet. | |
Missions
Keys, with the meadow selected: space pauses, + and − change the speed, R starts again, W sends a hard winter, V a disease.
What you're seeing
The meadow is 64 by 40 patches of grass. Bright green patches are tall; brown ones are grazed down to the soil. Rabbits nibble the patch they sit on and hop off to find greener ones. Foxes trot about, and when a hungry fox spots a rabbit close by, it runs at it and pounces. A pink flash is a catch; a puff of dust is a rabbit that got away.
Energy keeps everyone going. Each animal has a store of energy, measured in days of living. Every day costs one day's worth. Eating fills the store up again, and an animal whose store runs out starves. Well-fed grown-ups with a mate nearby have young, and old animals die.
The graphs below the meadow show the numbers as time goes by. The top one counts the animals in the meadow. The one under it shows what the Lotka–Volterra equations predict. Rabbits are gold (left scale), foxes are red (right scale), and the green shading is the grass. Triangles mark the peaks.
The phase plot puts the number of foxes against the number of rabbits. Each moment is one point, so as the numbers change, the point draws a loop. It goes around counterclockwise: rabbits rise, then foxes rise, then rabbits fall, then foxes fall. The dashed blue loop belongs to the equations.
Time runs one day at a time. A season is 90 days and a model year is 360 days. At 1× you watch six days go by each second; speed it up to 60× to see decades.
The science
Why the numbers take turns
- When there are plenty of rabbits, foxes eat well and raise more cubs.
- More foxes eat rabbits faster than rabbits are born, so the rabbits get scarce.
- With few rabbits, foxes go hungry. They raise no cubs, and many starve.
- With few foxes about, the rabbits multiply again, and the story starts over.
Each step takes time, so the foxes are always running behind. Their numbers peak after the rabbits' numbers, when the rabbits are already falling.
The Lotka–Volterra equations
In the 1920s, Alfred Lotka in the United States and Vito Volterra in Italy each wrote down the simplest math for a predator and its prey. With R rabbits and F foxes:
- αR: rabbits are born. With no foxes, they would multiply at the rate α forever.
- βRF: rabbits are eaten. Doubling either the rabbits or the foxes doubles how often they meet.
- δRF: foxes are born, thanks to the rabbits they eat.
- γF: foxes die. With no rabbits, they die out at the rate γ.
There is one balance point where neither number changes: R* = γ/δ rabbits and F* = α/β foxes. Start anywhere else and the numbers circle around it forever. The panel's knobs are a = α, d = γ, R* and F*, which is the same thing written so that each knob means something you can picture.
How long is one cycle?
For small swings around the balance point, one full cycle takes
With the panel's starting knobs, α = 1.2 and γ = 0.9 per season, that is 2π/√1.08 = 6.05 seasons, about a year and a half. Bigger swings take longer: starting from 150 rabbits and 12 foxes, with the balance point at 250 rabbits and 20 foxes, one loop takes 6.28 seasons. For small swings, the foxes peak a quarter of a cycle after the rabbits, here about 1.5 seasons later.
Why the loops close
Along any path of the equations, this quantity never changes:
So the point in the phase plot can never spiral in or out. It comes back exactly to where it started and goes around the same loop again. Which loop it is depends only on the starting numbers.
Why the meadow isn't as tidy as the equations
- Animals come in whole numbers, and luck matters. The equations happily let 0.001 of a fox survive a bad year and bounce back. In the meadow, when the last few foxes miss a few meals, they are gone for good.
- Grass runs out. In the equations, rabbits with no foxes multiply forever. In the meadow, the grass can feed only so many: a few hundred, depending on how fast it grows back. Ecologists call that limit the carrying capacity. Hungry rabbits have fewer young, and that calms the swings.
- A fox can only eat so much. A full fox stops hunting. So when rabbits are everywhere, adding more rabbits doesn't feed the foxes any faster.
- Things take time. Fox cubs need 300 days to grow up, and a fox has at most one litter every 300 days. Delays like these make the swings bigger, and they make the foxes lag further behind: in 12 runs of Classic cycles, rabbit peaks came a median 7.2 seasons apart, and the fox peak followed a median 2.7 seasons after the rabbit peak, well over a quarter of a cycle.
Too much of a good thing
More grass means more rabbits, so you'd expect more foxes. That works up to a point. In 1971 the ecologist Michael Rosenzweig showed, with models like these, that making the prey's food richer can make the swings so wild that the predator crashes. He called it the paradox of enrichment. Try the Rich meadow scene, and use the grass experiment in the panel. In our tests (10 runs for each setting, foxes averaged over 40 seasons), the most foxes came from a middle setting: 9.3 foxes at 3% regrowth, 19.3 at 4%, 20.0 at 4.5%, then 13.0 at 5%, 11.3 at 8% and 10.5 at 10%. Single runs vary a lot at the rich end, because there it is luck that decides when the crash comes.
Hiding places
When some prey can hide where predators can't follow, the predators can never eat the last of them. The prey bounce back, and the predators get a steady trickle of food. In the 1930s, G. F. Gause found that a tiny predator, Didinium, ate every one of its prey, Paramecium, in a plain test tube and then starved. When he added sediment the prey could hide in, some prey survived. In 1958, C. B. Huffaker kept two kinds of mites going through several rises and falls by spreading their food, oranges, apart and adding barriers. A refuge that is too big can starve the predators, though. Try 40%.
The real thing: snowshoe hares and lynx
The most famous real example comes from the fur trade. For about a century, the Hudson's Bay Company bought lynx and snowshoe hare pelts from trappers in northern Canada. Plotted year by year, the numbers rise and fall roughly every ten years, with lynx peaks usually coming a little after hare peaks. It looks just like the graph above. But read it with care:
- Pelts are not a head count. They count what trappers brought in, which also depended on how hard people trapped and on what furs were worth.
- The two famous curves come from different records. The hare numbers and the lynx numbers were gathered in different ways and different places.
- Food matters too. A long experiment in the Yukon's Kluane region fed some hares extra food and fenced mammal predators out of some areas. Hares did best with both together, much better than with either one alone. Both food and predators shape the cycle.
- Lynx are not the only hunters. Coyotes, great horned owls, goshawks and others eat snowshoe hares too, and most hares that die are killed by one predator or another.
So the hare–lynx cycle is real, and predators are a big part of it, but it is not a simple loop between two species. The meadow and the equations are tools for thinking, not a copy of a real forest.
Try this
A common mix-up
“The most foxes come when there are the most rabbits.” It sounds right, but it isn't. Foxes need time to turn food into cubs and for those cubs to grow up. By the time the foxes peak, they have already been eating rabbits faster than rabbits are born, so the rabbits are falling. On the phase plot, the loop's highest point (the most foxes) sits above its middle, not above its rightmost point (the most rabbits).
A second mix-up: “predators eat their prey until it's all gone.” Usually the predators run short first. When prey gets scarce, it gets hard to find, and predators starve while some prey survives to start again. That is why a cycle can go on and on, and why the Overhunting scene ends with no foxes, even when a few rabbits are left.
How the simulation works
Grass. Each of the 2,560 patches holds up to one patch's worth of grass. Each day, a fixed share of the missing grass grows back: 4.5% at the start, so a bare patch is half grown again in about 15 days. With the seasons on, that share is multiplied by a factor that changes smoothly through the year: 1.3 in mid-spring, 1.1 in mid-summer, 0.9 in mid-autumn and 0.7 in mid-winter, which averages to 1.
Rabbits. Each day a rabbit moves (slowly in tall grass; when its patch is short, it looks around and hops toward the greenest grass), eats up to half a patch's worth, and burns one day of energy. A full patch is worth 4 days of energy, and a rabbit stores at most 12. From 90 days old, a rabbit with at least half a full store and another grown rabbit within 6 patches has a 10% chance each day of a litter, at most one every 30 days. Each baby costs its parent 2 days of energy and starts with 6. Rabbits live 1.5 to 4 model years if nothing gets them first.
Foxes. A fox stores up to 40 days of energy and hunts only when it is less than 80% full. It spots the nearest rabbit within 3 patches (but not one inside the refuge), runs up to 1.2 patches a day toward it, and pounces when it is close enough. The hunting success is the chance the pounce works. A rabbit is worth 10 days of energy. From 300 days old, a fox with at least half a full store and another grown fox within 12 patches has a 5% chance each day of a litter, at most one every 300 days. When the seasons are on, cubs are born only in spring, so once a year. Each cub costs its parent 6 days of energy and starts with 12. Foxes live 2 to 6 model years.
Events. A hard winter halves the grass growth for 30 days and makes every animal burn 15% more energy. A disease kills each rabbit with a 60% chance, all at once.
The equations run on the same clock, solved with the classic fourth-order Runge–Kutta method in one-day steps. Their rhythm is found by following the loop once around the balance point.
What's simplified. There are no males and females: any grown neighbor counts as a mate. Foxes eat only rabbits, and rabbits eat only grass. There are no burrows, no weather besides the seasons, and no animals moving in or out. The numbers are chosen so that a cycle takes a few model years and you can watch several of them. They are not measured from real rabbits and foxes, which is also why we call the energy units “days”, not kilograms. Random choices come from a generator with a seed, so the same seed and the same settings always give the same run.
How it was checked
| Test | Result | Expected |
|---|---|---|
| Equations: the conserved quantity V, 100 seasons in one-day steps | changes by 2 × 10−10 | 0 |
| Equations started at the balance point, after 100 seasons | 250 rabbits, 20 foxes | 250, 20 |
| Equations: one cycle for tiny swings (a = 1.2, d = 0.9) | 6.0460 seasons | 2π/√1.08 = 6.0460 |
| Equations: one cycle from 150 rabbits and 12 foxes, by following the loop and by timing peak to peak | 6.276 and 6.276 seasons | equal, and longer than 6.046 |
| Equations: how far behind the rabbit peak the fox peak comes, tiny swings | 0.249 of a cycle | a quarter |
| Grass with no animals, 100 days, vs. 1 − (1 − g0)(1 − r)t | largest gap 2 × 10−7 | 0 |
| Same seed twice, 3,000 days | identical | identical |
| 20 foxes and no rabbits | last fox gone on day 36 | by day 36 (fullest store) |
| Rabbits with no foxes, average in years 6 to 10, grass regrowth 3% / 4.5% / 6% | 214 / 338 / 464 | levels off, more with more grass |
| 25% refuge, 1,800 days: foxes inside the refuge, and rabbits caught inside it | 0, and 0 of 3,433 catches | 0 and 0 |
| Peak finder on a test wave with a 100-day period | peaks at day 25, 125, 225 … | 25, 125, 225 … |
| Meadow, Classic cycles, 12 runs: time between rabbit peaks | median 7.2 seasons | a cycle of a few model years |
| Same runs: fox peaks that came after a rabbit peak (within 8 seasons) | 114 of 148; median 2.7 seasons later | foxes follow rabbits |
We also ran each scene with 12 different seeds for 100 seasons and counted the runs in which both rabbits and foxes were still alive at the end:
| Scene | Runs with both alive after 100 seasons | Typical end when they don't make it |
|---|---|---|
| Classic cycles | 8 of 12 | season 9 to 88 |
| Lean meadow (grass 3%) | 8 of 12 | season 60 to 81 |
| Rich meadow (grass 8%) | 0 of 12 | half by season 9 |
| Classic, with a 15% refuge | 10 of 12 | season 47 and 91 |
| Overhunting (30 foxes, 90% success) | 0 of 12 | 10 of 12 by season 3 |
| Same hunters, 12 foxes, 20% refuge | 7 of 12 | season 31 to 97 |
| Four seasons | 8 of 12 | season 62 to 98 |
Sources
- A. J. Lotka, Elements of Physical Biology (Williams & Wilkins, 1925).
- V. Volterra, “Fluctuations in the abundance of a species considered mathematically,” Nature 118, 558–560 (1926).
- OpenStax, Biology 2e, 45.6 Community Ecology (predation and the lynx and snowshoe hare cycle) and 45.3 Environmental Limits to Population Growth (carrying capacity).
- C. Elton and M. Nicholson, “The ten-year cycle in numbers of the lynx in Canada,” Journal of Animal Ecology 11, 215–244 (1942).
- D. A. MacLulich, Fluctuations in the Numbers of the Varying Hare (Lepus americanus), University of Toronto Studies, Biological Series 43 (1937).
- C. J. Krebs and others, “Impact of food and predation on the snowshoe hare cycle,” Science 269, 1112–1115 (1995).
- C. J. Krebs, R. Boonstra, S. Boutin and A. R. E. Sinclair, “What drives the 10-year cycle of snowshoe hares?” BioScience 51, 25–35 (2001).
- M. L. Rosenzweig, “Paradox of enrichment: destabilization of exploitation ecosystems in ecological time,” Science 171, 385–387 (1971).
- G. F. Gause, The Struggle for Existence (Williams & Wilkins, 1934).
- C. B. Huffaker, “Experimental studies on predation: dispersion factors and predator–prey oscillations,” Hilgardia 27, 343–383 (1958).
- Wikipedia, Lotka–Volterra equations (period for small swings and the conserved quantity).