The turn loop, and two bugs it found
Spring orders, retreats, autumn orders, retreats, then the winter -- the only phase that changes who owns anything. Everybody talks before the orders: computer powers approach each other, answer on the merits, and what they agree binds that turn and is judged at the end of it on the orders that were given rather than on how the turn came out. The loop has no interface attached on purpose. A whole game can be played out in a test, which is the only way to ask the question that matters about the bots -- not whether an order looks sensible but whether seven powers left alone get anywhere. Asking it found two things nothing else would have. Every bot was submitting orders for all twenty-two units on the board rather than its own three. The validator fills in a hold for every unit, which is right for adjudication and wrong as an answer to what one power does this turn; it only showed up when seven powers were asked at once. And fifteen of nineteen units held in Spring 1901, when in this game every unit moves. An empty province was priced by asking what the unit standing in it could reach -- and there is no unit standing in it -- so every empty non-centre scored zero and every move to one was skipped as worthless. It is sixteen of nineteen now. What the loop still does not do is finish. Played to 2149 the board is alive and nobody has soloed: the powers take the neutrals and then hold each other off. Taking a defended centre needs two units on it and the bots do not reliably arrange that. That is the next piece of work and the test says so rather than pretending otherwise.
This commit is contained in:
@@ -197,6 +197,31 @@ words, because an arrow cannot tell you that the support you meant for Vienna
|
||||
is being given to Budapest. Anything the rules will not take is struck
|
||||
through in the list as it is written, rather than after the turn.
|
||||
|
||||
## The turn
|
||||
|
||||
`src/game/game.ts` is the loop, and it has no interface attached on purpose:
|
||||
a whole game can be played out in a test from the opening to whatever end it
|
||||
finds. That is the only way to answer the question that actually matters
|
||||
about the bots -- not whether each order looks sensible, but whether seven
|
||||
powers left alone reach a conclusion.
|
||||
|
||||
Spring orders, retreats, autumn orders, retreats, then the winter, which is
|
||||
the only phase that changes who owns anything.
|
||||
|
||||
Before the orders, everybody talks. Computer powers approach each other,
|
||||
answer on the merits, and what they agree binds that turn and is judged at
|
||||
the end of it. Approaches to the human are handed back rather than answered
|
||||
for them.
|
||||
|
||||
**What it does not do yet is finish.** Played out to 2149 the board is alive
|
||||
and nobody has soloed: the powers take the neutrals in the first few years
|
||||
and then hold each other off indefinitely. Taking a defended centre needs two
|
||||
units on it, and the bots do not reliably arrange that even with deals being
|
||||
struck every turn. That is the next piece of work and it is a fact about the
|
||||
bots, not the loop, so the test says what the loop guarantees and no more.
|
||||
|
||||
## Still to build
|
||||
|
||||
- the map, the orders, the music, the battle sound, the four endings
|
||||
- bots that can actually finish a game: coordinated attacks on defended centres
|
||||
- the press in front of the player, rather than only between the bots
|
||||
- the music, the battle sound, the four endings
|
||||
|
||||
Reference in New Issue
Block a user