0
Simulation time (yr)
6
Active species
Ecosystem status

About the Food Web Simulator

This simulator models a six-species ecosystem — two plants (grass, shrubs), two herbivores (rabbit, deer) and two carnivores (fox, wolf) — using extended Lotka-Volterra equations. Plants grow logistically towards a carrying capacity, while every feeding link transfers biomass from prey to predator. The coupled differential equations are integrated with a fourth-order Runge-Kutta (RK4) scheme at a time step of 0.01 years, producing the oscillations, equilibria and collapses you see unfold.

The sliders set the plant growth rate r₁, the herbivore attack rate α, the carnivore conversion efficiency e and a baseline mortality rate d, while a speed control changes integration steps per frame. Clicking any species toggles it in or out of the web. Food-web models like this help ecologists predict how removing a single species — through hunting, disease or habitat loss — can ripple through whole communities as a trophic cascade.

Frequently Asked Questions

What does this simulation show?

It shows the changing populations of six interacting species arranged across three trophic levels: producers (grass and shrubs), herbivores (rabbit and deer) and carnivores (fox and wolf). A network diagram, a population landscape and a time-series chart all update in real time as the ecosystem evolves.

Which equations drive the model?

It uses extended Lotka-Volterra dynamics. Plants follow logistic growth limited by a carrying capacity of 200, herbivores and carnivores lose individuals at a mortality rate d, and each predator-prey link removes biomass from the prey while adding a fraction e of it to the predator. The equations are solved numerically with RK4.

What do the four sliders control?

r₁ sets how fast plants regrow, α sets the herbivore attack rate (how strongly consumers deplete their food), e sets the carnivore conversion efficiency (prey eaten turned into new predators), and d sets the baseline death rate. A fifth slider only changes how many integration steps run per animation frame.

Why do the populations oscillate?

Predator and prey populations feed back on each other with a delay: lots of prey lets predators grow, the swelling predator population then drives prey down, which later starves the predators, and the cycle repeats. This produces the characteristic out-of-phase oscillations seen in Lotka-Volterra systems.

What happens when I toggle a species off?

Clicking a species sets its population to zero and removes it from the web, so all of its feeding links go inactive. This lets you stage a local extinction and watch the consequences — for example removing the wolf may let deer surge and overgraze the shrubs, illustrating a trophic cascade.

Is the model biologically accurate?

It is a qualitative teaching model, not a calibrated forecast of any real population. The species, rates and feeding strengths are illustrative, and real ecosystems include age structure, spatial movement, environmental noise and many more species. The simulator faithfully captures the broad behaviours — cycles, equilibria and cascades — rather than exact numbers.

What do the preset scenarios do?

Each preset loads a parameter set that produces a recognisable regime: stable oscillations, predator collapse, a plant bloom, a trophic cascade, or competitive exclusion between the two plants. Selecting one resets the populations so you can watch that behaviour emerge from the chosen growth, attack, efficiency and mortality values.

What is carrying capacity and why does it matter?

Carrying capacity (here fixed at 200 for plants) is the maximum biomass the environment can sustain. The logistic term slows plant growth as the population approaches this limit, preventing unbounded blooms and giving the whole web a stable resource base from which herbivores and carnivores draw.

Why might a whole branch of the web go extinct?

If mortality is high or attack and efficiency rates are mismatched, a predator can over-consume its prey, crash the prey population and then starve itself. Because carnivores depend on herbivores that depend on plants, a shock at one level can propagate upward or downward and wipe out several species — an extinction cascade.

Why use RK4 instead of simpler stepping?

Fourth-order Runge-Kutta evaluates the rate of change four times per step and combines the estimates, giving much smaller numerical error than a single Euler step at the same time interval. For the stiff, oscillating Lotka-Volterra equations this keeps the simulated cycles accurate rather than letting them artificially spiral or decay.

How does this relate to real conservation?

Food-web models guide decisions about reintroducing predators, managing pests and protecting keystone species. The classic example is wolves in Yellowstone: their return reshaped deer behaviour and vegetation. By experimenting with toggles and rates here, you can build intuition for how interventions ripple through a connected ecosystem.