← Back to blog

·

Can the AI See My Hole Cards?

No. A real hand where the AI called an ace-king river shove with a pair of sixes, checked against the source: what the AI knows when it acts, and what it doesn’t.

Learn by playing: open Texas Hold’em in your browser, no download needed.

Play Texas Hold’em

Texas Hold’em rules and room options →

A player shoved ace-king on the river, got called by the AI holding a pair of sixes, and lost 5,275 chips. Their question: can the AI see my hole cards?

No. At a standard Hold’em table, each AI decision uses three things: its own two hole cards, the board cards already turned, and everyone’s bets and stacks. While the hand is in play, your hole cards and the undealt cards are not even on the game server that runs the AI. First the hand, then the source code.

How the hand played

Six-handed, blinds 10/20, ante 10 each. You were on the button with K♥ A♦. The AI “Ace Ari” raised to 85 in front of you, you re-raised to 450, and it called.

Flop J♠ 6♥ 2♠: it checked, you bet 520, it called. Turn 7♦: both checked. River 3♣: it checked, you went all in for 26,323, and it called its last 4,295 with A♠ 6♦. Its pair of sixes beat your ace-high.

You lost only 5,275 because that was Ace Ari’s whole stack for the hand. The 22,028 of your shove that nobody could match went back to you, as the rules require.

Calling with sixes doesn’t need your cards

The pot held 2,070 on the river. Calling 4,295 would win that plus your matching 4,295, 6,365 in total. The call breaks even if it wins about 40% of the time.

This board gives a river shove plenty of bluffs: the flop had two spades, so missed spade flush draws, plus unpaired big cards like ace-king and ace-queen. A pair of sixes with an ace beats all of them. The call is arithmetic on the betting, not knowledge of your hand.

Counter-example at the same table: the AI folded a winner

An AI that could see your cards would never fold the best hand. At this table it did.

Ten hands earlier the board was 9♠ 9♣ A♦ A♣ 7♦. You held 3♦ 2♥, neither of which played, so your best hand was the board itself. You bet 930 on the river. The AI “Wily Win” held K♦ 2♠; its king outranks the board’s 7, so it would have won a showdown. It folded, and the pot was yours.

The ace-king hand shows the same thing. Wily Win’s J♣ 8♦ and Slick Sly’s 2♣ 10♣ folded before the flop. After all five board cards, one would have made a pair of jacks and the other a pair of twos, both better than your ace-high. The AI knew neither your cards nor the cards to come.

You can see the folded AI cards in the hand review because the AI chooses to show its cards after every hand. Cards you fold are never shown to anyone automatically.

What the source code gives the AI

  • Its own cards only. Each decision receives a game snapshot whose only card fields are the AI’s two hole cards and the board dealt so far. Other seats carry just their stack, chips bet this street, folded and all-in flags; the code comment says “Never carries hole cards”.
  • During the hand, the game server doesn’t hold your cards. Standard tables shuffle and deal in a separate dealer process. The game server can only fetch the AI seats’ hole cards from it; a request for a human seat is refused. Board cards are fetched one street at a time. Only when the hand is over and being settled does the dealer hand the full deal to the game server, for settlement and the hand record; by then every decision has been made. This hand’s record shows it was dealt by that separate dealer process.
  • Your hand is unknown when it estimates its chances. To estimate equity, the AI enumerates or samples your possible hands from the cards left after removing its own two and the board, then weights them by your betting line.
  • It remembers how you play, not what you held. The AI records opponents’ public actions, such as how often they enter pots, raise or respond to bets. It stores no cards, and the Hold’em AI does not even use cards shown at showdown.

Relevant code: server/src/bot.rs (decision input), server/src/session/action_wait.rs (building it), server/src/sealed_dealer.rs (dealer process and the seat check), server/src/bot/strategy.rs and server/src/bot/all_in.rs (equity estimates), server/src/session/hand_play.rs (post-hand AI show).

How tournaments deal

Tournaments shuffle and hold the deck in the game server’s hand engine (server/src/tournaments/table.rs). Table views send hole cards according to the viewer’s seat, and tournament hands have their own history.

To check a hand’s deal yourself, see the Hand Verification Guide. For whether other players can peek at hole cards, see Can Cheats See or Predict Undealt Cards?