Home▸Animals & Their World▸Fox & Rabbits: Predator-Prey Population Cycles (2D)

Fox & Rabbits: Predator-Prey Population Cycles (2D)

2D agent-based predator-prey lab: foxes hunt rabbits, rabbits graze grass, and the classic Lotka-Volterra boom-and-bust cycle emerges live from simple per-agent rules you can tune.

Animals & Their World2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-predator-prey ↗ Open standalone

This 2D companion runs the same agent-based predator-prey rules as the 3D version through a plain Canvas2D view: rabbits seek the nearest grass patch and eat it, foxes seek the nearest rabbit within hunting range and catch it, both lose energy every step and die when it hits zero, and a live chart plots the resulting rabbit and fox populations so the Lotka-Volterra boom-and-bust cycle is visible as it happens.

⚙ Under the hood

Agent-based 2D predator-prey model: rabbits graze grass, foxes hunt rabbits, energy and reproduction thresholds drive births and deaths, and a live chart tracks both populations over time.

predator-preylotka-volterrapopulation dynamicsagent-based modelecology

2D · HTML5 Canvas 2D · 60 FPS target · runs fully client-side, no install

What did you find?

Add reproduction steps (optional)