A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.
docs(determinism): five passages brought in line with the code (Fixes #2755) (#2802)
Beria1ca69cc95f6
diff --git a/docs/determinism.md b/docs/determinism.mdindex 73ca83858..786e01cbc 100644--- a/docs/determinism.md+++ b/docs/determinism.md@@ -56,7 +56,7 @@ with `GoldenRun.Seed = 1948` on the real `content/`, then steps with `GoldenRun.(or the game ends, or 1000 turns pass). Since the GDD cutover (Phase 2 PR 1) the orders are the reference player's(`Statecraft.Sim.Reference.ReferencePlayer`, decision D-A7): a stated test policy, not game AI and not history. It sends`HistoricalAI`'s orders and leaves the jobs to each city's default (R-CITY-009), then trains one halutz group when there is none and none in training,-while the turn's Attention and the Treasury last. No game mode or UI reaches it (`ReferencePlayerTests`); every copy of the+while the turn's Attention lasts (training borrows, so the Treasury does not hold it back). No game mode or UI reaches it (`ReferencePlayerTests`); every copy of thegolden loop (the writer preview, the invariants, the era goldens) takes its orders from `GoldenRun.Orders`. The real gameplays the GDD loop on monthly turns from 15 May 1948 and ends on 15 January 1952 after 44 turns (R-LOOP-004). Each run'sfinal `GameState.Hash()` is pinned:@@ -91,8 +91,8 @@ uv run tools/web_check.py unity/Builds/Web-<compression> --query "golden&smoke=5`smoke-orders` (GDD Phase 5 PR 15, #754) is the same kind of browser run for the unit orders (`?smoke-orders`, desktop`-smoke-orders`: the golden seed, one turn). It hides the turn's event card (the events go to their ministers), clicks thehex of the unit `GoldenRun.SmokeMove` names (the lowest-id unit `Movement.Reachable` has a hex for: unit 0, Golani, on-10,9), presses the unit card's Move button, clicks the first lit hex in `Reachable`'s (q, r) order that is no enemy-held-place (7,11; it skips Nazareth's 7,10, so the run captures nothing) and presses End Turn:+11,11, its first anchor in `content/map/unit_anchor_hexes.yaml`), presses the unit card's Move button, clicks the first lit hex in `Reachable`'s (q, r) order that is no enemy-held+place (8,12, no place, so the run captures nothing) and presses End Turn:`SMOKE ORDERS OK 1948-06-15 08d9800eda4462ef165cc7ea6285fad059c030c0f87ad563e35c9789cc352d78`.`GoldenRun.PlaySmokeOrders` plays the same turn with that one `Move`, so the value is in the manifest (`SliceSmokeTests.TheSmokeOrdersRunMovesOneUnitAndEndsOnTheGolden`) and the player's golden checkprints it as `GOLDEN OK smoke-orders`. Re-record it when the sim or the order path on the card changes; the fortify, hold and@@ -131,9 +131,9 @@ them from a seed (default 1948) in Historical mode until `until:`, and `Scenarioscripted command passes. A command the sim rejects fails the test with the date, the order and the reason, and a step that never runsfails too. To add one: write the file, run `STATECRAFT_UPDATE_GOLDEN=1 dotnet test sim/Statecraft.sln --filter ScenarioTests` (it adds themanifest line and the snapshot), then run the tests plain. A scenario that moves is re-pinned with the hash goldens by the same-command; its snapshot diff in the PR shows what moved, and the commit message says why. All four play the real content.+command; its snapshot diff in the PR shows what moved, and the commit message says why. All six play the real content.`cautious` and `reckless` run through March 1949, setting rationing on the first turn after its office opens; `mvp-absorb-first` (GDD Phase 1-PR 3) fills Tel Aviv's jobs on the first turn and completes the absorb objective on 15 January 1950; `mvp-defeat` (GDD Phase 7 PR 5) overspends and+PR 3) sets Tel Aviv's workers to 90 of its 106 job slots on the first turn (all are filled at the start), freeing 158 civilians for that turn's halutz training, and completes the absorb objective on 15 January 1950; `mvp-defeat` (GDD Phase 7 PR 5) overspends andturns down every source of foreign currency until Money and Food run out, and ends in `defeat_economy` (R-END-002).**MVP goldens after the cutover.** The real game is the GDD game, so every golden above is an MVP golden. Each PR that@@ -163,10 +163,9 @@ current runs; the design document and the maintainers decide which ranges matter**Rules per era.** A system reads `Content.RulesAt(date)`, where `date` is the date of the state the turn starts from (`s.Date`before the step); `AttentionSystem.Refill` runs after the date moves, so it fills the next turn from that turn's era. Rules-change only at era boundaries (chapters spec section 3.3). Spec section 4.1 will end the turn that reaches a boundary exactly-on it, so every turn then lies in one era; until that lands, only the last era's end is a boundary turn, and a turn that-starts in one era and ends in the next uses the starting era's rules for its whole length-(`EraRulesSwitchTests.ARunPicksUpTheOverrideFromTheFirstTurnThatStartsInTheNewEra`). Start+change only at era boundaries (chapters spec section 3.3). Spec section 4.1 ends the turn that reaches a boundary exactly+on it: `Simulation.TurnEnd` cuts each turn at the next era's start or the game's end, whichever comes first, so every+turn lies in one era (`sim/Statecraft.Sim/Simulation.cs`). Startvalues (`start`, `treasury_start`, `fx_start`, `start_rung`, `initial_population`, `budget_start`, `budget_owners`) are read once by `NewGame`from the base `rules.yaml`: an era override cannot set them. A map action's display name is also read from the base rules,because an override cannot remove an action. `EraRulesSwitchTests.OnlyStartValuesAndMapActionNamesReadTheBaseRulesDirectly`