A dependency-free Python playground for an eight-seat, no-limit Texas Hold'em bot. It includes a small simulator, baseline opponents, a custom strategy, seeded benchmarks, and rule tests.
Launch the local web interface:
python ui.pyThen open http://127.0.0.1:8000 in your browser. The interface runs benchmarks
with the same settings and opponents as the command-line tool. Choose a seed to
reproduce a run; multiple runs report the mean and standard deviation. Stop the
server with Ctrl+C.
Run the custom bot for the default 1,000 hands:
python my_bot.pyChoose the hand count and seed for a repeatable run:
python my_bot.py 10000 --seed 42Run several independent seeds and compare the mean and standard deviation in BB/100:
python my_bot.py 10000 --seed 42 --runs 5Print MYBOT's decisions, equity estimates, pot odds, and per-hand net result for a short demonstration:
python my_bot.py 1 --seed 42 --traceRun the simulator's built-in EquityBot instead of MYBOT:
python poker_bot.py 10000 --seed 42Run the regression tests:
python -m unittest -vNo third-party packages are required.
poker_bot.pycontains card evaluation, Monte Carlo equity, practice opponents, the Hold'em hand engine, side-pot settlement, and the tournament runner.my_bot.pycontains MYBOT's preflop and postflop decisions, benchmark options, and optional decision trace.test_poker_bot.pytests hand rankings, pot settlement, equity ties, exception reporting, chip conservation, and seeded repeatability.
Each hand starts with 10,000 chips per seat. Tournament results are cumulative net chips normalized to big blinds won per 100 hands; stacks reset at the next hand. Main pots and side pots are settled separately, and chip totals are checked after every hand.
With a seed, seat order, card deals, action randomness, and equity sampling use separate random streams. This makes repeated runs reproducible and keeps the deal and seat sequences stable when strategy code changes.
MYBOT uses a Chen-style starting-hand score with modest position adjustments before the flop. After the flop, it estimates pot share by Monte Carlo and compares the estimate with pot odds. Observed raises mildly increase the sampling weight of stronger current hands; this is a deliberately simple heuristic, not a calibrated opponent model or a poker solver.
The practice opponents (FOLDBOT, CALLBOT, RANDOM, and MANIAC) are intentionally simple. BB/100 against them is useful for checking changes, but does not predict performance against strong bots. Use multiple runs and read the reported standard deviation as run-to-run variation, not as a confidence interval.
- Stacks reset after every hand; this is not a full elimination tournament with persistent stacks.
- Opponent ranges are only approximated from raise counts and current hand category. The model does not learn player-specific tendencies or represent bluff frequencies accurately.
- The simulator is a local practice harness. The event brief does not specify a bot wire protocol, runtime, or submission format, so this project is not yet a compatible event submission.