Reference
Technical reference documentation for the Babylon simulation engine.
Simulation Protocols
GUI-facing protocols (SimulationState, SimulationControl) and snapshot
models (TerritoryState, HexState, SimulationSnapshot). These define
the stable interface boundary for GUI development.
Data Models
Complete specification of data structures, entity collections, constrained types, graph structure, the Marxian value tensor (ValueTensor4x3), tensor registry and hydration pipeline, and the Gatekeeper Pattern for quantization.
Mathematical Formulas
All simulation formulas: imperial rent, survival calculus, consciousness drift, solidarity transmission, dynamic balance, class wealth dynamics ODEs, the economics pipeline (capital stock, MELT, throughput, visibility, class dynamics), and Capital Volume I production dynamics.
Organization Base Model (Feature 031)
Institution Base Model (Feature 040)
Entity models (Institution, InternalBalanceOfForces, ReproductionMechanism, SpawningBlueprint, InstitutionOrgRelation), three event types, four pure functions (structural selectivity, balance dynamics, OODA effects, community embeddedness), five enums, graph integration, and InstitutionDefines configuration.
OODA Loop System (Feature 032)
Entity models (StateApparatus, Business, PoliticalFaction, CivilSocietyOrg), discriminated union dispatch, composition calculators, consciousness effect formula, topology classification, key figure analysis, and legacy migration.
Simulation Systems
API reference for the simulation systems, the community hypergraph layer (Feature 022), the D-P-D’ lifecycle circuit (Feature 030), the Capital Volume II circulation layer (Feature 023), and demographics mechanics including the Mass Line population block paradigm.
Persistence Layer (Feature 037)
Protocols (RuntimePersistence, VectorStoreProtocol, TraceCollector),
concrete implementations (PostgresRuntime, RuntimeDatabase,
PgVectorStore, TraceRecorder), database schema, and the
PersistenceObserver lifecycle hook.
Economic Data Sources
Empirical data sources for Marxian analysis:
Census ACS: Labor aristocracy identification, rent burden, class composition
FRED: CPI, wages, unemployment, fiscal indicators, PPP metrics
QCEW: Employment/wages by county, state, and metro area with hybrid API/file loading
Tensor Hierarchy (Feature 025)
Multi-level tensor hierarchy data dictionary: all nine tensor types and protocols, the six new SQLite tables, BEA Input-Output data format and loader API, BTS FAF5 freight data format and loader API, and the complete BEA-to-Marxian-department industry classification mapping.
Event System
Complete reference for the typed event system: 11 EventTypes, 13 event classes, event lifecycle, factory methods, and the Interceptor pattern for adversarial mechanics.
Configuration
Configuration system documentation, environment variables, GameDefines parameter tables, and the 20-Year Entropy Standard for parameter tuning.
State Apparatus AI (Feature 039)
Entity models (FactionBalance, StateBudget, StateAction, LegalFramework, AttentionThread, SparrowAnalysis), enums (StateFaction, StateActionType, ThreadPhase, SurveillanceMethod), decision engine (RuleBasedStateAI), effect resolution (territory, CO-OPT, REPRESS, ADMINISTER, LEGISLATE), attention/intelligence modules, formulas, and 65+ configuration parameters.
Topology System
Percolation theory metrics, TopologyMonitor observer, resilience testing, and the dialectical field topology framework (contradiction fields, derivatives, curvature, edge mode state machine).
Infrastructure Topology (Feature 036)
Terrain classification, typed infrastructure on H3 mesh edges, biocapacity extraction, nonlocal edges, internet consciousness field operations, and configuration parameters.
Design System
Visual design tokens: color palette, typography, styling constants, and texture specifications for Bunker Constructivism aesthetic.
Documentation System
Build commands, Sphinx extensions, LaTeX configuration, and PDF theme specifications. Meta-reference for the documentation engine itself.
AI & RAG
Prompt templates, API usage patterns, and context window management API.
Error Handling
Error code taxonomy and error handling conventions.
CI/CD Workflow
GitHub Actions workflows, branch protection rules, and the Benevolent Dictator governance model.