Commit Graph
3 Commits
Author SHA1 Message Date
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 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