/AlphaZero

I researched and explained AlphaGo/AlphaGo Zero papers, which had beaten the world the game of Go champion in 2016, 2017. Especially, I applied Alpha Zero algorithm to Othello to catch the whole idea.

Primary LanguagePython

Alpha"Othello" Zero

AZ0

Alpha Zero explanation: here

AZ Alpha Go, DeepMind: here

please run this scripts in Google Colaboratory

  1. Select GPU.

Edit -> Notebook settings -> GPU

  1. Mount your Google Drive
#to access your google drive folder
from google.colab import auth, drive, files, output
drive.mount('/content/drive')
  1. Import the folder from github & setup
#to clone codes
!git clone https://github.com/takehiko-ohkawa/AlphaZero.git
import os
os.chdir('./AlphaZero')
!pwd
!chmod ugo+x ./setup_colab.sh #give a permission
! ./setup_colab.sh #install torch 
  1. Train
!chmod ugo+x ./train_colab.sh
!./train_colab.sh
  • make a folder or copy a folder
#make
!mkdir <folder>
#copy
!cp -r <folderA> <folderB> #copy A->B
  • Overwrite your code
%%writefile oo.py
<contents of oo.py file>
  • Check GPU status
!df -h #desk status
!free -h #memory status
!ps aux #process status
!nvidia-smi #GPU status
!cat /proc/uptime |awk '{print $1/86400"days"}' #remaining time - upto 0.5days
  • Download files
files.download(<file>)

Reference: here

Result

Alpha Zero explanation & result: here

result1

result2

result3

result4

result5

result6

result7

result8

result9