🦊 Fox & Rabbits

Rabbits start
Foxes start
🐰 Rabbits: 60
🦊 Foxes: 10
...

🦊 Fox and Rabbits — Ecosystem

A live Lotka-Volterra predator-prey ecosystem. Rabbits graze, multiply and are hunted by foxes. Watch the population chart oscillate as boom-and-bust cycles play out in real time.

🔬 What It Demonstrates

Agent-based simulation where each animal follows simple rules: eat, reproduce, die. Global population dynamics emerge from individual behaviours.

🎮 How to Use

Watch rabbits multiply, attracting foxes. As foxes overeat, prey declines, then foxes starve. The cycle repeats endlessly — a living demonstration of ecological balance.

💡 Did You Know?

The classic example is the Canadian lynx and snowshoe hare, whose fur-trapping records from the Hudson's Bay Company show 9-10 year population cycles going back to the 1800s.

About Fox & Rabbits

This is an agent-based predator-prey ecosystem that brings the classic Lotka-Volterra model to life. Every rabbit and fox is an individual agent following simple rules: rabbits hop around, lose energy over time, and periodically reproduce; foxes hunt the nearest rabbit, gain energy when they catch one, breed when well-fed, and starve when their energy runs out. A live chart plots both populations over time so you can watch the boom-and-bust cycles emerge, and sliders let you set the starting number of each species.

The Lotka-Volterra equations, published independently by Alfred Lotka in 1925 and Vito Volterra in 1926, describe how predator and prey populations oscillate: as prey grow plentiful, predators multiply, which then drives prey down, which starves the predators, letting prey recover — repeating in cycles where the predator peak lags behind the prey peak. The most famous real-world example is the Canadian lynx and snowshoe hare, whose roughly 9-10 year cycles were recorded in Hudson's Bay Company fur-trapping data going back to the 1800s. Such models underpin modern ecology, fisheries management and epidemiology.

Frequently Asked Questions

What does the Fox & Rabbits simulation demonstrate?

It demonstrates predator-prey population dynamics: rabbits graze and multiply while foxes hunt them and starve when prey is scarce. The two populations rise and fall in repeating cycles, a living version of the Lotka-Volterra model.

What are the Lotka-Volterra equations?

They are a pair of differential equations from the 1920s describing how predator and prey populations interact. Prey grow when undisturbed but are eaten by predators, while predators grow by eating prey but die off without it, producing oscillating cycles.

Why do the populations rise and fall in cycles?

When rabbits are plentiful, foxes have abundant food and multiply. Too many foxes overeat the rabbits, so prey crashes; the foxes then starve and decline, which lets the rabbits recover — and the cycle begins again.

Why does the fox population lag behind the rabbits?

Predators can only grow after their food source has grown, and they decline only after prey has already crashed. This delay means the fox peak always trails the rabbit peak, a hallmark of predator-prey cycles.

How do I control the simulation?

Use the sliders to set the starting number of rabbits and foxes, press Restart to begin a new run with those values, or press Balance to load a stable starting mix that tends to produce clear, lasting cycles.

Is this an agent-based model or an equation?

It is agent-based: instead of solving the equations directly, each animal is simulated individually with rules for moving, eating, breeding and dying. The familiar Lotka-Volterra cycles emerge naturally from these individual behaviours.

What happens if I start with too many foxes?

With too many predators and few prey, the foxes quickly eat all the rabbits and then starve, often collapsing the whole ecosystem. Balanced starting numbers are needed for sustained oscillation rather than extinction.

Is there a real-world example of these cycles?

Yes — the Canadian lynx and snowshoe hare. Fur-trapping records from the Hudson's Bay Company show their populations cycling together on a roughly 9-10 year period for over a century.

Do real ecosystems behave exactly like this?

Not exactly. Real populations are also limited by food supply, disease, weather, habitat and multiple species, so the pure two-species model is a simplification — but it captures the essential cycling behaviour remarkably well.

What is the chart showing?

The chart plots the number of rabbits and foxes over recent time, with separate coloured lines for each species. It makes the oscillating boom-and-bust cycles visible at a glance as the simulation runs.