Employing various methods of Counterfactual Regret Minimization to generate Kuhn, Leduc, and HULH poker AIs.
Those methods being: vanilla cfr (scalar/simultanious, vector/alternating), cfr+, the various sampling forms of mccfr (PCS, OPCS, SPCS, CS), and finally outcome sampling cfr.
it was fun :)
To get a local copy up and running follow these simple steps.
This is an example of how to list things you need to use the software and how to install them.
- pip
pip install terminal-playing-cards
pip install -U scikit-learn
- Clone the repo
git clone https://github.com/EMAT31530/ai-group-project-game-ai-team.git
If you want to train an ai, first cd to the Tests folder in your terminal, then run
python leductest.py 6 1000 0 1
or
python kuhntest.py 1 10000 0 1
The first index specifies the method used, 1: Vanilla CFR (scalar/simultanious), 2: Outcome Sampling Cfr, 3: Chance Sampling, 4: Vanilla (vector/alternating), 5: Public CS, 6: OpponentPublic CS, 7: SelfPublic CS, 8: CFR+. The second index is the number of iterations performed. The third index is if you wish exploitability and various other metrics to be calculated. The fourth index is if you wish to export the trained strategy map to a .Json file, found in Trainer/Strategy.
For more specifics see the various ____test.py files.
You can also play against the AIs within TerminalPlayer by first moving over a strategy to the strategy folder within TerminalPlayer then running
python game.py k AIKuhn
The first index specifies the type of game to play, 'k': Kuhn, 'l': Leduc. The second index is the name of the AI strategy file to use. For more specifics see the file.
Write a better readme.