babylon.models.config

Simulation configuration for the Babylon engine.

SimulationConfig holds all global coefficients and parameters used by the formulas in babylon.systems.formulas. This model provides: - Type-safe validation of all parameters - Sensible defaults matching ai-docs/game-loop-architecture.yaml - Immutability during simulation runs - JSON serialization for save/load

Sprint 3: Phase 2 game loop configuration.

Classes

SimulationConfig(**data)

Global configuration for the simulation engine.

class babylon.models.config.SimulationConfig(**data)[source]

Bases: BaseModel

Global configuration for the simulation engine.

All formula coefficients and world parameters are stored here. The config is immutable (frozen) to ensure determinism during simulation runs.

Parameters:
extraction_efficiency

Alpha (α) in imperial rent formula. Controls how efficiently the core extracts value from periphery. Range: [0, 1], Default: 0.8

consciousness_sensitivity

k in consciousness drift formula. Controls how quickly consciousness responds to material conditions. Range: [0, 1], Default: 0.5

subsistence_threshold

Poverty line for acquiescence calculation. Below this wealth level, survival through compliance becomes impossible. Range: [0, inf), Default: 0.3

survival_steepness

Controls sigmoid sharpness in acquiescence probability. Higher values mean sharper transition around subsistence threshold. Range: (0, inf), Default: 10.0

repression_level

State capacity for violence. Reduces revolution probability in P(S|R) = cohesion / repression. Range: [0, 1], Default: 0.5

initial_worker_wealth

Starting wealth for periphery worker entities. Range: [0, inf), Default: 0.5

initial_owner_wealth

Starting wealth for core owner entities. Range: [0, inf), Default: 0.5

loss_aversion_lambda

Kahneman-Tversky loss aversion coefficient. Humans feel losses ~2.25x more strongly than equivalent gains. Range: (0, inf), Default: 2.25

model_config: ClassVar[ConfigDict] = {'frozen': True}

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

extraction_efficiency: Annotated[float]
consciousness_sensitivity: Annotated[float]
consciousness_decay_lambda: Annotated[float]
subsistence_threshold: Annotated[float]
survival_steepness: Annotated[float]
repression_level: Annotated[float]
initial_worker_wealth: Annotated[float]
initial_owner_wealth: Annotated[float]
loss_aversion_lambda: Annotated[float]
tension_accumulation_rate: Annotated[float]
comprador_cut: Annotated[float]
super_wage_rate: Annotated[float]
subsidy_conversion_rate: Annotated[float]
subsidy_trigger_threshold: Annotated[float]
solidarity_activation_threshold: Annotated[float]
mass_awakening_threshold: Annotated[float]
heat_decay_rate: Annotated[float]
high_profile_heat_gain: Annotated[float]
eviction_heat_threshold: Annotated[float]
rent_spike_multiplier: Annotated[float]
displacement_rate: Annotated[float]
heat_spillover_rate: Annotated[float]
clarity_profile_coefficient: Annotated[float]
initial_rent_pool: Annotated[float]
pool_high_threshold: Annotated[float]
pool_low_threshold: Annotated[float]
pool_critical_threshold: Annotated[float]
min_wage_rate: Annotated[float]
max_wage_rate: Annotated[float]
superwage_multiplier: float
superwage_ppp_impact: Annotated[float]
concentration_camp_decay_rate: Annotated[float]
displacement_priority_mode: DisplacementPriorityMode
elimination_rent_threshold: Annotated[float]
elimination_tension_threshold: Annotated[float]
containment_rent_threshold: Annotated[float]
containment_tension_threshold: Annotated[float]