A UI for Minigo
-
Make sure you have Docker installed
-
Pick a model from Cloudy Go. Make note of the Model Name and the Board Size.
export MINIGUI_BOARD_SIZE=9 export MINIGUI_MODEL=000360-grown-teal
-
From the root directory, run:
cluster/minigui/run-local.sh
-
Navigate to
localhost:5001
-
Install the minigo python requirements:
pip install -r requirements.txt(orpip3 ...depending how you've set things up). -
Install TensorFlow (here, we use the CPU install):
pip install "tensorflow>=1.7,<1.8" -
Install the minigui python requirements:
pip install -r minigui/requirements.txt -
Install the Google Cloud SDK
-
Pick a model. See http://cloudygo.com/ for the available models.
-
Change the variables you want (these are the defaults):
export MINIGUI_BUCKET_NAME=minigo-pub export MINIGUI_GCS_DIR=v5-19x19/models export MINIGUI_MODEL=000363-auriga export MINIGUI_MODEL_TMPDIR=/tmp/minigo-models export MINIGUI_BOARD_SIZE=19
-
Run
source minigui-common.sh -
Compile the Typescript to JavaSCript. (Requires typescript compiler). From the
miniguidirectory run:tsc -
Run
./fetch-and-run.sh -
open localhost:5001 (or whatever value you used for $PORT).
-
The buttons in the upper right that say 'Human' can be toggled to set which color Minigo will play.
C++ Engine
-
By default, Minigui will use the Python Minigo engine. You can use the C++ engine by first compiling it (see the README), then passing
--engine=ccwhen startingminigui/serve.py. You will need to pass a frozen GraphDef proto as the--modelcommand line argument instead of the saved parameter data that the Python backend requires.Note: Compiling tensorflow from scratch can take 2+ hours if your machine is not terribly beefy, So you might want to kick off the build and get a coffee.
-
Before running, you'll need to freeze a model so the C++ job can consume it. This assumes a converted model from above.
python main.py freeze-graph $MODEL_DIR/$MODEL.converted
-
Here's an example, note that we specify the board size when compiling the C++ engine binary, not when running the Minigui server:
bazel build --define=board_size=19 cc:main python minigui/serve.py --port=8888 --model=$MODEL_DIR/$MODEL.converted.pb --engine=cc