Predator-Prey Tycoon
Tune the Lotka–Volterra dials so foxes and rabbits both survive the season.
A gentle ecosystem. Only nudge the prey birth rate α so the foxes and rabbits keep oscillating without anyone dying out.
Both species must stay within 0.05 (extinction) and 40 (carrying cap).
Move the open dials, then Run. The amber orbit (top) is the breathing limit cycle in the prey–predator phase plane; the emerald and rose traces (bottom) are the two populations over time. Keep both away from the dashed red boundaries.
How it works
The Lotka–Volterra equations model two species: x' = αx − βxy for prey and y' = δxy − γy for predators. Prey grow from birth (α) but are eaten on contact (β); predators grow by converting eaten prey (δ) and die off naturally (γ). The system has no friction, so it orbits a closed loop — a limit cycle whose size depends entirely on the parameters and where you start. We integrate it with classic RK4 at dt = 0.01. Push the cycle too wide and someone goes extinct or overshoots the cap; thread it through the middle to win.