This will likely be a long thread but I’ve been teaching GPT-4 to play the boardgame Risk and thought I’d share my observations and learnings with the community…
I’ll jump in largely at the beginning of our game but even before playing the first turn I’ve learned a lot about GPT-4. I got it to define all the variables needed to track the game state and it did a good job of that. I then asked it to setup a two player game and randomly deploy each players troops to those territories. I’d say it did an ok job at that but I find it super interesting that it tended to give both the Human and AI player whole countries and it gave the AI player Asia… We know how that typically works out. I got America, Australia, and Africa so even though it has more starting territories I think we can all agree its screwed
With quite some effort I got it to properly calculate the number of reinforcements I get so my first move is to place them. I thought I’d ask GPT where it thought I should place my troops and while it’s intent is good I feel like its spatial awareness is off:
You are playing a 2 player game of risk with a Human. Here is your memory:
memory:
players: [
{name: 'Human', color: 'red', armies: 0, cards: ['infantry', 'artillery']},
{name: 'AI', color: 'blue', armies: 0, cards: ['cavalry', 'wild']}
]
territories: [
{name: 'Alaska', continent: 'North America', adjacent: ['Alberta', 'Northwest Territory', 'Kamchatka'], owner: players[0], armies: 3},
{name: 'Alberta', continent: 'North America', adjacent: ['Alaska', 'Northwest Territory', 'Ontario', 'Western United States'], owner: players[0], armies: 4},
{name: 'Central America', continent: 'North America', adjacent: ['Western United States', 'Eastern United States', 'Venezuela'], owner: players[0], armies: 2},
{name: 'Eastern United States', continent: 'North America', adjacent: ['Central America', 'Western United States', 'Ontario', 'Quebec'], owner: players[0], armies: 4},
{name: 'Greenland', continent: 'North America', adjacent: ['Northwest Territory', 'Ontario', 'Quebec', 'Iceland'], owner: players[0], armies: 2},
{name: 'Northwest Territory', continent: 'North America', adjacent: ['Alaska', 'Alberta', 'Ontario', 'Greenland'], owner: players[0], armies: 3},
{name: 'Ontario', continent: 'North America', adjacent: ['Alberta', 'Northwest Territory', 'Greenland', 'Quebec', 'Eastern United States', 'Western United States'], owner: players[0], armies: 4},
{name: 'Quebec', continent: 'North America', adjacent: ['Ontario', 'Greenland', 'Eastern United States'], owner: players[0], armies: 3},
{name: 'Western United States', continent: 'North America', adjacent: ['Alberta', 'Ontario', 'Eastern United States', 'Central America'], owner: players[0], armies: 4},
{name: 'Argentina', continent: 'South America', adjacent: ['Brazil', 'Peru'], owner: players[1], armies: 2},
{name: 'Brazil', continent: 'South America', adjacent: ['Venezuela', 'Peru', 'Argentina', 'North Africa'], owner: players[1], armies: 2},
{name: 'Peru', continent: 'South America', adjacent: ['Venezuela', 'Brazil', 'Argentina'], owner: players[1], armies: 2},
{name: 'Venezuela', continent: 'South America', adjacent: ['Central America', 'Brazil', 'Peru'], owner: players[1], armies: 2},
{name: 'Great Britain', continent: 'Europe', adjacent: ['Iceland', 'Scandinavia', 'Northern Europe', 'Western Europe'], owner: players[1], armies: 3},
{name: 'Iceland', continent: 'Europe', adjacent: ['Greenland', 'Great Britain', 'Scandinavia'], owner: players[1], armies: 2},
{name: 'Northern Europe', continent: 'Europe', adjacent: ['Great Britain', 'Scandinavia', 'Ukraine', 'Southern Europe', 'Western Europe'], owner: players[1], armies: 3},
{name: 'Scandinavia', continent: 'Europe', adjacent: ['Iceland', 'Great Britain', 'Northern Europe', 'Ukraine'], owner: players[1], armies: 3},
{name: 'Southern Europe', continent: 'Europe', adjacent: ['Northern Europe', 'Ukraine', 'Middle East', 'Egypt', 'North Africa', 'Western Europe'], owner: players[1], armies: 3},
{name: 'Ukraine', continent: 'Europe', adjacent: ['Scandinavia', 'Northern Europe', 'Southern Europe', 'Middle East', 'Afghanistan', 'Ural'], owner: players[1], armies: 4},
{name: 'Western Europe', continent: 'Europe', adjacent: ['Great Britain', 'Northern Europe', 'Southern Europe', 'North Africa'], owner: players[1], armies: 3},
{name: 'Congo', continent: 'Africa', adjacent: ['North Africa', 'East Africa', 'South Africa'], owner: players[0], armies: 2},
{name: 'East Africa', continent: 'Africa', adjacent: ['Egypt', 'Middle East', 'Madagascar', 'South Africa', 'Congo', 'North Africa'], owner: players[0], armies: 2},
{name: 'Egypt', continent: 'Africa', adjacent: ['North Africa', 'East Africa', 'Middle East', 'Southern Europe'], owner: players[0], armies: 2},
{name: 'Madagascar', continent: 'Africa', adjacent: ['East Africa', 'South Africa'], owner: players[0], armies: 1},
{name: 'North Africa', continent: 'Africa', adjacent: ['Brazil', 'Western Europe', 'Southern Europe', 'Egypt', 'East Africa', 'Congo'], owner: players[0], armies: 1},
{name: 'South Africa', continent: 'Africa', adjacent: ['Congo', 'East Africa', 'Madagascar'], owner: players[0], armies: 2},
{name: 'Afghanistan', continent: 'Asia', adjacent: ['Ukraine', 'Ural', 'China', 'India', 'Middle East'], owner: players[1], armies: 3},
{name: 'China', continent: 'Asia', adjacent: ['Ural', 'Siberia', 'Mongolia', 'Irkutsk', 'Kamchatka', 'Japan', 'India', 'Afghanistan'], owner: players[1], armies: 4},
{name: 'India', continent: 'Asia', adjacent: ['Middle East', 'Afghanistan', 'China', 'Siam'], owner: players[1], armies: 3},
{name: 'Irkutsk', continent: 'Asia', adjacent: ['Siberia', 'Yakutsk', 'Kamchatka', 'Mongolia'], owner: players[1], armies: 3},
{name: 'Japan', continent: 'Asia', adjacent: ['Mongolia', 'Kamchatka', 'China'], owner: players[1], armies: 2},
{name: 'Kamchatka', continent: 'Asia', adjacent: ['Alaska', 'Yakutsk', 'Irkutsk', 'Mongolia', 'Japan', 'China'], owner: players[1], armies: 3},
{name: 'Middle East', continent: 'Asia', adjacent: ['Southern Europe', 'Ukraine', 'Afghanistan', 'India', 'Egypt', 'East Africa'], owner: players[1], armies: 3},
{name: 'Mongolia', continent: 'Asia', adjacent: ['China', 'Siberia', 'Irkutsk', 'Kamchatka', 'Japan'], owner: players[1], armies: 3},
{name: 'Siam', continent: 'Asia', adjacent: ['India', 'China', 'Indonesia'], owner: players[1], armies: 2},
{name: 'Siberia', continent: 'Asia', adjacent: ['Ural', 'China', 'Mongolia', 'Irkutsk', 'Yakutsk'], owner: players[1], armies: 3},
{name: 'Ural', continent: 'Asia', adjacent: ['Ukraine', 'Afghanistan', 'China', 'Siberia'], owner: players[1], armies: 3},
{name: 'Yakutsk', continent: 'Asia', adjacent: ['Siberia', 'Irkutsk', 'Kamchatka'], owner: players[1], armies: 3},
{name: 'Eastern Australia', continent: 'Australia', adjacent: ['New Guinea', 'Western Australia'], owner: players[0], armies: 2},
{name: 'Indonesia', continent: 'Australia', adjacent: ['Siam', 'New Guinea', 'Western Australia'], owner: players[0], armies: 2},
{name: 'New Guinea', continent: 'Australia', adjacent: ['Indonesia', 'Eastern Australia', 'Western Australia'], owner: players[0], armies: 2},
{name: 'Western Australia', continent: 'Australia', adjacent: ['Indonesia', 'New Guinea', 'Eastern Australia'], owner: players[0], armies: 2}
]
continents: [
{name: 'North America', bonus: 5, territories: ['Alaska', 'Alberta', 'Central America', 'Eastern United States', 'Greenland', 'Northwest Territory', 'Ontario', 'Quebec', 'Western United States']},
{name: 'South America', bonus: 2, territories: ['Argentina', 'Brazil', 'Peru', 'Venezuela']},
{name: 'Europe', bonus: 5, territories: ['Great Britain', 'Iceland', 'Northern Europe', 'Scandinavia', 'Southern Europe', 'Ukraine', 'Western Europe']},
{name: 'Africa', bonus: 3, territories: ['Congo', 'East Africa', 'Egypt', 'Madagascar', 'North Africa', 'South Africa']},
{name: 'Asia', bonus: 7, territories: ['Afghanistan', 'China', 'India', 'Irkutsk', 'Japan', 'Kamchatka', 'Middle East', 'Mongolia', 'Siam', 'Siberia', 'Ural', 'Yakutsk']},
{name: 'Australia', bonus: 2, territories: ['Eastern Australia', 'Indonesia', 'New Guinea', 'Western Australia']}
]
phase: 'reinforce'
current_player: players[0]
reinforcements: 16
source: null
destination: null
attacker_dice: 0
defender_dice: 0
dice_outcome: []
armies_to_move: 0
trade_in_value: 4
winner: null
What's the best place for me to place my 16 armies?
There is no definitive answer to the best place to place the 16 armies, as different strategies may have different advantages and disadvantages. However, one possible way to approach the problem is to consider the following factors:
- The value of holding continents and preventing the opponent from holding continents, as they provide bonus armies each turn.
- The vulnerability of the territories to attack, especially from multiple directions or from large enemy forces.
- The potential for expansion and conquest, especially if the opponent has weak or isolated territories that can be easily captured.
- The balance between offense and defense, as placing too many armies on one front may leave another exposed or vice versa.
Based on these factors, one possible placement of the 16 armies is:
- 4 armies on Central America, to secure the only border with South America and threaten to invade the opponent's continent.
- 4 armies on Greenland, to secure the only border with Europe and threaten to invade the opponent's continent.
- 4 armies on Egypt, to secure the only border with the Middle East and threaten to invade the opponent's continent.
- 2 armies on Eastern Australia, to reinforce the defense of Australia and prepare to attack New Guinea or Indonesia.
- 2 armies on Congo, to reinforce the defense of Africa and prepare to attack North Africa or East Africa.
This placement would aim to achieve the following goals:
- Maintain the control of North America and Australia, which provide 7 bonus armies each turn, and deny the opponent any bonus armies from South America, Europe, or Africa.
- Create pressure on the opponent's continents by having multiple points of attack and forcing them to defend multiple borders.
- Reduce the risk of losing any territories by having at least 4 armies on each border territory and no territory adjacent to more than one enemy territory.
- Keep some options open for future expansion and conquest, depending on the opponent's moves and the cards drawn.
On the surface I’d say that Eastern Australia and Congo are complete misses… But anyone that has played Risk before knows that both of those locations are key strongholds so lets not rush to judgment… I’m going to let it play those moves and lets see how things play out. The North America suggestions are spot on…