/coup-rl

RL agent that learns to play the deception-based board game Coup

Primary LanguagePython

Coup RL

Coup RL is a reinforcement learning agent that learns to play the deception-based board game Coup.

Learn the rules of Coup here.

Coup RL consists of several submodules:

See the results of my training and testing in my Senior Design repo.

Requirements

The project can run on any OS with Python 3 installed that also supports OpenAI Gym and PyQt6. Developed and tested on macOS with Python 3.9.

Installation

First create a virtual environment:

$ cd coup-rl
$ virtualenv env
$ source env/bin/activate

Then install the dependencies:

$ pip install -r app/requirements.txt
$ pip install -r gym-coup/requirements.txt

Build and install the gym environment and RL agents:

$ pip install -e ./gym-coup
$ pip install -e ./rl

Usage

Run the Desktop App

$ python app/main.py

For further usage documentation see the individual modules:

  • Gym Environment - gym-coup
  • Desktop app - app
  • Reinforcement learning agent & algorithms - rl

FAQ

Do I need to install everything?

No. If you aren't going to use the desktop app, you don't need to install PyQt6 and its dependencies. You can ignore the command:

$ pip install -r app/requirements.txt