All projects
Game / AIin-progress

Poker Bot

Texas Hold'em agent targeting GTO equilibrium play via Deep Counterfactual Regret Minimisation the same algorithmic family behind Libratus and Pluribus, the first systems to beat professional players.

Python

Skills involved

PythonGame Dev

What This Is

A Texas Hold'em AI targeting Game Theory Optimal (GTO) play via Deep Counterfactual Regret Minimisation (Deep CFR). This is the same algorithmic family as Libratus and Pluribus the first AI systems to decisively beat professional poker players.

Poker is the canonical benchmark for imperfect-information game AI. Unlike Chess or Go, you can't see the full game state. Optimal play requires reasoning about what your opponent knows, what they think you know, and mixing strategies to remain unexploitable.

The Math

In a zero-sum two-player game, the Nash equilibrium strategy is unexploitable you can't lose more than a small amount against it in expectation, regardless of what your opponent does. CFR converges to this equilibrium by repeatedly playing the game and reducing "regret" the counterfactual gain from having played differently.

Vanilla CFR is tractable for small games. Texas Hold'em has ~10^161 game states far too large for tabular CFR. We use two abstractions:

  1. Abstraction over hands: bucket the ~1326 possible hole card combinations into ~200 "buckets" based on equity vs. random hands. Cards within the same bucket are treated identically.
  2. Abstraction over bet sizes: discretise the continuous bet sizing space into ~8 canonical sizes.

With these abstractions, the game tree becomes tractable for CFR. Deep CFR replaces the strategy table with a neural network generalising across similar information sets rather than storing them separately.

Current Progress

  • Full Texas Hold'em rules engine with correct pot handling, side pots, and all-ins
  • Hand evaluator (7-card hand ranking via 2+2 lookup tables)
  • Vanilla CFR implemented and tested on Kuhn Poker (3-card toy game) converges to known equilibrium
  • Working on information set abstraction for the full game

What We're Learning

  • How much performance is lost due to hand and betting abstractions
  • Whether a neural network function approximator generalises better than tabular CFR for similar information sets
  • How to evaluate strategy quality: ex-exploitability vs. win rate vs. human matchup

What's Next

  • Full Deep CFR implementation
  • Self-play training loop with blueprint strategy generation
  • Real-time opponent modelling to deviate from GTO when the opponent is exploitable

Last updated Mar 3, 2025

← Back to all projects