Commit Graph
11 Commits
Author SHA1 Message Date
jcoffey-dev f88482f8cc Order entry
Clicks on the board, because that is where the question is. Select a unit,
pick a verb, and the provinces the next click will accept light up. Nobody
writes a move the rules were never going to allow, and nobody has to learn a
notation to find that out.

What is offered comes from the rules rather than from the map, which is the
same split the map is built on: a fleet on the north coast of Spain is drawn
identically to one on the south coast and can go to entirely different
places. A support is only offered where both units could have gone, since you
cannot support a move you could not have made yourself, and a fleet is only
asked which coast it means when more than one is reachable.

Orders are drawn where they are given -- an arrow to the destination, a
dashed line to what a support is holding up, a ring round a unit staying put
-- and written out beside the board in the rules' own words, because an arrow
cannot tell you that the support you meant for Vienna is going to Budapest.
The written list runs through the validator on every keystroke, so an order
the rules will not take is struck through while it is being written rather
than after the turn.
2026-09-09 08:16:40 -07:00
jcoffey-dev dbf4b9dea4 Use the published board instead of drawing a worse one
Three attempts at drawing this map came to nothing worth looking at. Dividing
the plane by nearest province gives a tidy board that looks nothing like
Europe. Drawing the adjacency graph gives something unimpeachable about the
rules and not a map at all -- circles joined by lines. Fifty-six polygons
placed by eye gives fifty-six islands.

The standard map published with the diplomacy engine is AGPL-3.0, the same
licence as this project, so it can be carried across whole with attribution
rather than approximated badly. tools/map.py extracts the outlines, the unit
coordinates and the layer transform into board.json and can be re-run against
a newer copy. NOTICE.md says where it came from and what is still ours, which
is every colour and every mark drawn on top.

Drawing Europe accurately is real work, somebody did it properly, and they
published it under a licence that invites exactly this. Three days of my
approximating it would have produced something worse than the thing that
already existed.

Clicking still answers with the rules rather than the picture: a shape cannot
say that a fleet on Spain's north coast may not enter the Gulf of Lyon while
one on the south coast may, because both coasts are the same shape.
2026-09-09 08:10:30 -07:00
jcoffey-dev fd05217f90 Territories, not circles
The board is regions again. Voronoi cells divide it with no gaps and no
overlaps and look like a board, which is what this was always supposed to be.

What they cannot do is reproduce every adjacency in the rules, because
provinces interleave -- the Adriatic borders Venice with Trieste between
their centres. The lesson I drew from that was to abandon regions and draw
the adjacency graph, which is unimpeachable and is not a map. It is circles
joined by lines.

The right answer is to stop asking the picture to carry the rules. Clicking a
province lights up exactly where its unit may legally go, taken from the
graph rather than from which shapes happen to share an edge. Vienna lights
Bohemia, Galicia, Budapest, Trieste and Tyrolia; a fleet on the north coast
of Spain does not light the Gulf of Lyon. The picture is a picture and the
rules answer for themselves when asked.
2026-09-09 07:50:40 -07:00
jcoffey-dev ad6e384956 The board, drawn
Coordinates placed by hand, roughly where each province falls in Europe, and
everything else drawn from those and from the adjacency rules. Nothing here
is a picture of anybody's board.

It draws the graph rather than regions, and that was not the first idea. The
first idea was Voronoi cells -- every point belonging to the nearest province
-- which makes a handsome cut-paper board and is wrong. Sixty-five pairs that
border each other in the rules came out with regions that did not touch, and
no amount of moving coordinates fixes it: provinces here interleave. The
Adriatic borders Venice with Trieste between their centres; the Atlantic
borders North Africa around the outside of Spain. Convex cells cannot say
that. A map that shows two regions meeting when the rules say otherwise is
worse than an ugly map -- it is a map that loses you the game.

The tests found three provinces drawn on top of each other and a distance
check of mine that was measuring Europe rather than checking my typing: it
failed fifteen honest placings because oceans are large and Moscow borders
five things. The exact check is that a line exists for every border in the
rules and for no others.

The viewBox is fitted to what is actually drawn. Europe is not rectangular,
and the box the coordinates were typed into left a third of the frame as
empty ocean -- which wastes the one thing this game was given more of than
the others.
2026-09-09 07:46:22 -07:00
jcoffey-dev efbecf6425 Bots that open the conversation
A bot that only answers is not negotiating, it is a form to fill in. propose()
works from the plan the power has already made: what it wants this turn, where
that will not work alone, and who could make it work. Help taking something
defended first, then a quiet border over ground neither of them owns, then
peace when a neighbour is over your centres and your ambitions are elsewhere.
Three a turn at most, or six powers talking at once is a mailstorm.

Each overture carries what the power says, so it reaches a human as a message
rather than as a form.

A power will offer a quiet border to somebody it is attacking somewhere else,
and that is on purpose. Marching on French Belgium while suggesting both
sides leave Burgundy alone is not a lie and not incoherent -- a promise about
Burgundy is a promise about Burgundy, and it will be kept to the letter by
somebody robbing you at the same moment. A test asserted the opposite and the
test was wrong: refusing that offer would be playing a politer game than this
one. Asking the power you are attacking to help you, or offering it peace
while your orders say otherwise, are different things and are both refused.

Nothing here promises any of it will be kept. Whether the power still wants
the deal when orders are due is settled in settleUp, and the answer is
sometimes no.
2026-09-09 07:30:59 -07:00
jcoffey-dev 16d047ea81 The bots
A position is worth its centres, and almost nothing else: units are how you
get them and are worth nothing in themselves. Every other term is a small
correction on that one fact.

Orders are a greedy plan taken in order of what is worth most, with a second
unit put behind the first when the prize is worth two units -- a bot that
never doubles up is not playing this game. Agreements are applied after the
plan rather than as a constraint on it, on purpose: the plan has to know what
it is giving up before it can decide whether the promise is worth keeping.

Three things the tests taught it. It garrisons a threatened centre it is
already standing on, because scoring only moves had it defending Berlin by
marching the Munich garrison there. It never shoves at its own countryman,
which has no strength and wastes two units. And the price of breaking a
promise is how far it trusts the partner, not how far the partner trusts it
-- the other way round gives a power that has been lied to four times a high
cost of retaliating, because it has been scrupulous and is still well thought
of, which is exactly backwards.

Every decision comes back as a sentence. When a power turns on you it says
what the province was worth and what it thought you were worth, because being
betrayed should be infuriating rather than mysterious.
2026-09-09 07:09:38 -07:00
jcoffey-dev 38f69e9aa6 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.
2026-09-09 06:41:28 -07:00
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 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