Skip to content

RoiCorporation/poker-ev-trainer

Repository files navigation

License: MIT

Poker EV Trainer

⚒️ Setup

  1. If you haven't yet, create a virtual environment.
python3 -m venv .venv
  1. Activate the environment.
source .venv/bin/activate
  1. Install the necessary libraries.
pip install -r requirements.txt

🏋🏻 Train the model

There are two scripts that must be run in order to generate the model checkpoints for each of the rounds: build_ev_table.py and trainer.py, in that particular order.

  • build_ev_table.py scans all PHH hand-history files inside a training data folder, groups similar poker decision states into “buckets”, aggregates the hero’s final outcomes per action inside each bucket, and produces an EV lookup table for training the neural network.
  • trainer.py loads PHH-based training data and EV labels, trains a round-specific neural network to predict action EVs, uses early stopping based on validation agreement, and saves the best model checkpoint.

To obtain the model checkpoints, run python build_ev_table.py and then run python trainer.py. All checkpoints will automatically be saved inside the model_checkpoints folder.

🔄 Export models to ONNX format

To export the PyTorch models generated before, run the export to ONNX script with python export_to_onnx.py.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages