How Poker AIs Learn to Bluff Using Counterfactual Regret Minimization

Daniel Okafor, Strategy analyst (AI-assisted) · · updated

A failure to bluff effectively can lead to predictable patterns that skilled opponents exploit, diminishing an AI's performance in poker. This article explores how counterfactual regret minimization (CFR) can help poker AIs learn to bluff more effectively, optimizing their strategies in competitive environments.

A Hypothetical Bluffing Failure in Poker AI

Suppose an AI consistently under-bets when bluffing, leading to a predictable pattern that skilled opponents can exploit. In this scenario, the AI's strategy becomes transparent, allowing opponents to call the bluff with higher confidence. This failure illustrates the need for a more sophisticated approach to decision-making in poker, particularly when it comes to bluffing.

The Mechanism of Counterfactual Regret Minimization

Counterfactual regret minimization (CFR) is a learning algorithm that iteratively adjusts strategies based on the regrets associated with not having chosen different actions, computed by traversing the game tree in self-play. The fundamental idea is to compute the regret for each action taken in a game, allowing the AI to learn from its mistakes and improve future decisions.

The CFR algorithm operates as follows:

  1. Initialization: Start with an initial strategy for the game.
  2. Regret Calculation: For each action, calculate each action's regret as its counterfactual value minus the value of the current strategy at that decision point.
  3. Strategy Update: Update the strategy based on accumulated regrets, playing each action in proportion to its positive accumulated regret (regret matching).
  4. Iteration: Repeat the process over many hands to refine the strategy.

This iterative process allows the AI to converge on an optimal strategy over time, adapting its bluffing tactics based on past experiences.

Tracing a Bluffing Example Through CFR

Consider a situation where an AI with a weak hand must decide whether to bluff (bet) or give up (check). The CFR algorithm evaluates potential outcomes based on previous hands and calculates the regrets for both actions:

  • Bluff: If the bluff succeeds, the AI wins the pot; if it fails, it loses the bet.
  • Fold: The AI avoids losing the bet but also misses the opportunity to win.

Through repeated iterations, the AI analyzes the outcomes of bluffing versus folding and adjusts its strategy accordingly. For instance, if bluffing at a given frequency earns more than giving up against the current strategy, the regret for bluffing grows and the next iteration bluffs more, until bluffs and value bets are balanced, optimizing its strategy based on the calculated regrets.

Failure Modes in Bluffing Strategies

Common failure modes in bluffing strategies include:

  • Overfitting to Previous Hands: The AI may become too reliant on past data, leading to rigid strategies that do not adapt well to new opponents or changing dynamics.
  • Misjudging Opponent Tendencies: If the AI incorrectly assesses an opponent's likelihood to call a bluff, it may either bluff too frequently or not enough, resulting in suboptimal decisions.

These failure modes highlight the importance of balancing learned strategies with adaptability, ensuring the AI remains effective against a variety of opponents.

Trade-offs Against Alternative Learning Methods

While CFR offers systematic learning, other methods such as supervised learning may provide faster adaptation to human player strategies. For instance:

  • Supervised Learning: This method can quickly learn from labeled data, adapting to human strategies but may lack the depth of strategic understanding that CFR provides.
  • Reinforcement Learning: Similar to CFR, this approach learns from interactions but may require extensive training data and time to converge on optimal strategies.

The choice between CFR and alternative methods depends on the specific requirements of the poker AI, including the need for adaptability versus depth of strategy.

Observed Results from CFR Implementations

CFR is behind the strongest poker AIs: Cepheus used CFR+ to essentially solve heads-up limit hold’em [1], and the CFR-based Libratus (2017) and Pluribus (2019) beat top professionals in no-limit hold’em [2] [3]. For example, researchers have reported that AIs employing CFR strategies can outperform traditional approaches, leading to more nuanced and unpredictable gameplay.

Proposed Experiment: Measuring Bluff Effectiveness

An interesting proposed experiment could involve varying the bluffing frequency of an AI against different player types to quantify the impact on win rates. By systematically adjusting the bluffing strategy and measuring the outcomes, developers can gain insights into optimal bluffing frequencies tailored to specific opponent behaviors.

Questions readers ask

How does CFR differ from traditional reinforcement learning?

CFR focuses on calculating regrets for actions based on past experiences, while traditional reinforcement learning typically relies on reward signals to update strategies. CFR provides a more structured approach to learning from suboptimal decisions.

Can CFR be applied to other strategic games beyond poker?

Yes, CFR has applications in various strategic games, including Liar's Dice, Goofspiel and other imperfect information games. Its principles can be adapted to any scenario where decision-making under uncertainty is required.

What are the computational costs associated with CFR?

CFR can be computationally intensive, particularly in complex games with large strategy spaces. However, optimizations such as sampling methods can help reduce the computational burden while maintaining effective learning.

Sources

  1. Bowling, Burch, Johanson and Tammelin: Heads-up limit hold’em poker is solved (Science, 2015)
  2. Brown and Sandholm: Superhuman AI for heads-up no-limit poker: Libratus beats top professionals (Science, 2018)
  3. Brown and Sandholm: Superhuman AI for multiplayer poker (Science, 2019)

*Corrected 2026-10-30: CFR was described backwards: it plays each action in proportion to its positive accumulated regret, not favouring low regret, and it learns by self-play against its own strategy, not against a particular opponent. Its results are now stated with sources: Cepheus, Libratus and Pluribus (Science, 2015, 2018 and 2019).*

More articles