Code Monkey home page Code Monkey logo

iago's Introduction

What is IaGo?

IaGo is an Othello AI using SL(supervised learning) policy network, value network, and MCTS(Monte Carlo tree search) inspired by AlphaGo.
Short description in English:
IaGo: an Othello AI inspired by AlphaGo
Description in Japanese:
AlphaGoを模したオセロAIを作る(1): SLポリシーネットワーク - Qiita
AlphaGoを模したオセロAIを作る(2): RLポリシーネットワーク - Qiita
AlphaGoを模したオセロAIを作る(3): バリューネットワーク - Qiita
AlphaGoを模したオセロAIを作る(4): モンテカルロ木探索 - Qiita

How to play?

  1. Install chainer
    $ pip install chainer

  2. Download this repository
    $ git clone [email protected]:shionhonda/IaGo.git

  3. Move to IaGo directory and execute game.py
    $ python game.py
    You can set following options:
    --auto=False or --a=False
    If this is set True, autoplay begins between SLPolicy and PV-MCTS, and if False (default), the game is played by you and PV-MCTS.
    The thinking time is 10 seconds.

  4. When placing a stone, input two numbers separated by comma. For example:
    4,3
    The first number corresponds to the vertical position and the second to the horizontal (one origin).

How to train?

  1. Download data from http://meipuru-344.hatenablog.com/entry/2017/11/27/205448
  2. Save it as "IaGo/data/data.txt"
  3. Augment data
    $ python load.py
    You need at least 32MB RAM to complete this step.
  4. Execute train_policy.py to train SL policy network.
    $ python train_policy.py --policy=sl --epoch=10 --gpu=0
    You need GPUs to complete this step. It will take about 12 hours.
  5. Execute train_policy.py to train rollout policy.
    $ python train_policy.py --policy=rollout --epoch=1 --gpu=0
    This is fast.
  6. Execute train_rl.py to reinforce SL policy network with REINFORCE (a kind of policy gradients).
    $ python train_rl.py --set=10000
  7. Execute train_value.py to train value network.
    $ python train_value.py --epoch=20 --gpu=0
  8. Training done!

Acknowledgements

Special thanks to:
@Rochestar-NRT for replication of AlphaGo (especially MCTS).
@lazmond3 for giving lots of feedbacks!

iago's People

Contributors

shionhonda avatar

Stargazers

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

Watchers

 avatar  avatar

iago's Issues

盤面がみづらい

以前の版では盤面はマスの高さと横幅が同じで観やすかったのですが、さきほどcloneしたところ、横幅のほうが大きくなってしまっていて、対角線のコマの利きが見づらいです。

よろしくお願いします。
image

where's APV?

i don't find the implement of asynchronous means, where's it ,thx

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.