And here’s the start of teaching the model to play Risk… Notice how I can question the models data structure decisions and get it to make refinements to how its organizing information:
Supported actions:
- updateMemory update=`<new memory>`
Examples:
<examples>
Memory:
x=1
y=2
answer=
Human: x+y
AI: updateMemory update=`x=1\ny=2\nanswer=3`
Memory:
x=1
y=2
answer=3
Human: y-x
AI: updateMemory update=`x=1\ny=2\nanswer=1`
Memory:
x=1
y=2
answer=1
Human: x=7 and y=2 then y*x
AI: updateMemory update=`x=7\ny=2\nanswer=14`
Memory:
x=7
y=2
answer=14
</examples>
Human: lets play a game of risk. Update your memory with the variables needed to play the game.
AI: updateMemory update=`player1=\nplayer2=\nplayer3=\nplayer4=\nplayer5=\ncurrentTurn=1\nterritories=\narmies=\ncards=\n`
Human: what is each variable for?
AI: player1-player5 are the names of the players in the game; currentTurn is the player whose turn it is; territories is a list of the territories on the board; armies is a list of the armies on the board; and cards is a list of the cards held by each player.
Human: add territories for the standard risk board
AI: updateMemory update=`player1=\nplayer2=\nplayer3=\nplayer4=\nplayer5=\ncurrentTurn=1\nterritories=Alaska, Alberta, Central America, Eastern United States, Greenland, Northwest Territory, Ontario, Quebec, Western United States, Argentina, Brazil, Venezuela, Great Britain, Iceland, Northern Europe, Scandinavia, Southern Europe, Ukraine, Afghanistan, China, India, Irkutsk, Japan, Kamchatka, Middle East, Mongolia, Siam, Siberia, Ural, Yakutsk\narmies=\ncards=\n`
Human: how will you know whos armies are where?
AI: updateMemory update=`player1=\nplayer2=\nplayer3=\nplayer4=\nplayer5=\ncurrentTurn=1\nterritories=Alaska, Alberta, Central America, Eastern United States, Greenland, Northwest Territory, Ontario, Quebec, Western United States, Argentina, Brazil, Venezuela, Great Britain, Iceland, Northern Europe, Scandinavia, Southern Europe, Ukraine, Afghanistan, China, India, Irkutsk, Japan, Kamchatka, Middle East, Mongolia, Siam, Siberia, Ural, Yakutsk\narmies={Alaska: player1, Alberta: player2, Central America: player3, Eastern United States: player4, Greenland: player5, Northwest Territory: player1, Ontario: player2, Quebec: player3, Western United States: player4, Argentina: player5, Brazil: player1, Venezuela: player2, Great Britain: player3, Iceland: player4, Northern Europe: player5, Scandinavia: player1, Southern Europe: player2, Ukraine: player3, Afghanistan: player4, China: player5, India: player1, Irkutsk: player2, Japan: player3, Kamchatka: player4, Middle East: player5, Mongolia: player1, Siam: player2, Siberia: player3, Ural: player4, Yakutsk: player5}\ncards=\n`
Human: how will you know how many armies a player has in each territory?
AI: updateMemory update=`player1=\nplayer2=\nplayer3=\nplayer4=\nplayer5=\ncurrentTurn=1\nterritories=Alaska, Alberta, Central America, Eastern United States, Greenland, Northwest Territory, Ontario, Quebec, Western United States, Argentina, Brazil, Venezuela, Great Britain, Iceland, Northern Europe, Scandinavia, Southern Europe, Ukraine, Afghanistan, China, India, Irkutsk, Japan, Kamchatka, Middle East, Mongolia, Siam, Siberia, Ural, Yakutsk\narmies={Alaska: player1: 3, Alberta: player2: 3, Central America: player3: 3, Eastern United States: player4: 3, Greenland: player5: 3, Northwest Territory: player1: 3, Ontario: player2: 3, Quebec: player3: 3, Western United States: player4: 3, Argentina: player5: 3, Brazil: player1: 3, Venezuela: player2: 3, Great Britain: player3: 3, Iceland: player4: 3, Northern Europe: player5: 3, Scandinavia: player1: 3, Southern Europe: player2: 3, Ukraine: player3: 3, Afghanistan: player4: 3, China: player5: 3, India: player1: 3, Irkutsk: player2: 3, Japan: player3: 3, Kamchatka: player4: 3, Middle East: player5: 3, Mongolia: player1: 3, Siam: player2: 3, Siberia: player3: 3, Ural: player4: 3, Yakutsk: player5: 3}\ncards=\n`
Human: if all the territories are listed under armies you don't really need the separate territories list
AI: updateMemory update=`player1=\nplayer2=\nplayer3=\nplayer4=\nplayer5=\ncurrentTurn=1\narmies={Alaska: player1: 3, Alberta: player2: 3, Central America: player3: 3, Eastern United States: player4: 3, Greenland: player5: 3, Northwest Territory: player1: 3, Ontario: player2: 3, Quebec: player3: 3, Western United States: player4: 3, Argentina: player5: 3, Brazil: player1: 3, Venezuela: player2: 3, Great Britain: player3: 3, Iceland: player4: 3, Northern Europe: player5: 3, Scandinavia: player1: 3, Southern Europe: player2: 3, Ukraine: player3: 3, Afghanistan: player4: 3, China: player5: 3, India: player1: 3, Irkutsk: player2: 3, Japan: player3: 3, Kamchatka: player4: 3, Middle East: player5: 3, Mongolia: player1: 3, Siam: player2: 3, Siberia: player3: 3, Ural: player4: 3, Yakutsk: player5: 3}\ncards=\n`
Human: great: how many total armies does each player currently have?
AI: Each player currently has 45 armies.
Human: what territories does player 1 have and how many armies on each?
AI: Player 1 has Alaska, Northwest Territory, Brazil, Mongolia, Siam, and Siberia with 3 armies on each territory.
Human: how many territories is that?
AI: Player 1 has 6 territories.
Human: so if they get 45 armies total and they currently have 6 territories each containing 3 armies. How many armies do they have left to place?
AI: Player 1 has 27 armies left to place.
Human: add that to your memory and calculate remaining players for each player updateMemory update=`player1=27\nplayer2=45\nplayer3=45\nplayer4=45\nplayer5=45\ncurrentTurn=1\narmies={Alaska: player1: 3, Alberta: player2: 3, Central America: player3: 3, Eastern United States: player4: 3, Greenland: player5: 3, Northwest Territory: player1: 3, Ontario: player2: 3, Quebec: player3: 3, Western United States: player4: 3, Argentina: player5: 3, Brazil: player1: 3, Venezuela: player2: 3, Great Britain: player3: 3, Iceland: player4: 3, Northern Europe: player5: 3, Scandinavia: player1: 3, Southern Europe: player2: 3, Ukraine: player3: 3, Afghanistan: player4: 3, China: player5: 3, India: player1: 3, Irkutsk: player2: 3, Japan: player3: 3, Kamchatka: player4: 3, Middle East: player5: 3, Mongolia: player1: 3, Siam: player2: 3, Siberia: player3: 3, Ural: player4: 3, Yakutsk: player5: 3}\ncards=\n`