~/vedant_
homeworkprojectsthoughtsabout
Back to all projects

PokerGPT

work in progress
pythonopenaigptpokernlp

An AI poker coach that walks through hands the way a thoughtful human would — strategy, position, equity, and the part where you sit with how uncomfortable folding the right hand actually feels.

the problem

Most poker training tools are either solver output (correct but inhuman) or generic LLM chat (fluent but often wrong about ranges and equity). I wanted something in between: a coach that uses real poker logic for the math, and an LLM only for the parts LLMs are actually good at — explaining concepts, walking through reasoning, and putting decisions in language a human can absorb.

the approach

A two-layer architecture, deliberately:

  • The math layer — a custom hand evaluator and equity calculator written in Python. Hand strength, pot odds, simple range vs. range equity, position-weighted decision suggestions. This part doesn't trust the LLM.
  • The language layer — GPT consumes structured output from the math layer plus the user's question, and produces explanations, follow-ups, and the "what would a pro be thinking here" framing. The LLM never invents numbers; it interprets them.

Frontend is React; Flask + WebSocket on the backend so a hand discussion feels conversational rather than form-based.

a hard decision

The temptation was to let the LLM do the math too — the prompts are simpler that way and the demos look better. I refused, because LLMs are confidently wrong about pot odds in a way that sounds right and corrupts the user's mental model. Slower to build, much more honest in production.

what came out

A working assistant that gives substantive feedback on Hold'em hands, with the math grounded in real poker logic. Still a work in progress on multi-street decision trees and Omaha support.

stack

python · openai api · flask · react · websocket · custom hand evaluator