Git Product home page Git Product logo

checkers-game's Introduction

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

checkers-game's People

Contributors

nedeljkovignjevic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Forkers

gernest johnpapad

checkers-game's Issues

training bot

how can you train this bot ? because i played with this Ai and is weak
icon

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.