Biology and chemistry

Predator-prey simulator (Lotka-Volterra)

When a predator depends on a single prey, both populations rise and fall in offset cycles. Set the starting populations and watch them evolve under the classic Lotka-Volterra model.

Key formula

dA/dt = α·A − β·A·T · dT/dt = δ·β·A·T − γ·T

Try it

How to use the simulator

The Lotka-Volterra equations describe two populations that depend on each other: prey grow on their own, while predators grow by eating them and die off without food. The typical outcome is a cycle: prey rise, then predators rise, prey crash, then predators crash. Here the prey are astrophages and the predator is Taumoeba.

Controls

  • Initial astrophages: 1 to 10 units.
  • Initial Taumoeba: 0.5 to 5 units.
  • "No Taumoeba" button: removes the predator so you can see what happens unchecked, as in the Sun.

Things to try

  1. Start with about 6.5 astrophages and 2 Taumoeba. The curves barely oscillate, because you're very close to the model's equilibrium point.
  2. Move the starting values away from equilibrium and watch the oscillations grow without the system collapsing.
  3. Turn on "No Taumoeba": astrophages grow without limit. The chart caps them so they stay visible, but in reality they'd keep growing until they ran out of their resource.

Loading simulator…

Two equations, one cycle

The model, proposed independently by Alfred Lotka (1925) and Vito Volterra (1926), describes two populations. Prey (A) grow on their own at a rate α and die when they meet predators, at a rate proportional to the product A·T. Predators (T) grow from the prey they eat and die at a rate γ if they don't eat.

The result is a cycle: plenty of prey feeds plenty of predators; the predators thin them out; with no food, predators decline; with few predators, prey recover. The predator peak always comes a little after the prey peak.

Cycles in nature and in the lab

The best-known example is the Hudson's Bay Company fur records, which show roughly 10-year cycles in Canadian hare and lynx populations. Reality is more complex (vegetation, disease and other predators all play a part), but the basic pattern fits.

The same reasoning applies to biological pest control: bringing in a predator can cut a pest down, but if it eats all its prey it dies out too. Getting the balance right is key.

Worked example

Example: the equilibrium point

  1. The simulator uses α = 0.6, β = 0.3, δ = 0.2 and γ = 0.4.
  2. Prey stop changing when α = β·T, i.e. at T = 0.6 / 0.3 = 2 predators (in model units).
  3. Predators stop changing when δ·β·A = γ, i.e. at A = 0.4 / (0.2·0.3) ≈ 6.7 prey.
  4. Start near (6.7, 2) and the populations barely oscillate. The farther away you start, the bigger the cycles. For small oscillations the period is 2π / √(α·γ) ≈ 12.8 time units.

In Project Hail Mary

In the novel, the characters consider using a predator organism to control another one that threatens the Sun. The predator-prey model helps explain why that plan carries risks and how the populations balance out.

This tool appears in:Chapter 16The Taumoeba

Frequently asked questions

Why do predators never go extinct in the model?

Because the equations treat populations as continuous numbers: they can drop to 0.001 and recover. In reality a very small population can vanish by chance, which the basic model doesn't capture.

How can the model be improved?

By capping the prey population (carrying capacity), limiting how many prey each predator can eat per unit of time, or adding refuges. With those changes the cycles usually damp down toward an equilibrium.

Is it used outside ecology?

Yes. Similar equations describe oscillating chemical reactions, competition between companies, and the interplay between the immune system and a pathogen.

More tools in biology and chemistry

See all tools →