Three things a power can offer, because these are the three that change a
turn: support for a named move on a named turn, a demilitarised province, and
peace. All concrete, all about a particular turn, all checkable by
arithmetic against the orders actually submitted. A game where the machine
decides by feel whether you kept your word is a game where being betrayed
feels arbitrary rather than infuriating.
Deals are judged on the orders given, never on how they turned out. A support
that was ordered and cut was still given; a move that bounced was still
attempted. Blaming a power for a bounce would make every alliance a lottery
and every honest ally look like a liar.
Contradictory promises are the mechanic rather than something to prevent.
Promising a province to one power and supporting another into it is a double
deal, and conflicts() exists so that a power can be shown it has promised two
things it cannot both do -- at the moment of agreeing, deliberately.
Peace covers the centres a power owns as well as the provinces it occupies.
Walking into an undefended centre and calling it peace because nobody was
home is the first thing anybody tries. A test asserted the wrong thing here
and the comment above the code was promising more than the code did; the code
now does what it said.
Trust is directional and fades. A stranger starts above halfway, because a
game where every stranger is a proven liar never gets started, and an old
betrayal loses weight without leaving the ledger, so a broken alliance can
re-form out of need.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.