Puzzles & Party

Ecosystem Simulator

A little meadow of grass, rabbits and foxes. Rabbits eat the grass, foxes eat the rabbits, and the numbers boom and crash. Can you keep both species alive for a whole year? (Honestly, this one is just random. I was bored.)

0Day
0Rabbits
0Foxes
0%Grass
0 daysBoth alive
0Your best (days)
Rabbits (left scale)Foxes (right scale)Grass cover

Events

Nature's settings (change any time)

Start over

What happened

    Keeps this tool on this device so it works without internet, even after a refresh.

    Had fun, or did this help? I’d appreciate any donation :) Not needed, but money buys temporary happiness at least lol

    What it is

    An ecosystem simulator, also called a predator-prey simulation. It's a living toy meadow with three things in it. Grass grows back slowly. Rabbits eat grass, breed when they're well fed, and run for their burrows when a fox gets close. Foxes hunt rabbits, raise cubs when they have their own territory, and starve when the rabbits run out. Nobody scripts the ups and downs: they come out of hundreds of animals each following those few simple rules.

    Example

    Leave everything on the defaults (Balanced meadow, 60 rabbits, 8 foxes, seed 2) and don't touch anything:

    To beat 255 days, step in when the foxes start winning: a dose of fox mange, or more burrows for the rabbits, can stop the crash.

    How to use Ecosystem Simulator

    1. Watch for a bit. The cream line is rabbits, the orange line is foxes, and the green area is how much grass is left.
    2. Pick a tool above the meadow and click or drag to add things. A burrow is a safe spot: a rabbit standing next to one can't be caught.
    3. Use the events and sliders to push nature around, then see how long it takes to recover.
    4. Pick another meadow, such as Island (grass ringed by rock) or Too many foxes, or roll a new seed, and press Restart.
    5. Press Data (CSV) to open the numbers in a spreadsheet, one row per day.

    Why the numbers go round in circles

    This is the pattern ecologists call a predator-prey cycle. In maths it's described by the Lotka–Volterra equations. More prey means more food for predators, so the predators increase, but only after a delay, because cubs take time to grow up. By the time the predators peak, they're eating prey faster than it can breed, so the prey falls, then the hungry predators fall, and the prey can recover. On the graph, the fox peak always comes after the rabbit peak. Grass adds a second layer: too many rabbits strip the meadow and starve themselves, even with no foxes.

    A small meadow tends to overshoot, so one species often dies out. Real ecosystems survive partly because of hiding places, like the burrows here, and because animals spread out over far larger areas. Try adding burrows, or making foxes slightly worse hunters, and see whether the cycles become gentler.

    Ecosystem Simulator FAQ

    Is this a real scientific model?

    It's an agent-based model: every rabbit and fox is simulated on its own, with hunger, age and a position, instead of being worked out from an equation. The rules are simplified, and the numbers aren't tuned to any real place, but it shows the same behaviour real populations do: booms, crashes, lags between predator and prey, and the danger of overgrazing. That makes it handy for a biology or ecology lesson.

    Why did everything die?

    Usually because the rabbits ate the grass bare and then the foxes caught the last few. Try a slower rabbit breeding setting, more burrows, or Rain at the moment the grass runs out. If both species die, the grass still grows back on its own, so you can drop in new animals and carry on.

    Does the speed slider change what happens?

    No. The simulation always moves in the same small steps (10 per day); the slider only changes how many steps run each frame. A seed plays out exactly the same at 1× or 30×, unless you add animals or set off events.

    Is anything uploaded?

    No. It all runs in your browser. Only your best score is saved, in this browser's local storage.