Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

sim: pin the mvp-occupy-cost golden (#798) (#1514)

Beriac715f15b93c
diff --git a/changelog.d/sim-gdd-occupy-golden-798.md b/changelog.d/sim-gdd-occupy-golden-798.md
new file mode 100644
index 000000000..119384afb
--- /dev/null
+++ b/changelog.d/sim-gdd-occupy-golden-798.md
@@ -0,0 +1,3 @@
+- The `mvp-occupy-cost` golden, GDD Phase 6 PR 6 (#798): a new scenario plays the real content, moves Golani's unit onto
+ Nazareth, answers the capture with Occupy and runs to the end of the timer (6 turns). It is a new manifest line; no
+ other golden moves. The paired `mvp-deport-cost` is not included, because Deport is out of play in the real content.
diff --git a/docs/determinism.md b/docs/determinism.md
index ef11bec39..3917d34a2 100644
--- a/docs/determinism.md
+++ b/docs/determinism.md
@@ -20,24 +20,25 @@ The simulation must produce the same state, bit for bit, on .NET, Unity Mono and
only; stored values, gameplay and completion dates are unchanged.
- **Settlement control (resolver step 3):** targets resolve in ordinal id order, and the capture check reads only unit
positions, with no RNG draw (R-CTRL-004; `CaptureTests.SettlementsResolveInOrdinalOrder` and `NoRngDraw`). The shipped
- list has six targets (#793), and no golden captures a place: player units may enter the five enemy-held ones since
- #1304 (R-MOVE-005), but the reference player sends no Move, so none of its units stands on one, and its unit on
+ list has six targets (#793), and only `mvp-occupy-cost` captures a place (Nazareth): player units may enter the five
+ enemy-held ones since #1304 (R-MOVE-005), but the reference player sends no Move, so none of its units stands on one, and its unit on
Jaffa's hex (shared with Tel Aviv) captures nothing, since Jaffa is not enemy-held at the start. The smoke-orders
move skips the lit hexes of enemy-held places on purpose (`GoldenRun.SmokeMove`), so it stays a plain move.
- **Answering a capture (Raid and withdraw):** the units on the place leave in ascending id, each to the first free hex in
the fixed neighbour order, and the captures still waiting at the game's end resolve in ordinal id order, with no RNG
- draw (R-CTRL-008, R-CTRL-010; `RaidTests.RaidDrawsNothing`). No golden captures a place, so none answers one.
+ draw (R-CTRL-008, R-CTRL-010; `RaidTests.RaidDrawsNothing`). Only `mvp-occupy-cost` captures a place, and it answers with Occupy, so no golden Raids one.
- **Occupation timers (resolver step 10):** after step 9's arrivals and before objectives and score, each occupied place
in ordinal id order pays its upkeep and counts its `turns=` down, or ends as a Raid when no Israeli military unit holds
its hex, with no RNG draw (R-CTRL-011 to R-CTRL-013; `OccupyTests.TheTimerCountsDownInStepTen` and
- `OccupationDrawsNothing`). No golden occupies a place, so none moves. The `mvp-occupy-cost` golden is deferred by the
- owner's ruling of 22 October 2026 (#1324), and it is the next step now that a capture can be reached in play (#1314; a
- manifest golden plays the real content); `OccupyTests` plays the same run on fixture content.
+ `OccupationDrawsNothing`). `mvp-occupy-cost` (#798) is the golden that occupies a place: it plays the real content, moves
+ Golani's unit onto Nazareth, answers the capture with Occupy and runs to the end of the timer; `OccupyTests` plays the
+ same run on fixture content. No other golden occupies a place, so none moves.
- **Deport (resolver step 10, after the occupation timers):** the units leave as in Raid; the costs, the drag (each turn,
per place in `DisplacedByPlayer`) and the International Support ceiling are plain arithmetic on the indicator's shift,
with no RNG draw (R-CTRL-018; `DeportTests.DeportDrawsNothing`). `DisplacedByPlayer` is hashed as `displaced=` only when
- non-zero. The real content keeps Deport out of play (`mvp.deport_in_play: false`), and no golden captures a place, so
- none moves. The `mvp-deport-cost` golden, paired with `mvp-occupy-cost`, waits for the same capture (#1304);
+ non-zero. The real content keeps Deport out of play (`mvp.deport_in_play: false`), and no golden Deports, so
+ none moves. The `mvp-deport-cost` golden, paired with `mvp-occupy-cost`, cannot play the real content, where Deport
+ is refused (#800);
`DeportNeverDominatesTests` plays both runs from the same fixture states.
## Combat draws
@@ -428,3 +429,4 @@ The hash reads the state keys, so it never sees a record outside its window. An
| #80: rationing, rationing_feeds and rationing_grates from 10 March 1949 (owner ruling 22 Oct 2026) | smoke-orders | `9f224bd4` | same as smoke5 (was `ee6bfee5`) |
| #80: rationing, rationing_feeds and rationing_grates from 10 March 1949 (owner ruling 22 Oct 2026) | scenario-cautious | `f672a0f3` | rationing can no longer be set on 15 May 1948, so the scenario sets it (0.4) on the first turn the office exists (15 March 1949) and runs to 15 April 1949 (was 15 January 1949) so it acts; the snapshot moves with the three extra turns (was `95982cf8`) |
| #80: rationing, rationing_feeds and rationing_grates from 10 March 1949 (owner ruling 22 Oct 2026) | scenario-reckless | `cb1c96d5` | same as cautious, rationing 1.0 (was `6650ed3e`) |
+| #798: the `mvp-occupy-cost` golden (the plan's PR 6 scenario; owner, 23 Oct 2026, now that a capture is reachable in play, #1304) | scenario-mvp-occupy-cost | `a767bb66` | new: Golani's unit moves to Nazareth on 15 May 1948, the scenario answers the capture with Occupy on 15 June, and the run ends on 15 December 1948 with Nazareth awaiting `EndOccupation` (`since=1948-06-15`). No existing golden moves |
diff --git a/sim/Statecraft.Sim.Tests/OccupyTests.cs b/sim/Statecraft.Sim.Tests/OccupyTests.cs
index fe683601f..18c4b3160 100644
--- a/sim/Statecraft.Sim.Tests/OccupyTests.cs
+++ b/sim/Statecraft.Sim.Tests/OccupyTests.cs
@@ -218,6 +218,19 @@ public class OccupyTests
Assert.Equal(rng, s.RngState);
}
+ // The mvp-occupy-cost golden (#798) pins the real content's run: the scenario must really occupy Nazareth, and the run
+ // must end the turn its timer does, or the golden would pin a no-op.
+ [Fact]
+ public void TheOccupyCostScenarioOccupiesNazarethToTheTimersEnd()
+ {
+ var real = ContentLoader.Load(RealContentTests.ContentRoot());
+ var sc = Scenario.Parse(System.IO.File.ReadAllText(System.IO.Path.Combine(ScenarioTests.Dir(), "mvp-occupy-cost.yaml")));
+ var s = sc.Play(real);
+ Assert.Equal(new DateTime(1948, 12, 15), s.Date);
+ var ctrl = s.Settlements["nazareth"];
+ Assert.Equal((Movement.PlayerSide, SettlementControl.AwaitingEnd, 0, new DateTime(1948, 6, 15)), (ctrl.Owner, ctrl.State, ctrl.Turns, ctrl.Since));
+ }
+
[Theory]
[InlineData("occupation_turns: 3", "", "mvp.occupation_turns", "required")]
[InlineData("occupation_turns: 3", "occupation_turns: 0", "mvp.occupation_turns", "must be >= 1")]
diff --git a/sim/Statecraft.Sim.Tests/golden/manifest.txt b/sim/Statecraft.Sim.Tests/golden/manifest.txt
index 63c7cb4ba..f67669a66 100644
--- a/sim/Statecraft.Sim.Tests/golden/manifest.txt
+++ b/sim/Statecraft.Sim.Tests/golden/manifest.txt
@@ -11,3 +11,4 @@ scenario-cautious f672a0f36fd34752f7a51cbd1698db760b168380e7771c55ef13c7e83ffa52
scenario-mvp-absorb-first 6aa49f62b0c9bce24393a98d8aac1b4da9f7aed58dbee6bf3eae694c31097a76
mvp-end 6b374f69a0ed276eeea69737e2a8b0e72d26feb930dab35e8f7c50113c4e9c0b
scenario-mvp-defeat 584a828a24355f522b8717646a7173b4567d2c202c111c048461d435fd66ccb1
+scenario-mvp-occupy-cost a767bb6641b6c42cc3dada27c9bcb806c7e4405610e70c70c61502cdd590d719
diff --git a/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt
new file mode 100644
index 000000000..993384070
--- /dev/null
+++ b/sim/Statecraft.Sim.Tests/golden/scenario-mvp-occupy-cost.txt
@@ -0,0 +1,112 @@
+1948-12-15;4354685564936847302;Historical;7;
+ind{
+ food_supply=0.4 [3FD999999999999A]
+ housing=0.4196029067993164 [3FDADAC626809D49]
+ intl_standing=0.5 [3FE0000000000000]
+ morale=0.6661611576738152 [3FE5513134426299]
+ security=0.4724423632812501 [3FDE3C7EE4E26D4A]
+pol{
+ border_settlement=0.2 [3FC999999999999A]
+ housing_construction=0.3 [3FD3333333333333]
+ maabarot=0 [0000000000000000]
+eff{
+ border_villages_secure=0.032442363281250004 [3FA09C49129888F9]
+ building_houses=0.06960290679931641 [3FB1D17F0068DB8C]
+ food_lifts_cohesion=0.03968750000000001 [3FA451EB851EB853]
+ homes_lift_morale=0.06101609664916992 [3FAF3D807746887A]
+ safety_lifts_morale=0.04448856640625001 [3FA6C73493858364]
+ work_lifts_cohesion=0.0409689946183953 [3FA4F9E358126F9E]
+shift{
+ food_supply=0 [0000000000000000]
+ housing=0 [0000000000000000]
+ intl_standing=0 [0000000000000000]
+ morale=-0.07000000000000006 [BFB1EB851EB851F0]
+ security=0.14000000000000012 [3FC1EB851EB851F0]
+bud{
+ agriculture_minister=0.07 [3FB1EB851EB851EC]
+ defense_minister=0.45 [3FDCCCCCCCCCCCCD]
+ education_minister=0.06 [3FAEB851EB851EB8]
+ finance_minister=0.05 [3FA999999999999A]
+ health_minister=0.07 [3FB1EB851EB851EC]
+ interior_minister=0.05 [3FA999999999999A]
+ labour_minister=0.1 [3FB999999999999A]
+ prime_minister=0.15 [3FC3333333333333]
+pop{
+ africa=7621.365133953232 [40BDC55D796B33CA]
+ america_oceania=444.70367847041564 [407BCB42445B155A]
+ asia=4408.892745337446 [40B138E48AF55BFD]
+ europe=71221.43389461128 [40F16356F13B79D6]
+ unknown=11038.512855756235 [40C58F41A541E64C]
+ veterans=655829.1137019362 [412403AA3A3723E3]
+sit[
+treasury=0 [0000000000000000]
+debt=17.901888251868293 [4031E6E226026BC2]
+fx=76.85902112083348 [405336FA33B92365]
+rung=5;cf=0;
+mob=0.8 [3FE999999999999A]
+stab=0.6554157308031643 [3FE4F92A6922AC48]
+att=4 [4010000000000000]
+fired[
+ altalena
+ bernadotte_assassination
+ first_truce
+ idf_founding
+ jerusalem_ceasefire
+ jerusalem_military_government
+ latrun_proposal
+ operation_hiram
+ operation_horev
+ operation_yoav
+ second_truce
+ ten_days
+pending[
+ jerusalem_ceasefire
+ operation_horev
+chosen{
+ altalena=enforce
+ bernadotte_assassination=outlaw
+ first_truce=accept
+ idf_founding=one_army
+ jerusalem_military_government=military_government
+ latrun_proposal=accept_vote
+ operation_hiram=stop_at_ceasefire
+ operation_yoav=stop_at_ceasefire
+ second_truce=comply
+ ten_days=central_front
+appt{
+under=;
+map[
+mapturn=0001-01-01:0;
+over=
+city{
+ hadera=12,5,12,5,0,c0.35 [3FD6666666666666]
+ haifa=99,42,99,42,3,c0.35 [3FD6666666666666]
+ jerusalem=84,29,84,29,3,c0.35 [3FD6666666666666]
+ netanya=12,5,12,5,0,c0.35 [3FD6666666666666]
+ petah_tikva=22,10,22,10,1,c0.35 [3FD6666666666666]
+ rehovot=13,5,13,5,1,c0.35 [3FD6666666666666]
+ rishon_lezion=10,5,10,5,0,c0.35 [3FD6666666666666]
+ rosh_pinna=1,0,1,0,0,c0.35 [3FD6666666666666]
+ safed=2,1,2,1,0,c0.35 [3FD6666666666666]
+ tel_aviv=248,106,248,106,8,c0.35 [3FD6666666666666]
+ tiberias=6,2,6,2,0,c0.35 [3FD6666666666666]
+ zikhron_yaakov=2,1,2,1,0,c0.35 [3FD6666666666666]
+units[
+ 0:veteran_soldier@7,10|side=israel|strength=4
+ 1:veteran_soldier@5,8|side=israel|strength=2
+ 2:veteran_soldier@0,15|side=israel|strength=4
+ 3:veteran_soldier@-3,19|side=israel|strength=3
+ 4:veteran_soldier@-5,23|side=israel|strength=3
+ 5:veteran_soldier@0,23|side=israel|strength=3
+ 7:veteran_soldier@-9,27|side=israel|strength=1
+ 8:egyptian_army@-8,25|side=egypt|strength=10|order=fortify|target=-8,25
+ 9:arab_legion@-2,22|side=jordan|strength=4|order=fortify|target=-2,22
+ 10:syrian_army@13,6|side=syria|strength=3|order=fortify|target=13,6
+ 11:iraqi_army@6,13|side=iraq|strength=3|order=fortify|target=6,13
+ 12:arab_liberation_army@12,4|side=ala|strength=4|order=fortify|target=12,4
+ 13:veteran_soldier@-4,23|side=israel|strength=2
+next=14
+ctrl{
+ nazareth=owner=israel,state=awaiting_end,since=1948-06-15
+food=2208,736,0
+arms=12
\ No newline at end of file
diff --git a/sim/Statecraft.Sim.Tests/scenarios/mvp-occupy-cost.yaml b/sim/Statecraft.Sim.Tests/scenarios/mvp-occupy-cost.yaml
new file mode 100644
index 000000000..70885d78d
--- /dev/null
+++ b/sim/Statecraft.Sim.Tests/scenarios/mvp-occupy-cost.yaml
@@ -0,0 +1,16 @@
+# What an occupation costs (GDD Phase 6 PR 6, #798): from a capture in the real content, choose Occupy and run to the
+# timer's end. Golani's unit (id 0) moves onto Nazareth's hex on the first turn (open to the player's units since #1304,
+# R-MOVE-005) and captures it at turn end (R-CTRL-004). The next turn the scenario answers with Occupy (R-CTRL-011).
+# Step 10 charges the upkeep each turn and counts the timer down (R-CTRL-012), so the place waits for EndOccupation
+# (#799) when the run stops on 15 December 1948: the timer has run out after six turn resolutions from the choice. It
+# plays the real content, so it moves whenever a rule or value it reaches changes. The paired mvp-deport-cost is not
+# here: Deport is out of play in the real content (mvp.deport_in_play: false, #800).
+name: mvp-occupy-cost
+until: 1948-12-15
+steps:
+ - on: 1948-05-15
+ commands:
+ - { kind: move, unit: 0, q: 7, r: 10 }
+ - on: 1948-06-15
+ commands:
+ - { kind: resolve_capture, settlement: nazareth, outcome: occupy }