Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AIPokerBot

Screenshot 2025-12-19 165435

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.

Screenshot 2025-12-23 000035 Screenshot 2025-12-22 235944

Features

  • 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, and game_logic.py.

Repository Structure

  • 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, and cfr_policy.json.

Requirements

  • Python 3.8 or newer.
  • No external packages are strictly required for the core game; optional packages may be used by AI training visualizers.

Installation

  1. Create and activate a virtual environment (recommended):
python -m venv .venv
.\.venv\Scripts\activate
  1. (Optional) Install packages if you add dependencies:
pip install -r requirements.txt

Running the Game

Run the main script to start a game session:

python main.py

Training the AI

The AiPlayer/ directory contains code for training and visualizing CFR-based policies. See AiPlayer/TrainAi.py and AiPlayer/cfr.py for details.

About

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages