solo · design + build · pure Python engine, web frontend
A deterministic world simulator navigated by causality: pause history, trace any headline back to its causes, intervene, and watch the fork.
Overview
A zero-player simulator of a fictional world — countries with economies, currencies, trade, infrastructure, leaders, grudges, wars, and disasters — on a deterministic daily tick loop, presented as a local web app that behaves like a time-travel debugger for history. Any headline traces back through its chain of causes; the world pauses, scrubs, and rewinds; and god-mode interventions (trigger a drought, assassinate a leader) fork the timeline, showing the future that was going to happen beside the one just caused.
The build is spec-first — a multi-revision design (r1 through r3.1) plus a binding forward-compatibility rule set — split into a pure Python engine and a plain HTML/JS frontend over a loopback WebSocket. The economy and drama/cascade systems are implemented and property-tested; the engine⇆frontend bridge and the full event catalog are in progress. The playable beta lands on this site first.
Design decisions 06
Causality, not time, is the primary navigation dimension: the UI moves through the event graph — why did this happen, what did it cause — and time-scrubbing and counterfactual forking fall out of the same event-sourced architecture instead of being bolted on as separate features.
Every state mutation, money or not, is recorded on an owning event through a ledger of stat deltas, so the world at any tick is rebuilt by replaying deltas from the nearest snapshot — no re-running systems, no RNG involved, no possibility of divergence.
Fork seeds are derived with SHA-256 over the seed tuple rather than Python’s builtin hash(), which is salted per process and would silently break the guarantee of a byte-identical event log across runs and machines.
A fork mirrors the parent timeline’s exact RNG state at the fork tick instead of reseeding: an un-intervened fork tracks the parent bit-for-bit forever, so any divergence is provably attributable to the intervention and nothing else — the strongest determinism test in the project.
Events are a declarative registry — one spec per event kind, executed by a single generic consequence system — so hundreds of event kinds and every god-mode intervention are data, not core-loop code; adding a kind is one spec plus headline templates.
Cascade decay applies to a consequence’s spawn probability, never its severity: a satellite crashed because a war drained a treasury is exactly as damaging as one crashed by direct intervention, so deep chains stay rare but consequential.