Skip to content

Mowibox/Checkers-RL

Repository files navigation

Checkers-RL

A reinforcement learning agent capable of solving checkers.

License: MIT Python Reinforcement Learning Issues

checkers_env

Table of contents

Section Description
Project overview General description of the reinforcement learning checkers project
Author Main contributors information
Documentation Links to detailed documentation and presentation materials
How to use Instructions for installation and command-line usage
Contributions How to contribute to the repository
References Scientific references
License Licensing information

Project overview

This repository proposes a reinforcement learning-based approach to train an agent capable of playing checkers. The goal is to develop a model that can adapt to the game complexity by using some advanced reinforcement learning algorithms. The project provides tools to train, evaluate and visualize the agent performance, as well as to allow human to play against the trained agent [1].

Author

@Mowibox
Ousmane THIONGANE

Documentation

The environment details are specified in the documentation wiki. A short presentation of the RL approaches used is also available in the 'docs/' folder.

How to use

Download the repository:

git clone https://github.com/Mowibox/CheckersRL.git

Download the necessary packages:

pip install -r requirements.txt

Run inside the repository:

python3 main.py [options]

    usage: main.py [-h] [--render] [-t TRAIN] [-e] [--human [HUMAN]]

    options:
        -h, --help            show this help message and exit
        --render              Enable rendering
        -t TRAIN, --train TRAIN
                                Train the RL model
        -e EVALUATE, --evaluate EVALUATE
                                Evaluate the provided RL model (Use 'random'/'mcts'/'model
                                filepath')
        --human [HUMAN]       Allows human to play against computer [w, b] (default: w)

Command-line examples

Train a TD(λ) Linear Value Function Approximation model named model.pkl:

python main.py --train model.pkl

Evaluate a random agent:

python main.py --evaluate random

Evaluate a TD(λ) LVFA model:

python main.py --evaluate model.pkl

Evaluate a Monte-Carlo Tree Search (MCTS) agent:

python main.py --evaluate mcts

See the evaluation episode:

python main.py --evaluate model.pkl --render

Play against the agent (white pawns by default):

python main.py --evaluate model.pkl --human

Contributions

Contributions are always welcome!

  • Report Issues: Found a bug or have a feature request? Create a new issue here.
  • Fix Bugs & Add Features: Find out where you can lend a hand by checking out existing issues.

References

  • [1] Neto, H.C., Julia, R.M.S., Caexeta, G.S. et al. LS-VisionDraughts: improving the performance of an agent for checkers by integrating computational intelligence, reinforcement learning and a powerful search method. Appl Intell 41, 525–550 (2014). https://doi.org/10.1007/s10489-014-0536-y

License

This project is licensed under the MIT License. See the LICENSE file for more details.

About

A reinforcement learning agent capable of solving checkers.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Contributors

Languages