Using web browser to visit your computer which is running leela zero to analyse sgf. So you can analyse all kifu anywhere.
- Web page based on WGo.js.
- Server side based on Leela Analysis Scripts and using python2.7
- Server side also need Python module: bottle, gevent, gevent-websocket
- Using some sabaki theme
- Install python 2.7
- Install bottle, gevent, gevent-websocket
pip bottle
pip gevent
pip gevent-websocket
- If you already have your web server, please skip this step
As an alternate web server solution, you can do several step:
cd webgo
python -m SimpleHTTPServer
3.1 download nginx/1.2.8
3.2 modify nginx.conf and set the port and root path
server {
listen 80;
server_name localhost;
charset utf-8;
location = / {
root C:\web;
index index.html index.php;
}
3.3 add sgf as one filetype permitted by server
location ~* \.(htm|html|gif|jpg|jpeg|png|css|js|ico|json|net|sgf)$ {
root C:\web;
}
- put all zip content to your web site root
In the example , it's c:\web
In svr\webgo.py
, change to your own leelazero executable path and set the weight name correctly and make sure the leelaz.exe support lz-analyze gtp command
executable = "c:/go/leela-zero/leelaz.exe"
weight = '-wc:/go/weight/62b5417b64c46976795d10a6741801f15f857e5029681a42d02c9852097df4b9.gz'
You can put sgf file under sgf directory
server side, under cmd.exe run:
c:\python2.7\python webgo.py
browser side, can use pad/phone with any web browser
http://your_ip/webgo.html?sgf=1.sgf&move=50
- Install brew using ruby
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- git clone branch
git clone -b next https://github.com/gcp/leela-zero.git
- install boost
brew install boost
- Compile leelaz with boardsize 9 or 19
- using curl -O or ftp to get weight
- full-tuner
- install pip, bottle, gevent, gevent-websocket
sudo easy_install pip
sudo pip install bottle
pip install --user greenlet
pip install --user gevent
pip install --user gevent-websocket
If failed, maybe need to install pyenv, then using pyenv to install another version python pyenv global 2.7.11 to switch version, but wish you lucky
The code is released under the AGPLv3 or later.