Harnesses for retreating and the winter

All 176 published cases now parse and run. Retreating passes 18 of 18,
building 7 of 7, civil disorder 13 of 13; movement is unchanged at 133 of
139.

The retreat and winter engine code was written before these cases and mostly
held up, but civil disorder was wrong in a way playing would never have shown.

It measured distance to a power's *home* centres. The rule is distance to the
centres it owns -- a Russia driven out of Moscow and holding Sweden measures
from Sweden -- so every power that had lost a home centre was disbanding the
wrong unit.

And it measured over the graph each unit moves on, which is wrong in both
directions. An army counts sea provinces it would have to be convoyed across,
so Albania is two steps from Naples rather than unreachable. A fleet counts
inland provinces it could never enter, so the Baltic is two from Warsaw. That
reads as nonsense until you notice what is being measured: not how the unit
would get home, but how far out of the way it is. A fleet in the Baltic is
still in the middle of Russia's business; one in the North Atlantic is not.

Civil disorder also only applies to the shortfall. A power that disbanded one
of the two it owed has half answered, and the automatic rule picks from what
is left rather than from what it started with.
This commit is contained in:
2026-09-09 06:41:28 -07:00
parent 9a12b46bd1
commit 38f69e9aa6
6 changed files with 2354 additions and 513 deletions
+14 -5
View File
@@ -86,11 +86,20 @@ the Baltic and made Denmark worthless.
`tools/datc.py` turns the Diplomacy Adjudicator Test Cases into
`src/game/datc.json` -- the orders and their annotated outcomes, not the
document's prose, which is Lucas Kruijswijk's writing. **133 of 136 movement
cases pass.** They are the reason this adjudicator is worth trusting: they
found that orders were never validated, that the paradox rule did not
terminate, and that five of my own hand-written cases rested on a support
Paris cannot give.
document's prose, which is Lucas Kruijswijk's writing. Every one of the 176
published cases is parsed and run.
| Section | | Passing |
| --- | --- | --- |
| 6.A - 6.G | movement | 133 / 139 |
| 6.H | retreating | 18 / 18 |
| 6.I | building | 7 / 7 |
| 6.J | civil disorder | 13 / 13 |
They are the reason this adjudicator is worth trusting: they found that
orders were never validated, that the paradox rule did not terminate, that
civil disorder was measuring the wrong distance, and that five of my own
hand-written cases rested on a support Paris cannot give.
Three cases are excluded rather than failed. 6.A.6, 6.B.10 and 6.B.11 state
their setup in prose -- "Germany has a fleet in London" -- and the fixture is