Skip to main content

A reinforcement learning environment based off the board game Risk

Project description

A reinforcement learning environment based off the board game Risk. Designed with reinforcement learning in mind, this project aims to streamline research for economy-based games.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Dependencies

  • numpy <= 1.14

  • pygame <= 1.9

User installation

The easiest way to install this package is through PyPi

pip install rlrisk

Otherwise you can manually install this package by cloning the repository to your local computer

git clone https://github.com/civrev/RLRisk

Then navigate to that directory and run setup.py

python setup.py install

Working with RLRisk

RLRisk was a project concieved to streamline research by coding an environment already friendly to reinforcement learning techniques. As such working with RLRisk is extremely easy.

The Environment

The environment is the standard Wolrd Domination game rules for Risk by Hasbro. You can find these rules here: https://www.hasbro.com/common/instruct/risk.pdf

The environment is located in the file risk.py and is implemented using the class Risk(). The class is flexible enough to be initiallized with extremely custom rules, but for the most common game of Risk you can create a Risk object using only a list of players

from rlrisk.agents import *
from rlrisk.environment import *

players = [BaseAgent(), AggressiveAgent()]
env = Risk(players)
results = env.play()

Agents

RLRisk comes with 3 agents, the BaseAgent, Human, and AggressiveAgent classes. All new agents must be subclasses of the BaseAgent class, but looking at the BaseAgent will show you that the framework of agents for RLRisk is very straight forward. It takes in the information it need to make a decision, and then it outputs a decision.

Final Remarks

This is my Senoir Project for my B.S. in Computer Science at the University of North Georgia (Graduating May, 2018)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

rlrisk-1.0.2.3-py3-none-any.whl (984.3 kB view details)

Uploaded Python 3

File details

Details for the file rlrisk-1.0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for rlrisk-1.0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 8078edeeb6e69b9fe4299b65f3d98510f9be20cadce9f94af266bfa0b8e85769
MD5 f6ed014731a85b0d2e61310c836ec4f9
BLAKE2b-256 78e48c617db01e8ac3257c1d42b09aa9a730791d937960da2d5183baef348ffc

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page