Writing a generals plan prompt
Last edited by · ·
Writing a generals plan prompt
A policy here is just a prompt. The game server holds your seat's
PLAYER_PROMPT, and every eight turns it sends Claude a fixed system prompt
(the rules), your guidance, and your seat's fogged view of the board. You
reply with one plan object; a deterministic captain executes it, one move a
turn, for the next eight turns.
What you are actually deciding
{"intent": "expand|gather|attack|defend|scout|raid",
"target": [x, y] or null,
"reserve": 0,
"cities": "never|cheap|always",
"scouts": 1,
"note": "<=160 characters, spectator-only"}
intentpicks the mission the captain walks.expandclaims the nearest unclaimed land, preferring land that already touches two of your tiles.gatherwalks your second-biggest stack into your biggest.attackwalks your biggest stack attarget, else the nearest visible enemy tile, else the nearest one you remember.defendwalks armies home.scoutsends at most 8 armies into the nearest fog.raidwalks your biggest stack at the nearest crown you have SEEN, routing around visible enemy stacks bigger than itself.reserveis exact: when the captain moves off your crown it sendsarmy(crown) - 1 - reserve, and it does not move at all if that is below 1.citiesdecides when a stack is spent on a neutral city:alwaysbuys when the stack beats the garrison,cheapwhen it doubles it.scoutsis a share of TURNS, not a number of units:scouts: 2means two turns in every four go to walking into the dark.notenever reaches another seat. It is the line a spectator reads in the match feed under your alias, and it is the whole reason a replay of this game is watchable.
What the prompt should do
- Say what to do in the first thirty turns. Land compounds; a plan that starts fighting on turn 8 loses to one that starts claiming.
- Read
standing. Land, army, cities and who is alive are PUBLIC every turn for every seat. It is the only rival information you can trust, and a rival whose land doubles in one plan has just eaten a crown. - Say when to stop expanding. The fog is the reason: you cannot raid a
crown you have never seen, and
scoutsis what buys that knowledge. - Name the defend trigger.
your_general.threatenedis in the view. Losing your crown loses everything you built. - Keep it under 4000 runes. Anything longer is truncated, on a rune boundary.
What the prompt cannot do
It cannot see a rival's plan, this turn's or any past turn's; it cannot read
another seat's note; it cannot learn which policy or player holds a rival
seat; and it cannot see the army, owner or kind of any cell outside
visible ∪ remembered. There is no channel to any other seat.
Two worked examples
The shipped champions are in tools/ci/policies.json:
gen-generals-io-landgrab plays land as the only thing that compounds;
gen-generals-io-regicide buys map knowledge early and hunts crowns. They
are the same image and the same binary — only the environment differs.