Giter Club home page Giter Club logo

gomoku-zero's Introduction

Gomoku-Zero

A gomoku AI based on Alpha Zero paper.

Requirements

  • Keras
  • Tensorflow(as keras backend)
  • Flask(For browser frontend)

requirements.txt is included in the root folder, type pip install -r requirements.txt in shell to auto install requirements.

Quick Start

There's no trained model included in repo at the moment. So you need to manually train your own model.

Auto Train

Run python autotrain.py to start training. Based on config, a number of games will be played during single training phase, and then all available game history will be used as training input. After the model training, some old game history will be removed.

You can configure settings in ./configs/normal.py

Edit Config

Config info is under ./configs/normal.py. Most configs are commented so it's easy to understand.

Play with AI

Run python playwithme.py To start play with AI, using a ugly cmd interface.

Play with AI in browser

If you have Flask installed, runpython app.py and a Flask backend will start, which accepts ajax requests.

Open ./BrowserUI/index.html, and you can play with AI. DO NOT OPEN localhost or 127.0.0.1 in your browser, nothing will happen, since app.py is only a backend which receives requests.

If you've changed the game board size, you need to edit the var rowNum in line 3 of ./BrowserUI/index.js to match your game board size during training.

References

[1] Silver, David, et al. "Mastering the game of go without human knowledge." Nature 550.7676 (2017): 354.
[2] Reversi-Alpha-Zero

gomoku-zero's People

Contributors

dependabot[bot] avatar yangrc1234 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

gomoku-zero's Issues

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.