babylon.engine.systems.vitality
VitalitySystem - The Drain, The Attrition, and The Reaper.
ADR032: Materialist Causality System Order Mass Line Refactor Phase 3: Coverage Ratio Threshold Model
This system runs FIRST in the materialist causality chain, implementing: 1. Phase 1 - The Drain: Population-scaled subsistence burn
cost = (base_subsistence * population) * subsistence_multiplier
Phase 2 - Grinding Attrition: Coverage ratio threshold mortality
Phase 3 - The Reaper: Full extinction check (population=0 → active=False)
- Historical Materialist Principle:
Life requires material sustenance. Living costs wealth. No wealth = no life. Elites with higher subsistence multipliers burn faster when cut off from imperial rent flows - modeling the “Principal Contradiction” where bourgeoisie depends on extraction to maintain their standard of living.
- Mass Line Principle (Phase 3 Coverage Ratio Formula):
One agent = one demographic block. High inequality within a block means you need MORE coverage to prevent deaths:
coverage_ratio = wealth_per_capita / subsistence_needs threshold = 1.0 + inequality deficit = max(0, threshold - coverage_ratio) attrition_rate = clamp(deficit × (0.5 + inequality), 0, 1) deaths = floor(population × attrition_rate)
- Malthusian Correction:
When deaths occur, population decreases → per-capita wealth increases → future mortality decreases → equilibrium. Wealth is NOT reduced when people die (the poor die with 0 wealth).
Classes
Mass Line Phase 3: The Drain + Grinding Attrition + The Reaper. |
- class babylon.engine.systems.vitality.VitalitySystem[source]
Bases:
objectMass Line Phase 3: The Drain + Grinding Attrition + The Reaper.
Three-phase vitality check for all active entities:
- Phase 1 - The Drain (Population-Scaled Subsistence Burn):
cost = (base_subsistence × population) × subsistence_multiplier wealth = max(0, wealth - cost)
- Phase 2 - Grinding Attrition (Coverage Ratio Threshold Mortality):
Uses calculate_mortality_rate() from formulas.vitality: - coverage_ratio = wealth_per_capita / subsistence_needs - threshold = 1.0 + inequality - deficit = max(0, threshold - coverage_ratio) - attrition_rate = clamp(deficit × (0.5 + inequality), 0, 1) - Reduce population, emit POPULATION_ATTRITION event
- Phase 3 - The Reaper (Extinction Check):
If population = 0 OR (population = 1 AND wealth < consumption_needs): - Mark entity as inactive - Emit ENTITY_DEATH event
- Events:
- POPULATION_ATTRITION: Coverage deficit deaths from inequality.
payload: {entity_id, deaths, remaining_population, attrition_rate}
- ENTITY_DEATH: Full extinction of a demographic block.
payload: {entity_id, wealth, consumption_needs, cause, tick}