← All posts
Bot AI

Reading hands: teaching a bot to narrow your range

Our toughest bot no longer assumes you could hold anything — it reads what your betting gives away. Here's how.


When our bots estimate their chances, they imagine the hand playing out against uniformly random opponents — every two-card holding equally likely. It is honest and unbiased, but it is also naïve. A real player does not think you could have anything; they narrow it down based on how you have bet. Our toughest bot, the Shark, now does exactly that — here is how.

What a "range" actually is

There are exactly 1,326 distinct two-card starting hands. A range is just a weight on each one — how likely the opponent is to hold it. Uniform weights (everything equally likely) is what most of our bots use; the Shark instead works with a narrowed range — some weights turned up, others toward zero.

Narrowing with Bayes' rule

Every action an opponent takes is evidence. We update the range with Bayes' rule:

P(hand | action)  ∝  P(action | hand) × P(hand)
The opponent bet big → up-weight the hands that bet big, down-weight the rest.

A big river bet up-weights strong hands and good draws and crushes the air. A passive check-call keeps the range wide. Do this every street and the cloud of "what they could have" tightens into something realistic.

The hard part — and our unfair advantage

The whole thing hinges on one term: P(action | hand) — how likely this player is to take the action they just took, with a given hand. That is a model of their strategy, and it is normally the hard, guessy part. But in a game full of ourbots, we already own that model: it is literally the bot's own decision function. So for bot-vs-bot play the read can be made exactly correct. Against humans, we fit the same model to a player's observed tendencies (how often they bet, call, fold) over a session.

Then: sample from the range, not the deck

Once we have a weighted range, the equity simulation barely changes — instead of dealing phantom opponents random cards, we deal them cards sampled from their range. Same loop, sharper read.

Keep reading