Giter VIP home page Giter VIP logo

multiagentchess's Introduction

Can Chess Piece Agents with Imperfect Information Learn to Checkmate?

This repository contains the code for our coursework in COMP0124 Multi-Agent Artificial Intelligence at UCL. The project is a chess game where the agents have imperfect information about the board state. The agents are trained using reinforcement learning to play the game.

Prerequisites

This project requires two datasets omitted from this repository due to their size. The datasets are available at the following links:

Please note that the second dataset is compressed and requires the zstd tool to decompress it. The tool can be installed using the following command:

sudo apt-get install zstd

Furthermore, a version of Stockfish is required to generate the training data. The Stockfish binary can be downloaded here and must be placed in the Dataset/stockfish/ directory

Python 3.8 or later is required to run the code. The code has been tested on Python 3.10.0.

Running

All of the Python packages required to run can be found in the requirements.txt file. To install the required packages, run the following command:

pip3 install -r requirements.txt

NOTE: All of the following code will be very time-consuming to run. We recommend running the code on a machine with a GPU.

To setup the training and testing datasets, run the following command:

python3 setup_file.py

To train the agents for Simple Q-Learning, run the following command:

python3 simpleq.py

To train the agents for Deep Q-Learning, run the following command:

python3 deepq.py

To plot the results of the training, run the following command:

python3 plotter.py

Note: simpleq.py has precautions for easy rerunning if the training is interrupted. deepq.py does not have this feature however, do to the necessity of replay memory and target networks.

multiagentchess's People

Contributors

slushiegoose avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.