tejank10 / AlphaGo.jl

AlphaGo Zero implementation using Flux.jl
https://fluxml.ai/experiments/go
Other
73 stars 14 forks source link
alpha-zero alphago flux go julia reinforcement-learning

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:

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

TODO