This 2D companion uses the exact same generalized logistic-competition model as the 3D version, viewed top-down instead of as a 3D arena. Every pairwise ecological relationship is written as one shared equation pair for two population densities A and B:
dA/dt = rA·A·(1 - A/K) + sA·β·A·B/K
dB/dt = rB·B·(1 - B/K) + sB·β·A·B/K
The first term is ordinary logistic growth toward carrying capacity K. The second is the interaction: β is its strength (this simulator's slider) and sA, sB are its signs, which are exactly what distinguish the five textbook interaction types:
- Competition (−/−) — sA=−1, sB=−1. Both species suppress each other's growth (shared limiting resource); strong β drives one toward competitive exclusion.
- Predation (+/−) — sA=+1 (A is predator/consumer), sB=−1 (B is prey). A gains at B's expense.
- Mutualism (+/+) — sA=+1, sB=+1. Each species' presence raises the other's growth (e.g. pollinator/plant); at low β both settle above their solo carrying capacity, but because the interaction term itself grows with the product A·B, pushing β toward r drives runaway growth with no finite equilibrium — a real, textbook instability of unsaturated mutualism models, not a simulation glitch, which is why populations are hard-clamped at 1.6×K here.
- Commensalism (+/0) — sA=+1, sB=0. Species A benefits from B's presence while B is statistically unaffected (e.g. an epiphyte on a tree).
- Parasitism (+/−, mild) — sA=+1, sB=−1 but the harm to B is damped (×0.35) and A's own growth is capped, modelling a parasite that drains its host without normally killing it outright, unlike a predator.
The equations are integrated with a clamped explicit Euler step (dt capped so the model can't blow up on a slow frame), and each population is rendered as a swarm of drifting circular markers — marker count tracks A and B directly, so the visual density is the population. Drag to pan the arena and scroll/pinch to zoom.