Skip to content

Latest commit

 

History

History
49 lines (40 loc) · 2.29 KB

README.md

File metadata and controls

49 lines (40 loc) · 2.29 KB

Checkers game

Implementation of checkers (draughts) strategy board game with AI based bot

check

This project is intended to showcase the ability of neural networks to learn to play a game of checkers.
The trained network is used to guide a search algorithm - minimax with alpha-beta pruning
to select the most promising moves in games.

Neural network is used for evaluating the board state, it takes board state as input and outputs value between -1 and 1
(values close to -1 -> white wins, values close to 1 -> black wins). AlphaZero introduced this as "value network".

Currently, neural network is just MLP (multilayer perceptron) model with 6 hidden layers:
-> 32 neurons for input layer | 64, 64, 128, 128, 256, 256 for hidden layers and 1 neuron for output layer

I'm working on temporal difference learning method (TD leaf) that seems way better then MLP atm
(need some time to fully-train the model).

Main idea is to use supervised learning to (pre)train some model and then to improve that model with self-play, what DeepMind did with AlphaZero.

Dataset used for training

-> http://www.fierz.ch/download.php

About 20000 games, results are mostly draw (about 14000) - not so great for neural nets but i can't find better one atm.

Requirements

  1. python 3
  2. python-chess
  3. flask
  4. numpy
  5. pytorch

Usage

1. python main.py  # runs web server on localhost:5000
2. Web browse to localhost:5000

At this phase game does not support (interface) validation and multiple jumps so dont use it right now :)
Console version is fully featured (it supports validation and multiple jumps)

References