This is a playground for poker. The goal is to create a poker game that can be played by multiple computer players.
There are multiple objectives for this project:
- simulate a poker game
- create a poker file format to save games and states
- create poker AIs with different strategies and play them against each other
- create an environment to train poker AIs
- create an API to allow anybody to create their own poker AIs
In order to ensure that all developers use the same environment, we use docker. This will avoid many problems with different versions of libraries and compilers. We will carry out the development using VSCode's Remote Development extension. This will allow us to do all our coding, compiling and testing inside a docker container.
If you are not using VSCode, you need to skip step 2 and instead of steps 5-8, you need to research how to attach to a docker container from your IDE.
- Install docker and git
- Install VSCode's Remote Development extension pack
- Clone this repository to your local machine:
cd <your workspace folder> git clone https://github.com/Duzzuti/poker-workshop.git
- Set up the docker container:
cd <your workspace folder>/poker-workshop docker build -t poker-workshop . docker run --name poker-workshop -h poker-workshop-container -v .:/home/dev/poker-workshop -it poker-workshop
- Open the poker-workshop folder with VSCode
- Open the
Remote Explorer
tab in VSCode - Right click on the
poker-workshop
container and clickAttach to container
- Install the required extensions in the container (C/C++, CMake)
If you followed the docker setup, you can generate the docs easily:
- You have to be in the container shell
- You have to be in the poker-workshop folder
bash gen_doxy.sh
or generate them manually:
doxygen doxygen_config
Now you should have a html
folder in the working directory. Open the html/index.html
file in your browser to view the docs.
We are using a Game class to simulate one set of poker games. The game class is responsible for the game loop and the game logic. Every time a Player has to make a turn, it calls the player´s turn
method with the Data struct, which holds all information about the game. The game class simulates a Deck of cards. Who wins the showdown is determined by the Handstrength of the players.
There are several implemented Players with different strategies.