Ecology: Three-Species Food Chain
This scenario simulates a simple food chain with three populations (two prey species and one predator). It helps explain how adding one extra layer of interaction can create more complex dynamics than predator–prey alone.
What you’re simulating
- Two prey populations compete indirectly because they share a predator.
- The predator’s success depends on the combined availability of prey.
- Small parameter changes can shift the system between stable coexistence, predator collapse, or prey dominance.
Run it (web UI)
- Open Examples
- Choose Ecology → Three‑Species Food Chain
- Click Run
Run it (local SimUI)
From the B‑Simulant library repo:
pip install "bsim[ui]"
python examples/ecology_simui_demo.py --mode three-species --port 8765Open http://localhost:8765/ui/.
What results to expect
- Population over time: you may see multi-phase patterns (one prey rises while the other falls).
- Regime changes: after some time, the system can move into a different “rhythm”.
Parameter presets (and what they mean)
| Goal | Steps | dt | Expected result | What it means |
|---|---|---|---|---|
| Quick preview | 800 | 0.1 | Early dynamics; one species may “win” briefly. | Short runs can be misleading in multi‑species systems. |
| Standard run | 3,000 | 0.1 | Richer patterns than predator–prey; possible multi‑cycle behavior. | Extra interactions add degrees of freedom → less predictable trajectories. |
| Longer horizon | 15,000 | 0.1 | Possible regime shifts (a different rhythm later). | “Long-run” behavior matters: coexistence vs domination vs collapse. |
| Smoother curves | 7,500 | 0.05 | Similar patterns, smoother plots. | Smaller dt helps reduce numerical noise when multiple processes interact. |
What to try (and why)
- Increase Steps to see whether the system settles or keeps shifting.
- Compare against Predator–Prey: note how “extra degrees of freedom” change predictability.
If the UI provides environment controls (like temperature/seasonality), treat them like “external pressure” and watch which population becomes dominant and whether coexistence remains possible.