The Tao of Gaming

Clever little bastards


Based on MJWills comment to a recent post, I downloaded the Puerto Rico Evolver from the geek [link to main PR page].

And you know what, I have a shockingly bad win percentage against them. Well below my normal win percentage. However, after about eight plays, I can see the implicit collusion. Evolution means adapting to your environment and the other creatures matter. [Also, the critters tend to have a very different style of mistakes]. If you took one of these babies and placed it in a game with four humans, I expect it would get crushed easily (even without any collusion). However, these tend to play to each other strengths. They do make some boneheaded plays (one time the computer took builder and passed). But they've got a reasonable amount of game going, and it was interesting experience. Things that the computer believes:

  • Take the harbor at the first opportunity. Even without an income source.
  • Build the small indigo and sugar plants if you've got nothing else to do.
  • Build a large building ASAP.
You could do worse than follow those.

Update: I can't really analyze the program, I've never played with Excel as a programming environment. I'd need Visual Basic or some such. The code is on BGG, and I could probably read it easily enough, but I'm lazy right now. Here's what I deduce (from background knowledge and the spreadsheet).

The 'genes' are decision making trees, and each gene answers a different "What do I do now?" question. Which building do I build, which plantation do I take, where do I place my people, which role do I take? The genes have some access to the game information. Whenever they have to make a decision, the genes provide the answer. [Judging from the length of the genes, I wager they rate each option and then the highest value is selected]. The real trick is that the 'organisms' play lots of games and are rated for fitness. The lowest rated are deleted, and the rest make copies (presumably the higher rated ones get more copies). I'm not sure how the copies are created (asexual duplicates or sexual mixtures). I imagine there's some random mutation tossed into the mix.

What's most impressive (to me) is just how crude the genes are. The basically only answer the above questions, and one other — "What stage of the game is it?" The stage question leads them to different genes for other selection (so their role selection changes based on early/mid/late game). Some simple genetic expression, I think. These buggers play a credible game for something so simple.

The organism are apparently specialized to their seat choice. (Player 1 Genes are different from player 2 genes), and specialized to a five player game.

Lou (mail):
Wow. I completely don't understand all of the analysis, or even what the heck the 'evolutionary' aspect of the spreadsheet is...but damn, its impressive. I got tromped my one and only game. Please provide more analysis.

Lou
9.4.2005 12:26pm
mjwills:
One thing to note is that the AI is 'custom made' for a certain number of players (I think with the original download its 4 or 5). So you need to copy the spreadsheet and 'regenerate' the AI if you are playing with a different number of players (3 players, particularly).

The computer makes bone headed moves early - in round 1, Mayor is often taken by Player 2, and on occasion players will take Prospector in Round 1 before the Builder. Trades generally occur much earlier than you would expect in an experienced face to face game...

As you say though, the AI loves the Harbor (but then, so do many experienced humans). It will do whatever it takes to get it. Learning to adapt to that strategy (and lets face it, it isn't a bad strategy) is good (although from some player positions its very difficult)
9.4.2005 7:22pm
Iain (mail) (www):
I am really impressed by the spreadsheet. I had no idea Excel was so powerful.

I will have to give it a game...
9.5.2005 5:13am
mjwills:
Its not really that Excel is powerful. Its more that it comes with its own development environment and language (VBA) which is quite powerful. You could have done much the same thing in Word, Access etc (although the ability to reference cells would make it easier in Excel)
9.7.2005 12:54am