Georg-S / AlphaZero

An implementation of the Google Deepmind AlphaZero algorithm and some games to test it.
BSD 3-Clause "New" or "Revised" License
3 stars 1 forks source link
ai alphazero chess chess-engine chess-game connect-four deep-reinforcement-learning neural-networks reinforcement-learning tic-tac-toe

This is the implementation of my master's thesis project.

AlphaZero

This project is split up into several sub-projects

  1. AlphaZero

This contains my implementation of the deep reinforcement learning algorithm "AlphaZero" invented by Silver. et. al.

For an in depth explanation, look for the sources linked down below.

Libtorch (the C++ version of pytorch) was used to create the neural networks.

  1. Games

This project contains the implemented Games.

Right now the following games are implemented: Tic-Tac-Toe, Connect Four, Chess

  1. Unit Tests

The unit tests for the AlphaZero and Games project.

  1. Main

This project contains the implementation of a very simple User Interface to access the AlphaZero and the Games project.

Here are some examples of the UI. The main menu:

MainMenu

The connect four main menu:

ConnectFourMenu

The "Play against mini max menu" for connect four:

PlayAgainstMiniMax

The chess game window:

Chess

Installation

Windows

Tested with the following:

Install the following:

Set the following Enviroment Variables:

If you want to build in Debug you must make sure that (in the CMakeLists.txt file in the most upper folder):

If you want to build in Release you must make sure that:

Building

Run cmake_build.bat

If u want to run the project directly out of Visual Studio, you must set the following:

Linux

Tested with the following:

Install the following:

Set the following Enviroment Variable:

Alternatively you could add the path to libtorch to the path variable

Building (Command line)

Main Sources