Commit Graph
10 Commits
Author SHA1 Message Date
jcoffey-dev 9a12b46bd1 Write down the six that do not pass
A known deviation nobody has written down is a bug waiting to be
rediscovered, and a red mark nobody can explain is worse than a red mark with
a reason next to it.
2026-09-09 06:24:14 -07:00
jcoffey-dev 44f75ebb5a 133 of 136 movement cases
Four more rules, each one found by a case rather than by reasoning:

A support may name a coast, and if it names one it has to be the right one.
A fleet cannot convoy and support at the same time, so a support for a move
that can only go by water is impossible when every route runs through the
supporting fleet -- 6.D.31 calls that an impossibility for complex reasons
and it is a fair description. A move over water is only an order if fleets
have actually been ordered to carry it: Yorkshire to Holland with nobody in
the North Sea is impossible in this position however possible it is in
another. And moving to the province you are already in is not a move, with
or without a convoy under it.

The intent rule also settled something I had assumed the other way. Ordering
your own fleet to convoy is how a power says it is going by sea, and that is
the same signal that lets two units swap places instead of bouncing -- so it
commits the army. Sinking the escort strands it rather than sending it
walking overland. One of my own cases asserted the opposite and was wrong.

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
built from order lines, so it cannot carry a unit nobody ordered.

Six remain, and they are listed in the README rather than left to be
rediscovered.
2026-09-09 06:24:00 -07:00
jcoffey-dev 6c388f5bc4 Convoy intent, coasts in support, and what a disrupted convoy is
122 of 139 movement cases now.

Intent, which decides whether two units swapping bounce or sail past each
other: an army goes by convoy if it was ordered to, or if its own power gave
a legal convoy order for that move. Somebody else's fleets offering a route
is not intent however good the route, and your own fleet offering from a sea
it could never do it from is not intent either, because that was not an
order. Once intent exists any ordered route may carry it, foreign or not.

A convoy order is only an order if water could actually carry that army past
that fleet, which is a question about the map and is now asked.

Support is given to a province, not to a coast of one: a fleet in Marseilles
may support an attack on the north coast of Spain although it could never
sail there. And a support is only as legal as the move underneath it.

Two bugs of my own. Convoy routing could not start from or arrive at a
province with two coasts, because the fleet graph has no bare entry for one
-- there is no 'bul', only 'bul/ec' and 'bul/sc' -- so an army boarding in
Bulgaria found no sea and stayed home. And I had read 'disrupted' as the
escort being sunk when it means the army not arriving; in Pandin's Paradox
the fleet survives and the army still does not get there.
2026-09-09 06:19:45 -07:00
jcoffey-dev c27e4cad81 Fix five hand-written cases built on an impossible order
Paris does not border Munich, so it can never support an attack on it. Five
of my own cases were built on that support and the new validation pass
refused it -- and three of them had been passing for the wrong reason, which
is worse than failing.

Every one of them now uses a supporter that could actually have made the move
it is supporting. The Portugal case takes its support off the Mid-Atlantic,
since Spain is the only land province that touches Portugal at all -- which
is also why a unit dislodged there has nowhere to go.
2026-09-09 06:13:34 -07:00
jcoffey-dev b41cf1c210 Run the published test cases, and fix what they found
tools/datc.py turns the Diplomacy Adjudicator Test Cases into a fixture: the
orders and their annotated outcomes, not the document's prose. 139 movement
cases run; 107 pass.

Three real faults so far, none of which the hand-written cases had caught:

Orders were never validated. An illegal order has to be refused and the unit
left holding -- still standing there, still in everybody's way -- and a fleet
told to go to Spain has to be told which coast when both are reachable.
There is now a validation pass, and ordering another country's unit is
refused without disturbing the order its owner actually gave.

The paradox rule did not terminate. Settling only what was already in the
dependency cycle resolves nothing in a real paradox, so the resolver asked
the same question forever -- Pandin's Paradox was a stack overflow rather
than an answer. It now restarts the whole resolution with the convoyed army
held still, which is inelegant and provably finite: each restart forces one
more army to stand, and there are only so many armies.

A held army kept its path. Szykman's rule stops the army; it has to stop the
army's weight too, or the paradox re-forms on the next pass and the restart
never converges.
2026-09-09 00:36:39 -07:00
jcoffey-dev 601b961c88 Retreats and the winter
Movement is the part everybody thinks about and it is not the part that
decides the game. A beaten unit that finds somewhere to stand is a nuisance
for years; one that does not is gone. And the winter is where a good spring
turns into a bigger army, or does not.

Four things are closed to a retreat: anywhere unreachable, anywhere occupied,
the province the attacker came from, and any province two units bounced out
of -- that last is the one people forget, since a bounce leaves a province
empty and closed rather than empty and open. The exception is an attacker who
arrived by convoy: it never marched through the ground between, so there is
nothing to stop the loser falling back that way. Two units retreating to the
same province destroy each other, there being no support in this phase and
nothing to break the tie with.

Ownership changes only in the autumn and only by standing on a centre. A
centre you walked through in the spring is not yours; one you walked away
from stays yours until somebody else stands on it, which is why a power with
no units can still hold centres.

Civil disorder removes what is furthest from home, fleets first, then
alphabetically -- arbitrary in the last step on purpose, so that two
adjudicators never disagree about a game nobody is playing.
2026-09-09 00:27:07 -07:00
jcoffey-dev ec3b5143c7 The adjudicator
Kruijswijk's resolver: work each order out from the others, and when that
turns out to be circular -- which it genuinely can be, this game has real
paradoxes in it -- guess, check whether both guesses agree, and fall back to
a stated rule when they do not. A ring of units all moving into each other
all move. A convoy paradox is settled by Szykman's rule, which is a
convention rather than a deduction and is written down as one.

Four strengths do the work: attack, hold, defend and prevent. A move has to
beat the right one of them strictly, so an unsupported attack never takes a
supported province and a tie is always a bounce.

Worth noting what falls out rather than being written down. A unit cannot
drive out a countryman, so a move against one has attack strength zero, so it
cuts no support -- which is why a power cannot cut its own support. That is a
consequence of Calhamer's rule, not a separate one, and the comment says so
where the zero is returned.

Twenty-one cases, all written out in full so a reader can check them by hand.
2026-09-09 00:24:14 -07:00
jcoffey-dev f4d60235ea Four endings, not two
A game of this ends in a solo, an elimination, a draw, or somebody else's
solo, and none of those is a win or a loss in the shape the other games on
this site use. The draw is the one that matters: it is the usual outcome and
it is neither, so it cannot borrow either tune.
2026-09-09 00:20:54 -07:00
jcoffey-dev f92330b552 Units, orders, and finding the water under an army
Convoy routing is breadth-first over the fleets actually ordered to convoy
this army, so it returns the shortest chain and answers null rather than
guessing. It takes a set of fleets to treat as already gone, which is what
the adjudicator will need to ask whether a convoy survives being attacked.

The tests found a wrong assumption of mine rather than a wrong line of code:
taking the Channel out of a London to Brest convoy leaves no route at all.
The North Sea does not touch the Mid-Atlantic on this board -- the long way
round is over the top through the Norwegian Sea -- so the Channel is the
whole western sea route.
2026-09-09 00:20:18 -07:00
jcoffey-dev c5cd0a6351 The board, and what this game is going to be
Seventy-five provinces as two graphs, because an army and a fleet do not move
on the same one, and three provinces whose two coasts do not connect.

The topology is a fact about a published game and free to use; the artwork is
not, and there is none here -- the map will be generated from this data the
way the cave game's dodecahedron is. The name is a working one for the same
reason the starship game is not called what you expect.

The tests check the board against itself, and symmetry is the one that pays:
it found the Skagerrak wired to the Baltic, which would have opened a back
door into the Baltic and made Denmark worth nothing.
2026-09-09 00:13:30 -07:00