Build a poker trainer on the Solver API
A trainer needs three things from a solver: the right answer for a spot, how often each action is taken, and how much a mistake costs. One POST /v1/solve gives all three, for the hand the player holds.
Plan that fits: Free while you build, Builder or Pro in production. See pricing.
How it fits together
- Pick a spot: a hand at a table you describe (seats, stacks, rake, ante, straddle; mode "hand") or your own ranges, board and bet sizes (mode "ranges").
- Deal the player a hand from the range of the player to act (the response lists every hand class with its weight).
- Ask what they do. Look their hand up in hands: its strategy gives each action’s frequency, ev_bb the hand’s EV.
- Grade the answer: an action the solver takes often is right; one it never takes is a mistake, and the EV gap is its cost.
One request, every hand answered
Ask for detail "classes" (169 hand classes) or "combos" (every combo) once per spot and cache the answer: every player who sees that spot is graded from it, so a quiz with 200 spots costs 200 solves, not one per answer.
Request
{
"mode": "hand",
"table": {
"max_seats": 6,
"seats": [
{
"seat": "UTG",
"stack_bb": 100
},
{
"seat": "HJ",
"stack_bb": 100
},
{
"seat": "CO",
"stack_bb": 100
},
{
"seat": "BTN",
"stack_bb": 100
},
{
"seat": "SB",
"stack_bb": 100
},
{
"seat": "BB",
"stack_bb": 100
}
],
"rake": {
"pct": 5,
"cap_bb": 0.6
},
"ante_bb": 0,
"straddle": false
},
"streets": {
"preflop": [
{
"seat": "UTG",
"type": "fold"
},
{
"seat": "HJ",
"type": "fold"
},
{
"seat": "CO",
"type": "fold"
},
{
"seat": "BTN",
"type": "raise",
"to_bb": 2.5
},
{
"seat": "SB",
"type": "fold"
},
{
"seat": "BB",
"type": "call"
}
],
"flop": {
"cards": [
"Jh",
"9s",
"4d"
],
"actions": [
{
"type": "check"
}
]
}
},
"detail": "classes"
}Grading a hand
Python
answer = client.solve(spot) # cached per spot
hand = answer["hands"]["AJo"] # the player's hand class
picked = "bet 1.82" # what they chose
freq = hand["strategy"].get(picked, 0)
best = max(hand["strategy"], key=hand["strategy"].get)
if freq >= 0.5: verdict = "correct"
elif freq > 0.05: verdict = "mixed: the solver also plays it"
else: verdict = f"mistake: the solver mostly plays {best}"Things to know
- Mode "hand" takes your table as you describe it (2 to 9 seats) and plays from preflop to the river, two or three players after the flop (three on a prototype). Each answer says in quality how close it is to your exact table.
- Mode "ranges" covers any flop, turn or river with up to three bet sizes and two raise sizes.
- Every street after preflop is solved live in mode "hand", with strategies and EVs on the flop, turn and river.
Questions
Can players see the answers live during a real game?
No. The API is for study tools. Answers for a hand being played for money are against the API terms.