A gym where neural networks learn to bluff
An OpenAI Gym environment for Texas Hold'em that lets you train reinforcement learning agents to play poker, complete with Monte Carlo equity calculation and a 500× faster C++ accelerator for the impatient.

What it does
Neuron Poker is an OpenAI Gym-compatible environment for no-limit Texas Hold’em. You instantiate a table, add agents (random, keyboard-controlled, equity-based, or deep Q-learning), and let them play. The environment handles the full game loop, renders a virtual table, and exposes the complete game state as a structured observation dictionary.
The interesting bit
The project ships three equity calculators with a 500× performance spread between them: a slow Python Monte Carlo, a broken NumPy variant (tests failing, help wanted), and a C++ implementation that requires Visual Studio 2019. It’s a rare honest admission of partial failure in a README — the NumPy version “is not yet working correctly” and contributors are explicitly invited to fix it.
Key highlights
- Deep Q-learning agent built on keras-rl with TensorBoard logging and configurable experience replay
- Observation space encodes full table state: community cards, betting history per stage, player positions, stack sizes, and precomputed Monte Carlo equity against 2- and 3-player ranges
- Genetic algorithm example that self-adjusts equity thresholds based on winning performance
- Command-line entry points via
main.pyusing docopt; modern Python packaging withuv - Explicit call for collaborative model contributions with detailed PyCharm-centric contribution workflow
Caveats
- The NumPy Monte Carlo equity calculator has failing tests and is effectively non-functional
- keras-rl dependency suggests legacy Keras; no mention of migration to tf-agents or modern equivalents
- Windows-centric C++ toolchain (Visual Studio 2019) with only a passing note about Cygwin/GCC
Verdict
Worth a look if you’re building poker AI and want a ready-made Gym environment with equity-aware observations. Skip it if you need production-grade Monte Carlo simulation or modern RL frameworks out of the box — you’ll be fixing someone else’s NumPy bugs or wrestling with decade-old dependencies.