Home▸Biology & Life▸Prey-Predator Particle Swarm (2D)

🐟 Prey-Predator Particle Swarm (2D)

A 2D Canvas simulation of hundreds of prey and predator particles interacting through local spatial rules, producing emergent Lotka-Volterra population oscillations with a live population chart.

Biology & Life2DEasy60 FPS📱 Mobile-adapted⇄ 3D version
2d-prey-predator ↗ Open standalone
⚙ Under the hood

A 2D Canvas2D simulation where hundreds of prey and predator particles wander an arena and interact through purely local rules: predators chase and eat nearby prey using a spatial grid for fast neighbor lookup, while prey reproduce stochastically. A live population chart in the corner shows the resulting Lotka-Volterra oscillations, and sliders let you tune birth rate, predator energy drain, eat radius, energy gain per kill, and simulation speed.

EcologyLotka-VolterraAgent-BasedPopulation DynamicsCanvas2D

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

What did you find?

Add reproduction steps (optional)