How does it work?
Ecosystem: every animal on its own
In Ecosystem mode each animal is a separate “agent” with a position and an energy reserve. The terrain is a grid of cells: on each one grow grass, shrubs, young trees (saplings) and trees, and a stream with a pond flows through the meadow. The rules are simple:
- herbivores (mice, hares, roe deer) graze the plants on the cell they stand on and look for better spots; they flee from predators; well-fed animals give birth in the breeding season; hungry ones die; when the area is crowded, fewer young are born;
- predators (foxes, wolves, buzzards, and after an intervention minks) sniff out prey, chase it and attack; in dense bushes and in the forest prey can hide more easily, and when prey is very scarce it becomes more wary; wolves share their kill with the pack; predators guard territories, so they don't multiply without limit;
- seasons: in spring plants grow fastest and the young are born, in autumn leaves fall, and in winter plants stop growing, snow makes foraging harder and animals need more energy — it's the hungry season.
The cycling of matter
Dead animals, fallen leaves and dead grass go into the soil as dead organic matter. Fungi and bacteria — the decomposers — break it down (fastest in summer, hardly at all in winter) and release mineral nutrients that make the soil more fertile. On fertile soil plants grow faster. Turn on the “Soil layer” to see where the soil is rich and where the decomposers are at work (glowing dots). After a fire, ash and burnt wood briefly enrich the ground, and then comes succession: first grass, then shrubs, finally trees.
Food web and cascades
In Food web mode the same ecosystem is described by equations — for whole populations, without randomness. The biomass of each consumer Bi changes like this (the Yodzis–Innes bioenergetic model):
dBidt = −xiBi + Σj xiyiBiFij − Σk xkykBkFkieki
The first term is respiration (energy used to stay alive), the second — food turned into the consumer's own body, the third — losses to predators. Fij is the functional response: the more prey, the more a predator eats, but not without limit — eventually it is full. Plants grow logistically, and their growth depends on mineral nutrients from the soil. Remove a species and you'll see a trophic cascade: without wolves roe deer increase, and shrubs and saplings decline. Wolves are only a fraction of a percent of animal biomass, yet they change the whole forest — they are a keystone species.
The 10% rule
Plants capture the Sun's energy, but herbivores assimilate only a small part of it, and predators only a small part of the herbivores' energy. The rest dissipates as heat. In nature, usually 5–20% of the energy passes to the next level (about 10% on average — Raymond Lindeman, 1942). That's why energy pyramids, and usually biomass pyramids too, narrow toward the top.
The Lotka–Volterra equations
Alfred Lotka (1925) and Vito Volterra (1926) independently described predator and prey with two equations. Let x be the number of hares and y the number of foxes (here in hundreds of animals):
dxdt = αx − βxyhares are born and get eaten
dydt = δxy − γyfoxes are born thanks to prey, and die
The product xy says how often a fox meets a hare. The populations stop changing at the equilibrium point:
x* = γδ, y* = αβ
The equilibrium number of hares depends only on the foxes' parameters, and vice versa. When the start is away from equilibrium, the populations circle along a closed orbit, because the quantity
V = δx − γ ln x + βy − α ln y = const
does not change over time. For small oscillations the period is T ≈ 2π/√(αγ), and the fox peak lags by a quarter of a period. If we add a limited amount of grass (capacity K: dx/dt = αx(1 − x/K) − βxy), the orbit turns into a spiral winding in to equilibrium — the system becomes stable.
The satiated predator and the paradox of enrichment
A real fox can't eat infinitely many hares — it needs a time h to chase and eat each one. This is the type II functional response (Crawford Holling, 1959). The Rosenzweig–MacArthur model:
dxdt = rx(1 − xK) − axy1 + ahx
dydt = eaxy1 + ahx − my
With a small K the populations settle down at equilibrium. But when we “enrich” the environment — raise K above the threshold KH = 2x* + 1/(ah) — the equilibrium loses stability (a so-called Hopf bifurcation) and a limit cycle appears, with ever larger swings. More food for the prey can thus endanger both species. This is the paradox of enrichment (Michael Rosenzweig, 1971).
Competition and Gause's principle
Two species that eat the same thing get in each other's way. The Lotka–Volterra competition model:
dxdt = r1x(1 − x + α12yK1),
dydt = r2y(1 − y + α21xK2)
The coefficient α12 says how strongly one individual of species 2 “takes up room” from species 1. Both species survive when each limits itself more than its rival (α12 < K1/K2 and α21 < K2/K1). Otherwise one displaces the other — this is the competitive exclusion principle. Georgy Gause demonstrated it in 1934 with paramecia grown in test tubes.
How does a computer solve the equations? The RK4 method
The computer moves in small steps h. The 4th-order Runge–Kutta method checks the slope four times within each step and takes a weighted average:
sn+1 = sn + h6(k1 + 2k2 + 2k3 + k4)
As a result, with the default parameters V changes by less than one billionth of its value after a hundred years. Euler's method with the same step would change it by tens of percent.
Simplifications: all the models are sketches, not forecasts. Time is nominal (in the ecosystem 1 year = 120 steps), animals have no sex or families (apart from wolves sharing their kill), buzzards stand in for all birds of prey, and the fish and amphibians that minks eat are not modeled separately. Biomasses in the food web are nominal kg per hectare. The parameters were chosen so that the models behave sensibly, not to reproduce a particular forest. Real hare and lynx cycles also depend on food, disease and stress — not just on predators.