Implementation of checkers (draughts) strategy board game with AI based bot
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.
-> 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.
- python 3
- python-chess
- flask
- numpy
- pytorch
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)
- Dataset -> http://www.fierz.ch/download.php
- Format -> http://www.bobnewell.net/filez/reinfeld2ndedition.pdf
- ML update -> http://www.bobnewell.net/nucleus/checkers.php?itemid=1177
- TD -> https://www.researchgate.net/publication/221185124_Temporal_Difference_Approach_to_Playing_Give-Away_Checkers
- TD -> http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.80.6366&rep=rep1&type=pdf
- https://www.researchgate.net/publication/3302690_Evolving_neural_networks_to_play_checkers_without_expert_knowledge