Last active
November 14, 2018 08:40
-
-
Save vochicong/b68a2a6794b2951e2b17d517a82ac243 to your computer and use it in GitHub Desktop.
MacでAlpha ZeroライクのLeela Chess を動かし、lichessでネット対戦 ref: https://qiita.com/vochicong/items/b6a3ca57a2fd11461f46
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone -b release --recurse-submodules \ | |
https://github.com/LeelaChessZero/lc0.git | |
$ cd lc0 | |
$ brew install python3 meson ninja | |
$ ./build.sh # ビルド | |
$ ./build/release/lc0 # 軽く動作確認 | |
v0.19.0-rc4 built Nov 14 2018 | |
Ctr^C で終了 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ git clone https://github.com/careless25/lichess-bot.git | |
$ cd lichess-bot | |
$ pip3 install virtualenv | |
$ virtualenv .venv -p python3 | |
$ source .venv/bin/activate | |
$ pip3 install -r requirements.txt | |
$ cp config.yml.default config.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diff -b config.yml* | |
1c1 | |
< token: "取得したトークン" # lichess OAuth2 Token | |
--- | |
> token: "xxxxxxxxxxxxxxxx" # lichess OAuth2 Token | |
6,7c6 | |
< name: "lczero" # binary name of the engine to use | |
--- | |
> name: "engine_name" # binary name of the engine to use | |
11,12c10,11 | |
< lczero: # lczero specific settings | |
< weights: "engines/latest.txt" # weights file path | |
--- | |
> # lczero: # lczero specific settings | |
> # weights: "engines/latest.txt" # weights file path | |
46c45 | |
< abort_time: 120 # time to abort a game in seconds when there is no activity | |
--- | |
> abort_time: 20 # time to abort a game in seconds when there is no activity | |
54,55c53,54 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ source .venv/bin/activate | |
$ python3 lichess-bot.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-11-14 16:59:08,208: . _/| | |
. // o\ | |
. || ._) lichess-bot 1.1.0 | |
. //__\ | |
. )___( Play on Lichess with a bot | |
2018-11-14 16:59:09,844: Welcome aifun! | |
2018-11-14 16:59:09,844: You're now connected to https://lichess.org/ and awaiting challenges. | |
2018-11-14 16:59:11,138: --- Process Used. Total Queued: 0. Total Used: 1 | |
2018-11-14 16:59:11,140: --- Process Used. Total Queued: 0. Total Used: 2 | |
_ | |
| _ | | | |
|_ |_ |_| v0.19.0-rc4 built Nov 14 2018 | |
Found pb network file: ./engines/latest.txt | |
Creating backend [opencl]... | |
OpenCL, maximum batch size set to 16. | |
Initializing OpenCL. | |
Detected 1 OpenCL platforms. | |
Platform version: OpenCL 1.2 (Oct 11 2018 21:04:03) | |
Platform profile: FULL_PROFILE | |
Platform name: Apple | |
Platform vendor: Apple | |
Device ID: 0 | |
Device name: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz | |
Device type: CPU | |
Device vendor: Intel | |
Device driver: 1.1 | |
Device speed: 2700 MHZ | |
Device cores: 4 CU | |
Device score: 512 | |
Device ID: 1 | |
Device name: Intel(R) Iris(TM) Graphics 6100 | |
Device type: GPU | |
Device vendor: Intel Inc. | |
Device driver: 1.2(Oct 11 2018 20:55:57) | |
Device speed: 1050 MHZ | |
Device cores: 48 CU | |
Device score: 612 | |
Selected platform: Apple | |
Selected device: Intel(R) Iris(TM) Graphics 6100 | |
with OpenCL 1.2 capability. | |
Loaded existing SGEMM tuning for batch size 16. | |
Wavefront/Warp size: 8 | |
Max workgroup size: 256 | |
Max workgroup dimensions: 256 256 256 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment