This repository provides a Python-based environment for developing and testing poker-playing bots. It includes a game engine, a bot template, and example implementations.
- Python 3.12.2 -- Using a different version may result in runtime or compatibility issues.
- TKinter -- Python's primary graphics library. You won't be able to run
main.pywithout it
git clone <repository-url>
cd <repository-name>curl -sSL https://install.python-poetry.org | python3 -(Invoke-WebRequest -Uri https://install.python-poetry.org -UseBasicParsing).Content | py -The Poetry install script does not add the executable to your PATH. To use Poetry, you must either specify the full path to the executable ($HOME/.local/bin for Unix, %APPDATA%\Python\Scripts on Windows), or add it to your path
If you're on Linux, run this to add it to your path
echo -e "\n\nPATH="\$PATH:$HOME/.local/bin"" >> ~/.bashrcWith Poetry installed, it will give you an easy command to activate the project env
# Create the project env
poetry env use <path/to/python3.12>
# Activate the env
$(poetry env activate)It is recommended to use a virtual environment.
python3.12 -m venv venvvenv\Scripts\activatesource venv/bin/activate# Poetry
poetry install
# Venv
pip install -r requirements.txtExecute the main driver script:
python main.pyThis runs a game simulation using the bots currently configured in main.py.
Bots participating in a match are defined in main.py. To test your own bot:
-
Create or modify a bot file (see below)
-
Import your bot into
main.pyfrom bots import ConservativeBot, RandomBot, YourBotClassName
-
Replace or add it to the list of active players
bots = [ ConservativeBot("Conservative_1"), RandomBot("Random_1"), RandomBot("Random_2"), ConservativeBot("Conservative_2"), ]
Use bot_template.py as the starting point.
- Copy or rename
bot_template.py - Implement your strategy within the provided structure
- Ensure your bot adheres to the expected interface defined in the template
Your bot logic should:
- Accept the game state as input
- Return a valid action (e.g., fold, call, raise)
- Execute without errors under all game conditions
Before using your bot in competition or evaluation:
- Run multiple simulations via
main.py - Test against the provided example bots
- Verify stability (no crashes or invalid actions)
- Only one bot file should be used per submission or evaluation run
- If you DO submit multiple bots you may only enter one in the competition
- You must do so before the tourney starts
- If your bots take several winning places, the most winning is the only one which counts, and all other bots will be ignored/dq-ed
- If your bot crashes the simulation it will be removed from play and you will be disqualified from earning the prize
- The framework assumes all bots conform to the template interface
- Modifying core engine files is not recommended unless necessary for local testing