4.6 KiB
| id | title | priority | status | scope | updated_at | evidence | blocked_by | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| g2-08 | Fauna population dynamics — confirm the existing LV engine ticks in the playable turn | p2 | partial | game1 | 2026-06-08 |
|
|
Progress (2026-06-06, worldsim increments 2–3b): the LV engine now ticks in the playable turn and persists.
tick_populations(→process_step) runs every played turn viaturn_manager.gd::next_player → EcologyState.tick;tile_populationsround-trips through the save (EcologyContinuationState/worldsim_state). Determinism + save-transparency proven (mc-worldsimtests; GUTtest_worldsim_playable_path5/5). mc-ecology 324/324. Visual: population spread 3→31 tiles over 12 played turns (worldsim_ecology_proofscreenshot). Outstanding (status stays partial): isolated trophic-cascade demonstration (bullet 3), population golden vector (bullet 5), in-game HUD overlay (bullet 6), andECOLOGY_BINDING.mddoc update (bullet 7).
Summary
Lotka-Volterra fauna population dynamics (habitat thresholds, carrying capacity, prey-driven growth/collapse, trophic cascade) already exist and are tested — the work is integration, persistence, determinism, and presentation.
- Engine:
mc-ecology/src/dynamics.rs:273 tick_populations(CPU; GPU path viagpu_bridge::gpu_tick_populations). - Already wired into the ecology step:
EcologySim::process_stepcallsdynamics::tick_populationsevery tick, with substeps, plus emergence / dispersal / fish-stock feedback (mc-ecology/src/engine.rs:276).WorldSim::stepalready callsprocess_step(mc-worldsim/src/lib.rs:161).
Species data is authored: every fauna carries habitat_min /
carrying_capacity, and 373/589 carry prey[] (e.g. grey_wolf.json:
habitat_min 0.2, carrying_capacity 0.15,
prey [moose, red_deer, musk_ox, european_rabbit, wild_boar]).
The gap is that this engine runs only at worldgen / in benches today; it
does not tick in the playable game turn. This objective lands once
mc-worldsim (p2-80) drives the step: confirm fauna populations
respond per played turn, persist, and are deterministic + visible.
Acceptance
- ◻ Fauna
tick_populationsruns each played turn viaWorldSim::step(p2-80) — populations grow toward carrying_capacity / collapse with prey, over played turns. - ◻ The engine's
tile_populationsside-structure persists throughmc-save(round-trip test);#[serde(default)]. - ◻ Trophic cascade observable in a played game: prey collapse → predator decline (lagged); reintroduction re-seeds from neighbour tiles (the Yellowstone path already modelled in the engine).
- ◻ Existing
cargo test -p mc-ecologyLV invariants hold. - ◻ Determinism: same
(seed, save)→ identical population trajectories across played turns (PCG64 +SeedDomain::WorldsimDynamics); golden vector. - ◻ Render: population state surfaced to the renderer / fauna overlay.
- ◻
ECOLOGY_BINDING.md"Population dynamics" section documents the playable-turn integration. - ◻
cargo testgreen, headless GUT green, proof-scene screenshot of a played-turn population trajectory reviewed.
Non-goals
- Building the LV engine — it exists (
mc-ecology). - Migration paths (
g2-10,apply_migrations— a sibling engine fn not yet in the per-turn step). - Disease / parasitism (not in schema).
Risks
- Save-format growth:
tile_populationsbecomes persisted live state;#[serde(default)], round-trip tested. (Shared withp2-80.) - Determinism: the GPU vs CPU tick paths must agree, and the stream must stay stable across the api-gdext bridge.
Dependencies
- Blocked-by:
p2-80(mc-worldsim drives the step),g2-07(flora lifecycle → habitat quality the LV engine reads). - Couples with:
g2-10(migration moves the populations this engine tracks).