Texas Hold’em Mastered by Computer With No Wrong Moves

If you lose at Texas Hold’em, don’t blame your cards.

A breakthrough in artificial intelligence has allowed a computer to master the simplest two-person version of the poker game, working through every possible variation of play to make the perfect move every time. When performed without mistakes, just like the childhood game tic-tac-toe, there’s no way to lose. In this case the player is Cepheus, an algorithm designed by Canadian researchers.

“We have a strategy that can guarantee a player won’t lose,” said Michael Bowling, a computer scientist from the University of Alberta, who led a team working on the program. “It’s going to be a break-even game. It’s only when someone makes a mistake that they could end up losing.”

You don’t have to take their word, though, their work is published today in the journal Science. The researchers are calling for poker players to test the program for Limit Texas Hold’em by challenging Cepheus online. The results may cause gamblers to rethink some common moves, Bowling said in a telephone interview.

“Not only did we prove some things that most people already believe, like the dealer holds a substantial advantage, we got some answers where the poker community isn’t settled yet,” he said. “For example, re-raising with very low pairs. Most good poker players wouldn’t do that.”

The term for what Bowling and his colleagues did was “solve” the game, creating an optimal way to play that will never lose. It’s the first time that researchers have solved a game played competitively by humans that involves imperfect information, meaning that players don’t know everything, such as their opponents’ cards, as it progresses, said Tuomas Sandholm, from Carnegie Mellon University’s computer science department in Pittsburgh, in an editorial that accompanied the article.

10,000 Billion Decisions

The results apply only to the most basic form of the game, known as Heads-up Limit Hold’em, where there are two players and bets and raises are limited. Even with those restrictions, there are more than 10,000 billion decision points in the game.

The strategy grid devised by the system has more than 10 terabytes of data. For comparison, the English-language version of Wikipedia is 1,000 times smaller, Bowling said.

Solving the game required even deeper control than when the computer-program Chinook took the world championship title in checkers against humans in the 1990s or when International Business Machines Corp.’s Deep Blue beat Garry Kasparov in chess in 1997. While a computer program may one day beat the world’s best players of No-Limit Texas Hold’em, the most popular form of the game, it’s unlikely anyone will ever solve it because there are so many possible moves, Bowling said.

Terrible Players

The breakthrough, while cool, is academic for most avid poker players, who prefer more advanced games like No-Limit Texas Hold’em, said Ed Miller, a professional poker player and author of “Small Stakes Hold’em: Winning Big with Expert Play.”

There are machines in Las Vegas casinos that play the exact version of Hold’em solved by Bowling’s team, although they have limits that make them undesirable for connoisseurs, Miller said.

“A lot of people who play them are terrible and have no chance,” he said. “Most people who are good enough to beat the game wouldn’t choose to spend their time that way.”

Miller says he plans to play against the machine, even though there isn’t a way to master its moves and win a ton of money. Instead, there may be some interesting quirks.

“We always talk about what a theoretically perfect solution for a poker game would be,” Miller said. “There are going to be some things the bot will do that will just be -- ‘What? Why did it do that?’ I might be able to apply it to some games that I do play.”

Players’ Luck

Of course, Heads-up Limit Texas Hold’em has an element of chance. If someone is dealt a terrible hand, it’s unlikely she will win, and the best option may be to fold. With enough games played, however, the luck evens out, Miller said.

One thing in Texas Hold’em that isn’t chance is the widely believed advantage that goes to the dealer. The dealer acts first in the first round of the game, and second in all other rounds. That second-mover advantage is critical, as it gives that player the ability to observe the opponent’s moves, said researcher Michael Johanson from the University of Alberta.

“We have now computed a perfect strategy for playing as each of the positions in the game,” he said in an e-mail. “We now have a fairly tight guarantee on how much money each player should win, if they both play perfectly, purely as a result of sitting in each position before any cards are dealt.”

Because the cards are dealt the same way to both players, each should win about half their games, Johanson said. The dealer’s advantage is that when they win, they get a slightly more valuable pot, he said.

Continual Games

The researchers devised a computer program that had no poker knowledge, playing in an utterly random fashion, and used artificial intelligence and game theory to calculate the best possible moves. Advances in general algorithms allowed them to work with larger-scale models; essentially the computer played 28.8 trillion hands per second for two months.

“By the time it was done, it had played more poker than all of humanity combined,” Bowling said. “It is so close to perfect right now that we call it essentially solved. You would never be able to know it wasn’t perfect.”

Cepheus’ winning ways aren’t just a matter of knowing the odds, something many professional and amateur poker players already have down. Instead, game theory and reasoning come into play, with the computer making complex decisions about bluffing and betting designed to throw off its competitors. For example, when the computer knows that it has a winning hand, it may not always bet that way -- instead pretending the cards are weaker than they actually are.

Issuing Challenge

The researchers are hoping poker players will take on the game and uncover the rationale behind some of the computer’s decisions. Cepheus isn’t able to explain why it makes the moves it does, other than to say they make more money.

“This is where human ingenuity comes in,” said Bowling, who isn’t an avid poker player himself. “We are hoping some poker enthusiasts will comb through it and create some insights. We already have mathematical proof that in the long run you won’t be winning, but it can be enlightening to know that you are playing against the world’s best poker player.”

Before it's here, it's on the Bloomberg Terminal.
LEARN MORE