Giter Club home page Giter Club logo

alphagomokuzero's Introduction

AlphaGomokuZero

An illustration program which visualizes CNN filters inside AlphaZero and its MCTS mechanism in order to provide a better understanding of how an AI makes decisions. Based Tensorflow and Tkinter. Exhibited at China Science and Technology Museum. 一个通过可视化Alphago Zero中的MCTS机制来解释AI决策方式的程序。展出于**科技馆。

Screenshots

2.jpg 3.jpg

Training

The training module is based on https://github.com/junxiaosong/AlphaZero_Gomoku. I experimented numerous models and added a multi-thread training scheme for the policy value net.

training
├── main.py                             Main script.
└── src
    ├── __init__.py
    ├── human_play.py                   A simple command-line client for human play.
    ├── model
    │   ├── __init__.py
    │   ├── game.py                     Defines rules of Gomoku Game.
    │   ├── inception_resnet_v2.py    
    │   ├── mcts_alphaZero.py           AlphaZero player.
    │   ├── mcts_pure.py                MCTS player.
    │   ├── pvn_inception.py            inception version of the policy value net.
    │   ├── pvn_resnet.py               resnet version of the policy value net.
    │   └── resnet.py
    ├── train_pipeline.py               Training pipeline.
    ├── train_thread.py                 A single training thread.
    └── utils.py                        Utilities.

Demonstration

Illustration program with GUI. Allows users to play game with AlphaZero and see visualizations of Monte Carlo Tree Search. Implemented with Tkinter on python3.

GUI Structure

GameApp
├── WelcomeScene                        Welcome Screen.
├── OrderSelectionScene                 Scene for selecting play order.
├── GameScene                           Game Screen.
├── IdleScene                           Displayed when game is not played.
└── ThinkScene                          Displays visualizations of MCTS.

Directory Stucture

demonstration/
├── Main.py                             Main script.
├── img                                 Store image resources.
├── mdl                                 Store trained models
├── src
│   ├── GameApp.py                      
│   ├── GameScene.py
│   ├── IdleScene.py
│   ├── OrderSelectionScene.py
│   ├── ThinkScene.py
│   ├── WelcomeScene.py
│   ├── __init__.py
│   ├── components                      UI components.
│   ├── config.py                       Configurations.
│   ├── model                           Basic models of game and AI.
│   │   ├── CrossPoint.py
│   │   ├── Gomoku.py
│   │   ├── MCTS_AlphaZero.py
│   │   ├── MCTS_Pure.py
│   │   ├── PVN_11.py
│   │   └── __init__.py
│   └── play_data.py                    Data structure used to store play data.
└── static                              Place to store play data

alphagomokuzero's People

Contributors

yzhq97 avatar

Stargazers

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

Watchers

 avatar

alphagomokuzero's Issues

算法请教

如果要增加悔棋功能,mcts算法需要改变吗,要怎样退回前n步的state?

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.