jonathan-laurent / AlphaZero.jl

A generic, simple and fast implementation of Deepmind's AlphaZero algorithm.

Home Page:https://jonathan-laurent.github.io/AlphaZero.jl/stable/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Tutorial to setting up solving your own game

smart-fr opened this issue · comments

A very noob question I guess: could someone please detail the steps to follow in order to setup a customized AlphaZero Julia environment that can solve my own game? I thought I followed all instructions from https://jonathan-laurent.github.io/AlphaZero.jl/dev/tutorial/own_game/, but when I want to run a simple test with:

import AlphaZero
AlphaZero.Scripts.test_game("bonbon-rectangle")

I get ERROR: LoadError: KeyError: key "bonbon-rectangle" not found.
Although I have added the "bonbon-rectangle" folder with my game implementation in AlphaZero.jl/games, customized AlphaZero.jl/src/examples.jl, AlphaZero.jl/scripts/mcts.jl and AlphaZero.jl/scripts/minmax.jl to mention it, and changed the uuid in AlphaZero.jl/Project.toml.

Moreover, running:

import AlphaZero
AlphaZero.Examples.experiments

shows the original 4 game examples; mine is missing despite the customizations.

I noticed a folder ~/.julia/packages/AlphaZero/, where AlphaZero sources are replicated, likely during compilation. The sources I find here are not the same as the ones in my working directory, which I customized with my game. They are the original sources from the v0.5.4 repository. Hence, I am not surprised why import AlphaZero doesn't import "my" customized AlphaZero package.

I am now wondering what I should do in order to "activate" my customized version.
I read Julia code loading reference. It doesn't help me understand. I must be missing some obvious step, but which?
(Apologize for the noob question. Maybe the answer could help other Julia beginners. 😉)

Issue resolved: I just had to point to my customized version when adding the AlphaZero package through the Pkg manager, from its parent directory:
]add ./AlphaZero.jl
Hope it helps another Julia beginner.