Auction Poker AI - Part 3

PART III - Resolving a bottleneck.

At this point, the AI for the computer players has a pretty good foundation. They’ll bid on the good cards and ignore cards that spoil decent hands.  However, after having a few AI players play against each other I noticed a lot of booching of this type:

They always seemed to go for the Royal Flushes and the Straight Flushes and they never bid on anything else. As a player I don’t always go for those hands; sometimes I try for a Full House or 4-of-a-Kind instead. I needed to tell the AI to try some variety in picking its hands.

However, the big problem at this point was that the AI bid on cards with the highest affinity and those  tended to be cards that made Straight Flushes and Royal Flushes.  So how would I tell the AI to try different hands?

The solution turned out to be pretty simple but it meant adding a lot more calculations and charts to the AI code. Remember that the affinity between cards is directly dependent on which hands they can make and the amount of chips each hand is worth:

If I don’t want the AI to try for the Royal Flush or a Straight Flush, then I’ll make those hands worth 0 points which will in turn affect the affinity calculation and which cards the AI will pick.

This is what happens to the affinity of suited cards when the Royal Flushes and Straight Flushes are taken out of the equation.

As can be seen on the updated chart on the right, the rank of the card in suited pairs becomes irrelevant with those two hands out of the way. To the AI, any two cards of the same suit are the same and it would try for plain Flushes instead of those higher hands.

From that point it was a simple matter of zeroing certain hands so the AI would bid on the others. For example, zeroing out all the Flushes and Straights meant that the AI’s would try for Full Houses, Three-of-a-Kinds and Four-of-a-Kinds.

I also started to give each AI player its own personality - some of them will go for the highest hands all the time and others will switch between trying for Full Houses and Straight Flushes every other round.

At this point, the AI is working fairly well but I still needed to add a bit more personality to iron out some kinks. In addition, while the AI pretty much knew which cards to bid on, it still wasn’t very smart on figuring out how much to bid. On to Part 4.

Leave a comment