Page 1 of 1

Main weaknesses of CPU Hard AI

PostPosted: Fri Jan 16, 2015 12:17 am
by durron597
Hi,

First of all, I must say that I am quite impressed with the level of play of the AI. It does many things right, and beats me more than I expected! After playing the CPU Hard a number of times and winning about 66% of the time (all three player games), I've noticed a few weaknesses. By the way, I haven't downloaded the spreadsheet yet, but I have quite a bit of experience with Excel programming so I may take a look at it after discussions on this forum.

Here are the things I noticed:

  • The AI doesn't factor in choosing Equipper in order to ensure big buildings are manned towards the end of the game.
  • If the game is about to be over, the AI usually plays lots of producer / shipper even if it helps another player more than it helps itself.
  • More generally, the AI is too willing to choose actions that help another player more than itself. For example, if I make rubber and the AI makes sugar, the AI will choose producer and get $100, allowing me, as the next turn's governor, get $200 (money on trader) + $100 (trader bonus) + $300 (rubber) = $600, whereas it only gets a measly $200 (or $300 if it has a market).
  • The AI needs to be better at deciding what to discard in the spoiling stage. Too often it will just keep it's most expensive stuff, even if it can't ship or sell that particular good the next time around.
  • The AI doesn't take farms offensively. By this I mean, I can build a Rubber storage with no associated farm, suspecting that someone else will play planter and take a quarry, leaving me a rubber farm (even if there's exactly one rubber farm available). Instead, it will take a banana or a sugar (often without the associated sugar mill), allowing me to make very early rubber.
  • Finally, the AI over prioritizes shipping cheap goods vs. expensive goods. While it does, at times, block boats with monopolized goods, more often it will just ship the cheap goods for equal points even if it can't sell the expensive goods (because the trader is blocked). For example, if I have three bananas, and the AI has 2 bananas and 2 rubber, with the other two boats blocked and the trader blocked for rubber, it will ship the bananas, even if giving me 3 vps instead of spoiling them. It will even do this if it has a market and bananas are NOT blocked in the market.

I plan to look at the spreadsheet in the coming days, perhaps I will be able to help make it even stronger than it already is!

Re: Main weaknesses of CPU Hard AI

PostPosted: Fri Jan 16, 2015 6:43 pm
by durron597
Here is an example of the AI not choosing equipper in endgame.

Image

It chooses Shipper, which gives itself 3 VPs (1 rubber, 1 indigo, and 1 bonus vp for choosing shipper). I got 2 VPs (1 sugar + harbor). If, instead, it had chosen Equipper, it would have gotten 6 VPs (customs house), and I would have gotten zero.

Perhaps this component of the game is not included in the DNA?

Final score was 64-47-30. It should have been 62-53-30, a much closer score.

Re: Main weaknesses of CPU Hard AI

PostPosted: Tue Feb 17, 2015 8:03 am
by ChrisGibbs
durron597 wrote:It chooses Shipper, which gives itself 3 VPs (1 rubber, 1 indigo, and 1 bonus vp for choosing shipper). I got 2 VPs (1 sugar + harbor). If, instead, it had chosen Equipper, it would have gotten 6 VPs (customs house), and I would have gotten zero.

Perhaps this component of the game is not included in the DNA?


Yeah you are right: at the moment it will only choose to equip big buildings if the end game condition has already been triggered earlier in the round, i.e. it doesn't "look ahead" to see if choosing e.g. Shipper in your example would trigger the end of the game.

This could be added as part of the proposed DNA switching improvements, along with your other excellent suggestions at the top of this thread. (I've made a note in the roadmap with a link to this thread)

Would you be interested in helping to develop the CPU Max player at all? (or do you know anyone who might be interested?)

Re: Main weaknesses of CPU Hard AI

PostPosted: Tue Feb 17, 2015 2:04 pm
by durron597
I'd be willing to help (I am also a Java developer, for what it's worth), but I haven't had a chance to look at the spreadsheet and I don't really know what's involved.

Feel free to send me a message on Google Hangouts using the e-mail address that I used to register this account.