GithubHelp home page GithubHelp logo

nowozin / alphago.jl Goto Github PK

View Code? Open in Web Editor NEW

This project forked from tejank10/alphago.jl

2.0 0.0 0.0 94.74 MB

AlphaGo Zero implementation using Flux.jl

Home Page: https://fluxml.ai/experiments/go

License: Other

Julia 99.11% CSS 0.21% JavaScript 0.68%

alphago.jl's Introduction

AlphaGo.jl

AlphaGo.jl is pure Julia implementation of AlphaGo Zero using Flux.jl.

Installation

To install this package simply run

pkg> add https://github.com/tejank10/AlphaGo.jl

Usage

using AlphaGo

Making an environment of Go is simple
env = GoEnv(9)
Here 9 is the size of board i.e., a 9x9 board is created.

   A B C D E F G H J  
 9 . . . . . . . . . 9  
 8 . . . . . . . . . 8  
 7 . . . . . . . . . 7  
 6 . . . . . . . . . 6  
 5 . . . . . . . . . 5  
 4 . . . . . . . . . 4  
 3 . . . . . . . . . 3  
 2 . . . . . . . . . 2  
 1 . . . . . . . . . 1  
   A B C D E F G H J  
Move: 0. Captures X: 0 O: 0  
To Play: X(BLACK)  

Training is done using train() method. train() method is used by the user to train the model based on the following parameters:

  • env
  • num_games: Number of self-play games to be played Optional arguments:
  • memory_size: Size of the memory buffer
  • batch_size
  • epochs: Number of epochs to train the data on
  • ckp_freq: Frequecy of saving the model and weights
  • tower_height: AlphaGo Zero Architecture uses residual networks stacked together. This is called a tower of residual networks. tower_height specifies how many residual blocks to be stacked.
  • model: Object of type NeuralNet
  • readouts: number of readouts by MCTSPlayer
  • start_training_after: Number of games after which training will be started

The network can be tested to play against humans by using the play() method. play() takes following arguments:

  • env
  • nn: an object of type NeuralNet
  • tower_height
  • num_readouts
  • mode: It specifies human will play as Black or white. If mode is 0 then human is Black, else White.

TODO

  • Structure for memory buffer
  • GUI

alphago.jl's People

Contributors

tejank10 avatar roboneet avatar keno avatar

Stargazers

Nikolaos Dionelis avatar Nikolaos Dionelis avatar

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.