Skip to content
An RL-trained Backgammon agent
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
amca add infastructure for future imporvement of HumanAgent Jan 9, 2019
tests minor updates + finish board def; should actions be moved to game? Dec 4, 2018
.gitattributes
.gitignore add train.py and play.py, add continuous envs for ddpg, gail, and sac. Jan 4, 2019
LICENSE Follow KR's Python Package Template Nov 27, 2018
MANIFEST.in Follow KR's Python Package Template Nov 27, 2018
README.rst
play.py reorganize, include SARSA implementation Jan 8, 2019
requirements.txt documentation and structure updates. Jan 5, 2019
sarsa_play.py update readme, add scripts tp play and train SARSA algorithm Jan 8, 2019
sarsa_train.py update readme, add scripts tp play and train SARSA algorithm Jan 8, 2019
setup.py catch up with master commits + yusuf's updates Jan 1, 2019
train.py reorganize, include SARSA implementation Jan 8, 2019

README.rst

Amca

Status: Under construction.

Amca is an RL-based Backgammon agent.

Dependencies

Dependency Version Tested On
Ubuntu 16.04
Python 3.6.8
numpy 1.15.4
gym 0.10.9
Stable Baselines 2.4.0a

About

This project aims to design Backgammon as a reinforcement learning problem, and gauge the performance of common deep reinforcement learning algorithms. This is done by training and gauging the performance of three popular and powerful RL algorithms:

The testing is done with the default parameters and implementations provided by the Stable Baselines library for all the 3 deep RL algorithms. A custom implementation heavily modified from this repo is used for SARSA, and the hyperparameters are given in the SarsaAgent object.

Usage

  • play.py: to launch a game against a deep RL trained model. For example, python play.py ppo amca/models/amca.pkl will launch the model called amca.pkl that was trained using the PPO algorithm.
  • train.py: to train an deep RL model (with default hyperparameters) to play. For example, python train.py -n terminator.pkl -a sac -t 1000000 will train an agent called terminator.pkl using the SAC algorithm for 1000000 steps.
  • sarsa_play.py: to launch a game against a SARSA trained model. python sarsa_play.py r2d2.pkl will launch the model called r2d2.pkl that was trained using the SARSA algorithm.
  • sarsa_train.py: to train a model using SARSA. For example, python sarsa_train.py jarvis.pkl -g 10000 will train an agent called jarvis.pkl using the SARSA algorithm for 10000 games.

License

GNU General Public License v3.0

You can’t perform that action at this time.