Skip to content

3rd year Computer Science Project: Reinforcement Learning applied to the card game Hearts

Notifications You must be signed in to change notification settings

FaiZaman/DeepQLearning-for-Hearts

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

74 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

This project applies Deep Q-Learning (DQL) to the card game Hearts

The Project

The aim of this project was to apply a Deep Q-Learning algorithm to a game that is difficult for it to learn purposefully, i.e. a multi-agent imperfect information game. Scores are plotted at the end of the iteration. The Hearts environment was taken from https://github.com/zmcx16/OpenAI-Gym-Hearts and adapted for this project.

Setup & Running

Clone the repository into a local folder. Run the program by navigating to this root folder in the command prompt and typing python main.py. Choose whether you would like to train or test the model at the main menu.

Note that training is most effective when run on a machine with a GPU.

Training

On the Training screen, choose the directory in which to save the model during training. The model is saved automatically to this directory every 100 episodes. Adjust the hyperparameters to any values desired. The default values are the optimal ones.

NOTE - train for a minimum of 10 episodes.

Testing

On the Testing screen, choose the model file to load in for testing, and select the number of episodes to be tested for. Choose any selection of opponents to play against the DQL agent using the dropdown menus.

NOTE - test for a minimum of 10 episodes.

About

3rd year Computer Science Project: Reinforcement Learning applied to the card game Hearts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages