Wednesday, December 18, 2024

Can ChatGPT Help You Win At Poker?

Must read

If you’re an online poker player, a little strategy knowledge can go a long way. There are plenty of poker apps and tutorials out there, but they tend to be expensive. Can ChatGPT fill the void and teach you how to win at poker?

For the past few weeks I’ve been using ChatGPT to analyze my play in online Texas hold ‘em games to see if it can teach me a thing or two about strategy. I’ve read a couple of poker books, watched online tutorials from professional players such as Daniel Negreanu, and played casually for a few years, but I’m by no means a poker expert.

What’s more, I play with low-stakes pocket money, not serious cash, so the opponents I play against are likely to be low-skilled, looser players who care less about making wild bets because the stakes are so low.

To be clear, I’m not advocating gambling nor do I suggest that following ChatGPT’s advice is anything like a get-rich-quick scheme for poker players. But, as illustrated below, there are ways in which ChatGPT can help evaluate your poker game and point out where you’re going right and wrong.

Is ChatGPT Good At Poker?

The first question to ask is whether ChatGPT is even capable of playing poker. After all, it’s an all-purpose chatbot, not an AI specifically trained to play the game, unlike say Google DeepMind’s Alpha Go, which destroyed the world’s best Go players.

Thankfully, academics have answered that question. A study published in 2023 by Berkley researcher Askhat Gupta examined how ChatGPT played poker compared to the game theory optimal strategy, which is essentially the best possible strategy for any given hand.

Gupta’s study found that ChatGPT exhibited “advanced understanding of poker, encompassing concepts like the valuation of starting hands, playing positions and other intricacies of game theory optimal poker.”

However, the study found that ChatGPT tended to play conservatively, only betting with premium hands and folding the rest. That low-risk strategy could be easily exploited by other human players, who might detect you only bet with strong hands and thus avoid entering pots you’ve committed to.

That said, it’s worth pointing out that at the time of the study, ChatGPT was running a now outdated AI model. Gupta’s tests with the more recent GPT-4 (a variant of which is still used today) found it to be much more hawkish. “GPT-4 plays like a maniac, showcasing a loose and aggressive style of play,” Gupta’s study found. “Both strategies, although relatively advanced, are not game theory optimal.”

How ChatGPT Can Analyze Your Poker Game

If you’ve clicked on this article hoping to find out how ChatGPT can help you cheat in live games by advising which hands to play, you’ve had a wasted journey. Unless you’re a speed-of-light typist, there’s no way you could enter the required information on blinds, pot size, players’ pots, bets placed and cards dealt in time to get answers during a live game. There’s no doubt AI bots are already being used in online poker, but this isn’t a guide to using them.

Instead, ChatGPT comes into its own when analyzing your performance in games you’ve already played, hopefully helping you to improve your decision making for next time.

Online poker services, such as the GG Poker site I use, normally give you the option to download plain text histories of the hands you’ve played in tournaments or cash games. These can be uploaded to ChatGPT, from where you can ask the AI to rate how you played.

With a 60-hand history of a recent cash game I played uploaded to ChatGPT (you click the paperclip icon in the chat window to upload files), I entered the following prompt:

Here’s my hand history for a no-limit Texas hold ’em session. Analyse my play.

This delivered a detailed analysis of three hands that I played, offering an opinion on whether I was wise to place the bets I did at the various stages of the hand (pre-flop, flop, turn and river), as well as strategic advice on each hand and an overall summary.

For example, in a hand picked out by the AI, where I’d bluffed the river (the final bet of the hand) with a large bet that prompted my opponent to fold, ChatGPT advised me to “ensure your bluffs are balanced with value bets in similar situations to avoid predictability,” which is pretty sound advice that I’ve read elsewhere in the poker guides.

ChatGPT can also be called upon to analyze individual hands where you’ve won big or lost heavily, to review whether you made the correct calls. Just because you scooped a big pot it doesn’t mean you played it well, and “bad beats” where you lose with the strongest hands are also common.

So, with your hand history uploaded, you might ask ChatGPT:

Examine the hand in which I won the most money

Or:

Analyze the hand in which I lost the most money

The hand in which I suffered the biggest loss was actually one in which I had a very strong opening hand—a pair of kings. However, an ace appeared on the turn, prompting my opponent to place a sizeable bet, suggesting they might have a kings-beating pair of aces now. With no other kings or straight/flush possibilities arriving on the river, I decided to fold when my opponent made an even larger bet.

ChatGPT advised that my “fold is cautious but reasonable given the large bet and potential holdings of the Big Blind.” So, no need to feel too bad about that costly hand.

Advanced Analysis

ChatGPT’s coding ability lets you take the poker hand analysis even further.

There’s a GPT in the ChatGPT store called Poker Hand Analyzer, which promises to analyze hands using a Monte Carlo simulation—basically running potential hands many times to obtain a numeric probability of success or failure. A GPT, for those who don’t know, is a chatbot within ChatGPT that’s dedicated to a specific task, such as booking travel tickets, answering math problems or, in this case, helping you to improve your poker skills.

I asked Poker Hand Analyzer to run a Monte Carlo simulation on my pair of kings hand above, to get a more detailed analysis of whether I was right to fold that strong hand.

To do this, the GPT first defines a plausible range of cards that my opponent might have in his hand. Of course, this being a low-stakes game with amateur players, he could have literally anything, but the AI makes assumptions based on the way the opponent made his bets. By the time we got to the river, the AI assumes the opponent is holding either a strong hand (ie. suited Ace-Jack) or a missed draw that he’s trying to bluff with.

It then generates code in Python for that specific hand, which will be run against the treys poker hand evaluation library. ChatGPT can’t run this program itself, but it provides me with full instructions on how to install Python, the treys library and how to run the code. Note that even with these instructions, this is a reasonably techy process that will likely require advanced computer skills.

After a couple of code revisions to overcome error messages (all handled by the AI), we finally get a running Monte Carlo simulation of my hand, and it reckons my pair of kings would have won 51.6% of the time. In other words, I was in a coin toss. The fold was conservative, but not ridiculously so.

For comparison, I put the same hand information into the PokerNews Odds Calculator and it reckons I had a 60.3% chance of winning the hand with the kings. But it has less information to work with. It hasn’t created a shortlist of likely opponent hands based on the betting patterns up to the river, for example.

Still, armed with all of this information, I might be more tempted to back myself in a similar situation next time.

ChatGPT’s Poker Flaws

The majority of the poker advice I’ve been given by ChatGPT seems sound, and is roughly consistent with that provided by the books I’ve read or the professionals’ videos. Its ability to analyze hands I’ve played and spot errors in my play is a huge help. For example, it’s helped me correct a flaw where I wasn’t spotting the potential for opponents to make a straight, meaning that I was often over-betting with weaker hands, such as two pairs.

That said, I don’t think ChatGPT’s advice is going to win me a bracelet at the next world championships. It’s good for correcting basic errors and monitoring past performance, but it’s not going to transform me—a distinctly amateur player—into Daniel Negreanu.

It’s also prone to the odd basic error itself. For example, in one analysis it describes my hand of seven of spades and five of hearts as a “suited connector”, when in fact it’s an unsuited connector—two cards of different suits that could form part of a straight draw (ie. 5,6,7,8,9).

That kind of basic error undermines confidence in its advice, although it doesn’t invalidate it entirely. I’m probably not going to become a poker millionaire with ChatGPT’s help, but I probably wouldn’t become one with Daniel Negreanu’s help, either.

Latest article