← Back to Insights
Solver Algorithms14 min read

Why Solvers Treat 6♣️ and 6♦️ as the Same Card: Board Isomorphism Explained

When you open a solve and need to pick a turn card, in theory the engine has to run a separate subtree for each of the 49 possible turn cards. What PokerAlpha (and every modern solver) actually does is group those 49 cards first, compute one representative per group, and let the rest share the result. The engineering trick that makes this possible is called iso (isomorphism).

Iso is one of the rare optimizations that is both a strict mathematical equivalence and a meaningful speedup. It is not approximation. It is not the lossy bucketing of hand abstraction. It is real symmetry compression. Once you see how it works, you have a sharper picture of how solvers turn poker's infinite space into something computable.

Why Are Suits Interchangeable in Poker?

Suits carry no absolute meaning. If you swapped every ♠️ with a ♥️ and every ♦️ with a ♣️ across the entire deck, no game property would change. Flush odds stay identical, equities stay identical, blocker patterns stay identical, even dealing probabilities are symmetric. The math name for this property is suit symmetry: poker is invariant under permutations of suits.

But this symmetry is not always intact. It is intact only relative to the current state. With an empty board, all four suits are perfectly symmetric. Once you fix a parent state that contains Q♠️, the ♠️ suit is fingerprinted by that card and cannot be freely swapped with ♣️ or ♦️ inside that state. Every dealt card breaks part of the symmetry. On Q♠️T♠️7♥️, 6♣️ and 6♦️ are equivalent to each other; but once the representative state is chosen as 6♣️, the ♣️ / ♦️ symmetry changes again for the river, so the engine has to regroup from the four-card board. The job of iso is to recompute, at every chance node, which suit permutations are still equivalent.

Iso is not approximation. It is strict equivalence. Swap every ♣️ for a ♦️ and every ♦️ for a ♣️, and nothing about the game changes: flush probabilities, equities, blocker structure, all unchanged. The solver exploits exactly that symmetry.

What Problem Does Iso Solve?

A turn solve has to run a subtree for each turn card. If we only count public cards, there are 49 possible turns after the flop; once the turn is dealt, 48 possible rivers remain. That is 49 × 48 = 2,352 ordered (turn, river) runouts. If every one of those subtrees had to be solved from scratch, modern solvers would not finish a single spot in any reasonable time.

Iso observes that many of those turns are, from the game tree's point of view, the same situation. On Q♠️T♠️7♥️, as long as no known hole cards, dead cards, or suit-asymmetric range weights break the ♣️ / ♦️ symmetry, dealing 6♣️ and dealing 6♦️ lead to identical games after relabeling suits, because ♣️ and ♦️ are both empty multisets on this board. The solver computes the representative 6♣️ subtree and maps its strategy and EV back to 6♦️ through the ♣️↔♦️ permutation. No recomputation needed.

  • Iso never collapses genuinely different boards: on Q♠️T♠️7♥️, dealing 6♣️ and dealing 6♠️ are still solved separately, because ♠️ is already fingerprinted and cannot be swapped with ♣️.
  • Iso only folds together truly equivalent boards: ♣️ and ♦️ are symmetric here, so 6♣️ and 6♦️ share one subtree.
  • Iso is lossless: after the compressed solve, the strategy can be expanded back to every individual turn card without any loss.

Algorithm Core: Board Canonical Signature

The computational core of iso is the board canonical signature. Take the n+1n+1 cards of (board + new card) and turn them into a hash that is invariant under suit permutations. Two new cards that produce the same signature belong to the same iso class. The procedure is three steps:

  1. List the rank multiset for each of the 4 suits in the card set, e.g. ♠️ = {Q, T}, ♥️ = {7}, ♣️ = {}, ♦️ = {}.
  2. Among the 24 permutations π\pi of the 4 suits, find the one that makes (rank-multiset, ...) lexicographically smallest.
  3. Apply π\pi to relabel suits and hash the result into a 64-bit integer. That is the canonical signature.
sig(B)=h ⁣(minπS4π(B))\mathrm{sig}(B) = h\!\left( \min_{\pi \in S_4} \pi(B) \right)

S4S_4 is the symmetric group on the four suits, π(B)\pi(B) applies permutation π\pi to board BB, and hh is the hash function. Every board in the same iso class minimizes to the same canonical representative, so they all hash to the same value.

The Iso Grouping Loop in C++

PokerAlpha translates the three-step procedure into code; the core loop looks like this:

C++ · iso_group_candidates
std::unordered_map<uint64_t, std::vector<int>> groups;
for (int c : candidates) {
    extended[n_board] = c;
    uint64_t sig = board_canonical_signature(extended.data(), n_board + 1);
    groups[sig].push_back(c);
}

The logic is clean: for each candidate turn card cc, append it to the board, compute the canonical signature of (board + c), bucket cards with the same signature together. The smallest card int in each bucket becomes the representative, the solver only computes that subtree, and every other card in the bucket maps back through its corresponding suit permutation.

Let's Look at GTO Wizard

Theory aside, here is the direct evidence. In GTO Wizard's 100bb heads-up cEV game, same Q♠️T♠️7♥️ flop check-check, swap the turn between 6♣️ and 6♦️, and the aggregated strategy grid is identical apart from the displayed turn card. At combo level, the 6♣️ strategy lines up with 6♦️ after applying the ♣️↔♦️ suit mapping.

TURN 6♣️
GTO Wizard 100bb HU cEV strategy grid on Q♠️T♠️7♥️ flop x-x with turn 6♣️
TURN 6♦️
GTO Wizard 100bb HU cEV strategy grid on Q♠️T♠️7♥️ flop x-x with turn 6♦️
The strategy-grid regions are identical; the only visible difference is the turn-card display in the upper right. That is iso treating 6♣️ and 6♦️ as one class and sharing one subtree through a suit mapping.

When Does Iso Stop Applying?

Iso assumes the symmetry is real. The moment your analysis needs to distinguish what was previously symmetric, the symmetry group has to be recomputed. Otherwise the wrong subtree gets reused and the resulting strategy becomes exploitable.

  • Hold cards matter: if you are solving for "Player A holds A♠️K♠️", ♠️ is fingerprinted by the hole cards, and board ♠️ are no longer symmetric to other suits. The signature has to include hole cards.
  • Multi-flush boards: monotone or two-tone boards leave less symmetry to exploit on the suits already present, but the suits not yet on the board can still be aggressively collapsed.

Using iso correctly comes down to defining the signature input correctly. The signature must consider every piece of information that materially affects the current decision, not just the board: known hole cards, dead cards, suit-specific weights for same-rank combos in the ranges, bunching / card-removal data, and any situation that exposes specific suit information.

What Does This Mean for Players?

For a player studying with a solver, iso explains a phenomenon you have probably already noticed: on Q♠️T♠️7♥️, as long as no extra blocker or range weight breaks the ♣️ / ♦️ symmetry, the 6♣️ strategy and the 6♦️ strategy are identical after suit mapping. That is not the solver being lazy, and it is not a strategy class simplification. It is a strict mathematical equivalence with no EV difference.

That observation flips back into a memory shortcut. When learning the turn strategy on a board, you do not need to memorize 49 reactions. Memorize one strategy per (board, iso class). At the table, 6♣️ and 6♦️ trigger the same response. 6♠️ and 6♥️ need separate handling, because they interact with suits already present on the flop and are not the same iso class mathematically.

References

  1. [1]Libratus: The Superhuman AI for No-Limit Poker - Brown & Sandholm, IJCAI 2017Covers abstraction, nested subgame solving, and self-improvement in a superhuman no-limit poker AI, including the distinction between lossless and lossy abstractions.
  2. [2]postflop-solver (b-inary) - Open-source Rust postflop solverA Discounted-CFR open-source postflop solver whose README explicitly documents isomorphic chances (e.g. on a monotone flop, the three undealt suits are isomorphic and the engine skips redundant calculations).
  3. [3]TexasSolver (bupticybee) - Open-source Texas Holdem solverAnother popular open-source Texas Holdem solver providing flop and turn solving with cross-platform support, useful for cross-checking solver engineering choices.
  4. [4]Cepheus (poker bot) - WikipediaBackground on the Cepheus weak-solution of heads-up limit Texas hold'em, published by the University of Alberta Computer Poker Research Group in Science (2015).
  5. [5]What is a Solver in Poker? - Upswing PokerA player-oriented explanation of what a solver is, what it actually computes, and why it solves slices of NLHE rather than the full game.

Ready to experience AI poker analysis?

Download on the App StoreGet it on Google Play