This project features a Blackjack-playing AI developed using a Deep Q-Network (DQN) built with PyTorch. My best model achieves a 47.6% win rate and 6.1% push rate evaluated over 1000 games.
To run this project, you will need:
- Python 3.x (tested on 3.12) or Docker
To use Docker, simply install the repository, build the image, and run the container:
git clone https://github.com/SamuelReeder/blackjack-ai.git
cd blackjack-ai
make allClone the repository and install the required packages:
git clone https://github.com/SamuelReeder/blackjack-ai.git
cd blackjack-ai
pip install -r requirements.txtTo train a new model, use the following command, replacing <model_num> with the desired model number:
python src/run.py <model_num>To evaluate the performance of a trained model, use the same model number with the evaluation script:
python src/eval.py <model_num>
