Cepheus and Poker AI
Game-Theoretic Poker and the Cepheus Solver
What Cepheus accomplished
Cepheus was a computer program developed by researchers at the University of Alberta to approximate a game-theoretic solution to heads-up limit Texas hold’em. It did not produce a mathematically perfect solution, but it found strategies whose exploitability was estimated to be less than 0.001 big blind per hand.
Exploitability measures how much an opponent could gain by choosing the best possible response to a strategy. A very low exploitability means that an opponent cannot profitably exploit the strategy by more than a small amount, even if the opponent knows how it is played.
The result was a major computational achievement: heads-up limit hold’em was the first full, realistic poker game to be solved to this degree of accuracy. The computation required roughly 900 CPU-years, illustrating the size of the problem.
A small theoretical advantage does not imply that a player will reliably win in a short session. Heads-up limit hold’em has a standard deviation of roughly five big blinds per hand, so random variation can overwhelm an advantage of a thousandth of a big blind for an extremely long time. The solution is therefore important as a theoretical benchmark, even if its small edge is difficult to observe directly in play.
Cepheus does not mean that poker has become like chess, where computers can simply defeat human players through superior calculation. It addresses one specific format—heads-up limit hold’em—and does not directly solve other poker formats, especially games with larger bet-size choices, more players, or tournament-specific payouts.
Nash equilibrium and game-theoretic optimal play
Nash equilibrium
A Nash equilibrium is a set of strategies in which no player can improve their result by changing strategy alone while the other players’ strategies stay fixed. In a two-player, zero-sum game, one player’s gain is the other player’s loss.
For a two-player zero-sum game, a Nash equilibrium is also a minimax solution: each player chooses a strategy that protects against the strongest possible response from the opponent. A strategy of this kind is often called game-theoretically optimal, or GTO.
Rock-paper-scissors provides a simple example. The equilibrium is to choose each action with probability 31. If a player chooses rock too often, for example, an opponent can respond with paper. The balanced mixture prevents either player from exploiting the other.
GTO play is not always the most profitable play against a particular opponent
A GTO strategy is designed to prevent exploitation, not necessarily to take maximum advantage of an opponent’s mistakes. If an opponent deviates from equilibrium, another strategy may earn more by targeting that deviation. However, exploiting an opponent can require making one’s own strategy more predictable or vulnerable.
Thus, there is a distinction between:
Unexploitable or near-unexploitable play: limits the opponent’s ability to gain.
Exploitative play: adjusts to the opponent’s observed tendencies in pursuit of greater profit.
GTO play provides a defensive benchmark. It gives a player a strategy that cannot be exploited substantially, even when the opponent knows the strategy. Against a weak opponent, a deliberately exploitative strategy may earn more, but it carries additional strategic risk.
A simplified poker game
Consider a two-player game involving Rose and Colin:
Each player antes 50,creatingapotof100.
Rose receives a card. A spade wins at showdown; a non-spade loses.
Rose may check or bet $100.
If Rose bets, Colin may call $100 or fold.
If Colin folds, Rose wins the existing pot. If Colin calls, the hand goes to showdown.
If Rose holds a winning card, betting is profitable because she expects to win at showdown. If she holds a losing card, she may bluff. The bluff risks 100towinthe100 already in the pot, so it has even-money risk and reward, ignoring the sunk antes.
Colin’s calling frequency
Colin must call often enough to prevent Rose from bluffing profitably with every losing hand. If Colin calls too rarely, Rose can bluff more frequently. If Colin calls too often, Rose can simply bet her winning hands and stop bluffing.
The equilibrium call frequency makes Rose indifferent to bluffing with a losing hand: bluffing should not provide a higher expected return than giving up. In the simplified example, the call frequency is one-half.
Rose’s balance of value bets and bluffs
Rose’s betting range must include enough winning hands to support her bluffs. If she bluffs too often, Colin can call profitably. If she never bluffs, Colin can fold whenever she bets and avoid paying off her strong hands.
The example describes a balance in which Rose bets all of her winning spades and bluffs with a fraction of her losing hands. The exact bluff-to-value ratio depends on the game’s card distribution and payoffs. Its purpose is to illustrate the equilibrium principle: each player chooses a frequency that prevents the other from benefiting by changing their response.
In a poker equilibrium, betting and calling frequencies are chosen to make the opponent indifferent among relevant options. This prevents either player from gaining by simply adjusting to an imbalance.
Formal model of a two-player zero-sum game
A game can be described by a utility function u(x,y), where x is a strategy for one player and y is a strategy for the other. The value u(x,y) is the first player’s payoff; the second player receives the corresponding loss.
Players can use mixed strategies, which assign probabilities to different available actions. If a player selects strategy σk with probability pk, the mixed strategy can be written as
Because expected utility is linear in these probabilities, the payoff of a mixed strategy is the probability-weighted average of the payoffs of its component strategies.
A pair of strategies is an ϵ-equilibrium if neither player can improve their result by more than ϵ through a unilateral change of strategy. When ϵ=0, the pair is an exact Nash equilibrium. Cepheus found strategies that were close to equilibrium according to a very small exploitability bound.
Regret minimization
Regret as a measure of missed opportunity
Regret measures how much better a player would have done by consistently choosing a particular action instead of following the strategy actually used.
Suppose a player has several possible actions. At each time step t, action k would have produced payoff ut(k), while the player’s actual strategy produced payoff ut(σt). The cumulative regret for action k after T steps is
Positive regret means that action k would have performed better on average over the observed sequence.
Negative regret means that the player’s actual choices performed better than repeatedly choosing k.
Regret-minimization methods aim to make average positive regret approach zero. A player should not be able to identify one fixed action that would have consistently performed substantially better than the strategy played.
Regret matching
Regret matching uses accumulated positive regrets to determine future action probabilities:
Calculate each action’s cumulative regret.
Ignore actions with zero or negative regret.
Assign probability to the remaining actions in proportion to their positive regret.
If no action has positive regret, choose among the actions by some default method, such as uniformly at random.
For example, if two actions have positive regrets of 1 and 3, regret matching selects them with probabilities 41 and 43. The action that has been more underused relative to its results receives greater weight.
With repeated updates, the average regret decreases at a rate on the order of T1 under standard assumptions, where T is the number of updates. This convergence property makes regret minimization useful for finding strategies in games too large for direct exhaustive analysis.
Counterfactual regret minimization
Regret at decision points
Poker involves many possible decision points. At each point, a player may choose among actions such as checking, betting, calling, raising, or folding. Counterfactual regret minimization (CFR) applies regret minimization separately at these decision points.
The method evaluates how a player would have done by choosing a different action at a particular point, while accounting for the chance of reaching that point. This hypothetical evaluation is called counterfactual because it asks what would have happened if the player had taken an alternative action, even when that action was not actually chosen.
The method makes large games more manageable because it does not need to calculate the complete value of every strategy against every other strategy at once. Instead, it updates local decisions through repeated traversals or sampled outcomes.
Sampling and average strategies
A poker strategy tree can be too large to evaluate completely for every update. CFR can use samples of chance events and game outcomes, provided the estimates are appropriately weighted. For example, instead of enumerating every possible hand and board, an algorithm may sample a hand or a path through the game tree and use that outcome to update regrets.
Over repeated iterations, the algorithm records strategies played at each step. The average strategy across iterations is generally the strategy of interest for convergence analysis; the most recent strategy alone need not be close to equilibrium.
In a two-player zero-sum game, when both players minimize regret at their decision points, the average strategies approach an approximate Nash equilibrium. The players effectively improve against one another over repeated iterations, and the exploitability of their average strategies decreases.
CFR+ and Cepheus
Cepheus used CFR+, a modification of counterfactual regret minimization. In ordinary regret accumulation, some actions can acquire very large negative regrets. A large negative value can make an action difficult to reconsider, even if later updates suggest that it may be useful.
CFR+ floors cumulative regrets at zero: negative accumulated regret is reset to zero rather than carried forward. This allows an action that was previously judged poor to regain probability more readily when later evidence supports it. The method generally improves convergence speed in practical applications.
Cepheus maintained separate strategy structures for the players’ positions, including the small blind and the big blind. Its strategy was not merely a single fixed action for each hand; it described choices across the many possible situations that could arise during a hand.
Why solving limit hold’em is computationally difficult
Branching across betting rounds
Even with a limit on the number of raises, a betting round can produce many different sequences of actions. Under a four-bet cap, the lecture counted nine action sequences that could lead to the next street: a check-check sequence and multiple sequences involving bets and calls or raises. Since pre-flop, flop, and turn betting all occur before the river, the number of action histories grows rapidly.
Cards and symmetry
The game tree also expands through the many possible combinations of hole cards and community cards. Some states are strategically equivalent because suits can be relabeled without changing the essential situation. Exploiting these symmetries reduces the number of distinct cases the solver needs to store and calculate.
Symmetry reduction is powerful but does not remove the underlying combinatorial growth. The number of distinct histories and river hand situations remains enormous, requiring substantial computation and memory. The strategy representation can require terabytes of storage.
Decomposing the computation
Instead of solving the entire game tree as one in-memory object, a large problem can be split into smaller subgames. The solver can work on these subgames separately and use compact or cached representations where possible. Efficient implementation matters because many updates consist of repeated simple operations across an enormous number of states.
Extensions to other poker games
Omaha eight-or-better
Omaha eight-or-better has a betting structure similar to hold’em, but each player receives four hole cards rather than two. The larger number of private-card combinations greatly increases the state space. The lecture estimated that, under its particular representation, the river component could be roughly 82.5 times larger than the corresponding hold’em component.
This comparison illustrates an important principle: a game may share the same betting structure as another game and still be far harder to solve because of an increase in card combinations.
Razz
Razz is a lowball stud game. Because suits do not determine hand rankings in the same way they do in many other poker games, cards of the same rank can often be treated as strategically equivalent. This creates a potential basis for reducing the problem through hand abstraction, or grouping similar hands into buckets.
However, stud games provide more exposed card information and include a different sequence of streets and decisions. This produces a large state space of possible visible-card combinations. Some branches may be sufficiently unlikely or unimportant to omit or approximate, but each such simplification can affect the accuracy of the resulting strategy.
Abstraction and approximation
Hand bucketing
When solving a game exactly is impractical, similar hands can be grouped into buckets. For example, hands with similar strength or potential may be represented by one abstract hand type.
Bucketing reduces the size of the game by treating many distinct card combinations as equivalent. The quality of the solution depends on how well the buckets preserve strategically important differences. A poor grouping—for example, putting very strong hands and weak hands into the same bucket—can make the resulting strategy easy to exploit.
Approximating later streets
Another possibility is to avoid representing every river state explicitly and instead estimate the value of a hand on the river. A useful estimate cannot rely only on showdown equity, because a player may have to respond to a bet before reaching showdown. The estimate must account for the possible actions and future costs that influence the hand’s value.
Card removal and blockers
Card removal refers to the fact that a player’s known cards reduce the likelihood that an opponent holds particular cards. This affects both the opponent’s possible hand strength and the probability that a bluff or value bet succeeds.
In pot-limit Omaha, if the board contains a flush, holding the ace of that suit can be an effective bluffing feature. The ace blocks the opponent from holding some of the strongest flush combinations, making a fold more plausible. A strategy that ignores these card-removal effects may use poor bluffing frequencies and become exploitable.
Approximations therefore need to retain features that strongly affect strategic choices, including hand strength, possible draws, blockers, and the opponent’s likely range.
Why no-limit and other big-bet games are harder
In limit games, bet and raise sizes are fixed by the rules. In no-limit and pot-limit games, players can choose from a wide range of bet sizes, producing a much larger action space.
A solver may reduce the problem by allowing only a few bet sizes—for example, a half-pot bet, a pot-sized bet, and an all-in wager. This creates a tractable abstract game, but the resulting strategy may not specify what to do against a bet size omitted from the abstraction.
Even when the opponent uses one of the modeled bet sizes, the solver must decide how to respond to raises and changing stack sizes. A response that is appropriate against a pot-sized bet may not be appropriate against a bet that is slightly larger or smaller.
Adding many possible bet sizes does not automatically solve the problem. If the candidate sizes are very close in value, the solver must distinguish among many similar options and may take much longer to converge. It must also balance value bets and bluffs across this expanded action space.
A restricted-bet-size solution can still be informative, but its accuracy depends on how well the restricted game represents the full game.
Multiplayer poker
Regret-minimization methods can be applied to games with more than two players, and they have been used to build competitive multiplayer agents. However, the strongest equilibrium guarantees available in two-player zero-sum games do not transfer straightforwardly to multiplayer games.
There may be multiple equilibria, and some may involve strategic coordination or collusion. For example, in a simple three-player odd-or-even game where the player with the odd choice wins, two players who coordinate on different choices can prevent the third player from winning. This illustrates how multiplayer incentives can differ from those in a two-player zero-sum game.
Poker also includes tournament formats with nonlinear payouts. In a tournament, chips do not necessarily correspond directly to a player’s expected cash payout. A strategically optimal choice can depend on the tournament situation and the prize structure, not just on maximizing chips in the current hand.
Exploitation and opponent adaptation
A player can try to improve results by identifying that an opponent is playing suboptimally and adjusting to exploit the mistake. This creates a dynamic problem:
The opponent’s tendencies must be inferred from limited observations.
The opponent may change strategy or stop making the observed mistake.
An exploitative adjustment may make the player’s own strategy more vulnerable.
The player must decide how much evidence is enough to justify deviating from a robust strategy.
One proposed approach is to limit the risk of exploitation by earning only part of the opponent’s apparent loss from poor play. Such an approach reflects the trade-off between capturing additional value and preserving protection against counter-exploitation.
Utility and tournament decisions
Maximizing expected chips or money does not always maximize a player’s personal utility. In a cash game, chip value may be close to linear over a relevant range. In tournaments, prize structures can make the value of chips nonlinear: gaining a given number of chips may have different consequences depending on a player’s current stack and the tournament’s payout structure.
Independent Chip Model (ICM) estimates how tournament chips translate into expected prize money. It can inform decisions such as whether a player should accept a high-variance gamble near a major payout boundary.
A player’s personal utility may also differ from expected money. For example, the player may value a small guaranteed payout more highly than a risky chance at a larger payout, or may care differently about moving between particular prize levels. Modeling these preferences raises questions beyond simply finding a Nash equilibrium for chip outcomes.
Connections between poker and trading
Poker provides a useful model for trading because both involve incomplete information, uncertain outcomes, and decisions made while considering what another party knows or intends to do. A trader, like a poker player, must reason about an opponent’s possible actions and adjust to information revealed through those actions.
For example, a trader deciding whether to buy or sell may have an estimate of an asset’s value but still need to consider why the counterparty is willing to take the other side. The counterparty may have different information, a different risk exposure, or an urgent need to trade.
Poker analysis also resembles quantitative strategy analysis: both fields test whether a proposed strategy actually produces the expected results, how it performs under different conditions, and whether it is vulnerable to an adversarial response. The shared challenge is to make decisions under uncertainty while balancing expected profit against strategic risk.

Ask anything
We've read this whole study set, so questions about it get the best answers.