DarkForestをUbuntu14.04にインストール.
先日Facebookがオープンソースとして公開した囲碁AI - DarkForest(darkforestGo)をUbutu 14.04にインストールしてみました.
のREADME.mdで説明されています.
darkforestGoのクローン
git clone https://github.com/facebookresearch/darkforestGo.git ~/darkforestGo
Torchのインストール
# install torch mkdir ~/lib curl -s https://raw.githubusercontent.com/torch/ezinstall/master/install-deps | bash git clone https://github.com/torch/distro.git ~/lib/torch --recursive cd ~/lib/torch; ./install.sh source ~/.bashrc th # torchが立ち上がるか確認
Luarocksのインストール
sudo apt-get install luarocks # 途中で質問されるのでYを選択.
各種Luaライブラリのインストール
luarocks install class luarocks install image luarocks install tds luarocks install cudnn
darkforestGoのインストール
cd ~/darkforestGo/ sh ./compile.sh
対局前の準備
mkdir ./models cd models/ wget https://www.dropbox.com/sh/6nm8g8z163omb9f/AAAOsp9WzSQrITY9veSmOA1pa/df1.bin?dl=0 -O df1.bin wget https://www.dropbox.com/sh/6nm8g8z163omb9f/AACZwAeb0OOCReoeIWPRgILta/df2.bin?dl=0 -O df2.bin wget https://www.dropbox.com/sh/6nm8g8z163omb9f/AABrO3wRZ5hLOk70gmu3rK7Ja/LICENSE?dl=0 -O LICENSE wget https://www.dropbox.com/sh/6nm8g8z163omb9f/AABcYJKMOl6-Uol98boGa7n5a/playout-model.bin?dl=0 -O playout-model.bin cd ../local_evaluator/ sudo mkdir -p /data/local/go sudo chmod 666 /data/local/go sh cnn_evaluator.sh 1 /data/local/go cd ~/darkforestGo/cnnPlayerV2/ th cnnPlayerMCTSV2.lua --num_gpu 1 --time_limit 10
対局開始
clear_board genmove b
ちなみにGoGuiでも動作するみたいです.
References
- [1]. [Vagrant上のUbuntuでTorch7のCPU開発環境を作る](http://kakakazuma.hatenablog.com/entry/2015/08/18/141927)