Home▸AI & Machine Learning▸Population Migration Simulation (2D)

Population Migration Simulation (2D)

A metapopulation model: six habitat patches with logistic growth, diffusive migration between neighbors, and random local extinctions — watch when migration rescues a crashed patch and when it doesn't.

AI & Machine Learning2DModerate60 FPS📱 Mobile-adapted⇄ 3D version
2d-population-migration-simulation ↗ Open standalone

This 2D companion replaces the original page's decorative reinforcement-learning dashboard with a real metapopulation model: six habitat patches grow logistically toward their own carrying capacity, exchange individuals diffusively with their ring neighbors, and occasionally suffer a random local extinction. At low migration rates a crashed patch stays empty; raise the migration slider and neighboring patches recolonize it — the rescue effect from population ecology, made directly visible instead of implied.

⚙ Under the hood

2D metapopulation lab with per-patch logistic growth, diffusive migration between ring neighbors, and stochastic local-extinction events, showing when migration rescues a crashed patch.

metapopulationlogistic growthmigrationrescue effectpopulation ecologylocal extinction

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

What is the "rescue effect"?

In metapopulation ecology, a habitat patch that suffers a local extinction can be recolonized by migrants arriving from neighboring occupied patches. Whether that happens depends on the migration rate relative to how far the patch's population fell — exactly what the migration-rate slider controls here.

Why do patches have different carrying capacities?

The habitat-variability slider randomizes each patch's carrying capacity to model unequal habitat quality — richer patches can act as "source" populations that export migrants to poorer "sink" patches.

What happens if migration is set to zero?

Each patch then evolves independently under pure logistic growth. A patch hit by a catastrophe stays near zero forever, since nothing replenishes it — a useful contrast with the migration-enabled case.

What did you find?

Add reproduction steps (optional)