Get started
Words and first principles
This page is for a developer who has not worked with a poker solver. Each word below has one meaning in this documentation.
In short
- One solve is one street: a flop, a turn or a river, for two players.
- A range is the hands a player can hold, each with a weight from 0 to 1. You send one range for each player.
- An exit is a line of actions that ends the street with chips behind. The next street starts from one exit and one card.
- The answer is a strategy: for each hand, how often it takes each action, and the EV of each action.
The words, by subject
The game
heads-up, street, board, pot, stack, GTO, chips, rake, ICM
- Heads-up, postflop
- Two players are left in the hand, and the first three shared cards are on the table. This is what the API solves. It does not solve the betting before the flop, and it does not solve spots with three players.
- Street
- One round of betting. There are three after the start of the hand: the flop (three shared cards), the turn (a fourth card) and the river (a fifth card). One solve is one street.
- Board
- The shared cards on the table: three, four or five. A card is a rank and a suit:
Asis the ace of spades,Tdthe ten of diamonds. - Pot
- The chips in the middle at the start of the street.
- Stack
- The chips one player still has at the start of the street. The API takes one number for both players. When the two stacks differ, send the smaller one: a player cannot win more than that from the other.
- GTO
- Game theory optimal: a strategy that the other player cannot beat by a change of his own play. A solver computes a strategy close to it for the spot and the bet sizes you give.
- Chips and big blinds
- The API counts in whole chips. You choose what one chip is. A common choice is ten chips for one big blind: a pot of 6.5 big blinds with 97 big blinds behind is
"pot": 65, "stack": 970. With rake, ten chips for one big blind is the rule. - Rake
- The part of each pot that the house keeps in a cash game: a share of the pot, up to a cap. It changes the best strategy. You can send it with a spot.
- ICM
- Independent chip model: a way to give the chips of a tournament player a value in prize money. In a tournament, a chip you lose costs more than a chip you win gives. You can send these values with a spot.
Hands and ranges
range, hand, out of position, in position
- Range
- The hands a player can hold at this point, each with a weight from 0 to 1. Weight 1: the player always has this hand here. Weight 0.5: half of the time. You send one range for each player. The API does not make ranges: they come from your own study of the betting before this street.
- Hand
- Two cards, such as
AhKh. There are 1,326 hands. A hand class names a group:AKs(ace-king of one suit, 4 hands),AKo(two suits, 12 hands),QQ(a pair, 6 hands).GET /v1/handslists all 1,326 names in the order the API uses. - Out of position, in position
- The player who must act first on each street is out of position (OOP). The other player is in position (IP). The out-of-position player comes first in
ranges.
The betting
action, line, exit, node, node id
- Action
- Check, call, fold, bet or raise. All-in is a bet or raise of all the chips a player has. The API writes each action as a short token:
c,f,b33. See lines and their tokens. - Line
- The actions of one street in order:
["c", "b33", "c"]is check, bet 33 chips, call. - Exit
- A line that ends the street while both players still have chips. The next card comes, and the next street can be solved from there.
- Node, decision
- A node is one point in the betting of a street. A decision is a node where a player must act. The result has one entry for each node.
- Node id
- The name of a node in a result.
r:0is the first decision of the street. Each further part is one action:r:0:c:b33is the decision after a check and a bet of 33 chips.
The answer
strategy, EV
- Strategy
- What the solver returns for a decision: for each hand, how often it takes each action. A hand can mix: bet 78% of the time and check 22%.
- EV
- Expected value: the chips a hand wins on average with one action, when both players play the solved strategy from there.
What is counted
solve, call, credit, request
- Solve, call, credit
- A solve is one street solved. You pay one call for each solve. The API counts calls in fields named
credits: 1 call = 1 credit. One HTTP request can start many solves; a GET is never a call. - Request
- One
POST /v1/solvesand all the solves it starts. The first solve is the root. Budgets and cancel work on the whole request.
First principles
How to choose sizes, iterations and accuracy
- Bet sizes. Each size you add makes the betting tree larger, the solve slower and the result larger. The quick start flop has 27 nodes with one bet size and 39 with two. Start with one or two bet sizes and one raise size. The API takes at most 3 bet sizes and 2 raise sizes for each player. A result above 16 MiB fails: see what a result can leave out.
- Your sizes apply to the street you solve. The solver values play on the streets after it with its own trained models. To see a later street in full, solve it: continue from an exit.
- Iterations.
500is the default.2000runs four times as many steps on the same street and takes longer. The price is the same. Use 500 while you build, and compare the two on your own spots before you choose. - Accurate mode.
"accuracy": "accurate"is for turn solves: the solver looks at every river card. It works without rake and without ICM, with a stack of at most 4 pots. On another street the request is refused. - Results are approximations. A solver computes a strategy close to game-theory optimal play for the tree you give it. Another tree gives another strategy.