Mathematical Personality

The AI is really quite good at playing the game, and whilst changing the number of cards that remain flipped scales difficulty, the AI is far better at finding patterns - and has a fairly consistent skill level, I’ve never seen it attempt to play any hand that does not utilize all 5 cards. It also has quite a gung-ho approach to the game, playing flipped cards far too riskily - if you play visible cards only, it’ll fail because it thinks every set of 5 hidden cards is a Royal Flush.

Basically, it ranks every potential hand by it’s score - which is a product of the cards in the hand, and a multiplier for the type of hand. A high card attracts a multiplier of 1, a royal flush much higher (100 at the time of writing).

One of the ambitions for the game is a quest mode, where you defeat the titular Poker Kingdoms, I envision each card in the desk as a node in that quest, but there’s not enough variety in the game for 52 games, I could make some obstacles on the board, but once you understand the mechanics of the game, layout really won’t make that much challenge.

So I’m experimenting with giving the AI a personality - at least a difference in the strategy the AI plays with. The simplest, and most obvious given that you’re playing against members of the deck is to make them preference certain cards - each card preferences its own face, and suit higher (4 of spades is more likely to pick 4, and spades) - the more advanced the card, the less it will preference itself (being a better ‘player’).

The other factor that needs to be dealt with is hidden-cards, vs jokers, to the AI they appear identical, as a result of how they’re dealt with by the AI, but playing a Joker is less risky than playing a flipped card, with that comes a lower reward. So, each hand generates a risk state, from 0 to 100% risk (20% for each flipped card). This can be used to influence AI players as either a positive or negative value, conservative players would take a penalty, but daring players can add this as a bonus.

Finally, each personality can receive a custom table for hand multipliers, I can heavily weight basic hands early game, and as the player progressed, shift that weighting closer to real values as the player approaches later stages in the game - perhaps throwing in some curve-balls on the way.