AIPokerBot is a small Python poker game project with a built-in AI player trained using Counterfactual Regret Minimization (CFR). It provides a playable game environment and AI utilities for experimenting with simple poker agents.
- Play a simplified poker game via
main.py. - AI implementation and training code under the
AiPlayer/package (CFR based). - Modular game code:
Deck.py,Board.py,Player.py, andgame_logic.py.
main.py— entry point to run the game.Guienv.py— (GUI environment) currently in the repo root.Board.py,Deck.py,Player.py,game_logic.py— core game logic and models.AiPlayer/— AI code, including CFR implementation, training, and helpers.AiPlayer.py,cfr.py,TrainAi.py,policy_visualizer.py, andcfr_policy.json.
- Python 3.8 or newer.
- No external packages are strictly required for the core game; optional packages may be used by AI training visualizers.
- Create and activate a virtual environment (recommended):
python -m venv .venv
.\.venv\Scripts\activate- (Optional) Install packages if you add dependencies:
pip install -r requirements.txtRun the main script to start a game session:
python main.pyThe AiPlayer/ directory contains code for training and visualizing CFR-based policies. See AiPlayer/TrainAi.py and AiPlayer/cfr.py for details.