This repository contains our source code for our cs2951f project investigating applications of DQN to Gin Rummy. Our group members were Michelle Liu, Evan Lu, and Peter Curtin.
To properly setup your environment, we recommend creating a virtual environment and then installing the requirements in requirements.txt. Keep in mind that this will install the CUDA version of PyTorch,
so you may wish to instead manually install RLCard, PyTorch, NumPy, and statsmodels (only necessary for tables.ipynb according to your system configuration.
src.py contains the source for our learned agents, as well as a human agent that can be used to interface with the environment on Google Colab.
The following scripts can be used to start experiments with a variety of models and should be considered example scripts for various configurations.
All of them are designed to be run as Weights and Biases agents, for example: wandb agent team-name/project-name/sweep-id, where the sweep would specify the executable used.
-
run.pyis a training script for our first attempt at solving the environment with DQN, before using DoubleDQN. -
run-2.pyis a training script for training our$\text{Simple}_{\text{RULE}}$ model. -
run-3.pyis a training script for training our$\text{Rich}_{\text{MIX}}$ model. -
run-lstm.pyis a training script for training ourSeqDoubleDQNAgenton the simplified observation environment. -
run-self.pyis a training script for training our$\text{Simple}_{\text{SELF}}$ model.
Finally, the tables.ipynb file was used to generate several tables in our final report, and requires checkpoints from trained models to function.