babylon.models.config
Run-scoped configuration for the Babylon engine.
SimulationConfig carries per-run settings that are not game-balance
coefficients. Historically it also declared every formula coefficient, but
those fields were dead: the engine reads all tunable coefficients from
GameDefines (via services.defines.*), the
canonical single source of truth. The ~36 shadow coefficient fields were
removed in the src/ simplification sweep (2026-07) — they had zero logic
readers, and their values had drifted out of sync with the live GameDefines
values (e.g. comprador_cut read 0.15 here vs the live 0.90 in
GameDefines.economy), making them an active source of confusion.
Only the deterministic RNG seed remains: the web bridge threads it from the
GameSession and serializes it into the persisted config_json blob, so
it is a genuine run-scoped setting rather than a coefficient shadow.
See also
GameDefines: canonical coefficient sourceand the moddable single source of truth (
src/babylon/data/defines.yaml).
Classes
|
Immutable per-run settings for the simulation engine. |
- class babylon.models.config.SimulationConfig(**data)[source]
Bases:
BaseModelImmutable per-run settings for the simulation engine.
Game-balance coefficients live in
GameDefines(read viaservices.defines); this model only carries run-scoped settings that are not part of the moddable coefficient surface. The config is frozen to preserve determinism during a run.- Parameters:
rng_seed (int)
- rng_seed
Per-run RNG seed for byte-identical action replays (Constitution III.7). Threaded from the
GameSessionby the web bridge and serialized into the persisted run configuration.
- model_config: ClassVar[ConfigDict] = {'frozen': True}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].