Branching world state, checkpoints, and diff-based progression — deterministic forking of simulation timelines.
Ananke's world evolution system lets a host branch, checkpoint, and replay deterministic world states — think of it as git for simulated history. Because every tick is deterministic (same seed + same commands → same output), any saved checkpoint can be restored and re-simulated from that point forward, producing identical results every time.
Key concepts:
createSession(config), stepped with stepSession(session, commands).serializeSession(session). Stored by the host as a named point in the branch tree (e.g. "cp-100"). Can be restored with deserializeSession(snapshot).forkSession(session). The fork shares the same seed and history up to the branch point but diverges from there. Use this for "what-if" alternate histories.Typical host workflow: maintain a checkpoint at each major narrative event → on player choice, fork from the relevant checkpoint → run both branches → expose branch outcomes to the player or AI director → prune abandoned branches to save memory.
World evolution is the mechanism by which a host branches, checkpoints, and replays deterministic world states. Ananke provides the forking primitives; the host manages the branch graph. Because all state is deterministic, any checkpoint can be restored and re-simulated from that point.
Tier 2 — experimental World-level branching API is not yet in the stable contract. Track STABLE_API.md for promotion.
Illustrative branch graph. A real host would generate this from checkpoint metadata.
State deltas between cp-100 (main) and alt-diplomacy tick 180. Real diffs are produced by diffing two serialized session envelopes.
createSession(config) and step it to a stable state — this is your genesis point.const snap = serializeSession(session). Store this as a named checkpoint.const branch = forkSession(session). Apply divergent commands to the branch.