This repo contains everything required to train and play against 'reasonably sophisticated' poker AIs. It is shared with the intention of being used as a learning playground for aspiring and also seasoned (if you fancy a change of problem domain) AI/ML engineers and researchers.
This project is released under the terms of the Apache 2.0 License.
This was one of many side projects by MattDean and MarcFletcher between 2009 and 2013. Since then we got distracted with life and the code has sat on a shelf ever since.
Back then the field of ML was orders of magnitude less sophisticated than it is today so some of the ML implementations demonstrated here might now be considered out-of-date. Since 2013 we've also learnt a lot about how to create large software projects so please don't judge what still looks like a 'hacky' project, e.g. we don't have many tests which should really exist. "What's a style check?". We'd like to share this sooner, in its current form warts and all, rather than later or never.
There is quite a lot to digest here but the simplest way to start exploring this project is by playing the AIs themselves:
- Clone the repo.
- Download the data files that were too large for git (most even LFS) using this torrent file. We recommend putting these files in the
Resources
folder of the repo. If you put them somewhere else you'll have to change some hardcoded path values in a subsequent step (see below). - Open the
OpenPokerAI.sln
file from the base of the repo using Visual Studio. - Set the
PokerGame
project as your startup project. It should now appear in bold. - If you downloaded the large data files somewhere other than
./Resources/
you need to edithandRanksAbsoluteDir
andwpLookupTablesAbsoluteDir
parameters within thePokerGame > BotGame.cs
file, near the top. - Run/execute the
PokerGame
project. - Select the combination of opponents you would like to play against, up to a total of 9, and click Play Poker. If you want to play yourself remember to include at least one NoAi_Human player. See
AIGenerations.cs
for information about the different players you can pick from. - Have fun playing the AIs.
- Start breakpointing code to work out how their insides work and start to make changes!
Note: If things don't appear to be working check for error log files in your execution path (i.e. Debug/..). If you're still having problems feel free to raise an issue.
GitHub Issues: If you have ideas, bugs, or problems with this project just open a new issue.
We'd love your contributions, even if it's just to help minimise project build warnings. It's as simple as creating a pull request!