飞扬围棋

标题: 有人做出了leela-zero(可执行文件在15楼,缺dll文件在29楼) [打印本页]

作者: lu01    时间: 2017-10-25 13:15
标题: 有人做出了leela-zero(可执行文件在15楼,缺dll文件在29楼)
本帖最后由 lu01 于 2017-10-27 14:19 编辑

https://github.com/gcp/leela-zero
作者: lu01    时间: 2017-10-25 13:17
就是leela的作者
作者: lu01    时间: 2017-10-25 13:29
好像还不能在windows上用
https://github.com/gcp/leela-zero/blob/master/src/Makefile
作者: missdeer    时间: 2017-10-25 14:01
lu01 发表于 2017-10-25 13:29
好像还不能在windows上用
https://github.com/gcp/leela-zero/blob/master/src/Makefile

README上写了
  1. The program has been tested on Windows, Linux and MacOS.
复制代码



作者: lu01    时间: 2017-10-25 14:15
我用这个[http://blog.csdn.net/pdcxs007/article/details/8582559]方法编译,缺东西

D:\src>mingw32-make
mingw32-make CC=gcc CXX=g++ \
        CXXFLAGS='-I/opt/OpenBLAS/include -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DND
EBUG'  \
        LDFLAGS='-L/opt/OpenBLAS/lib -flto -g' \
        leelaz
mingw32-make[1]: Entering directory 'D:/src'
g++ -I/opt/OpenBLAS/include -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DNDEBUG -MD -MP -
c -o Network.o Network.cpp
Network.cpp:30:10: fatal error: boost/utility.hpp: No such file or directory
#include <boost/utility.hpp>
          ^~~~~~~~~~~~~~~~~~~
compilation terminated.
mingw32-make[1]: *** [Makefile:53: Network.o] Error 1
mingw32-make[1]: Leaving directory 'D:/src'
mingw32-make: *** [Makefile:2: default] Error 2

作者: lu01    时间: 2017-10-25 14:25
换了个带boost的mingw [https://nuwen.net/mingw.html]

D:\MinGW>cd\src

D:\src>make
make CC=gcc CXX=g++ \
        CXXFLAGS='-I/opt/OpenBLAS/include -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DND
EBUG'  \
        LDFLAGS='-L/opt/OpenBLAS/lib -flto -g' \
        leelaz
make[1]: Entering directory 'D:/src'
g++ -I/opt/OpenBLAS/include -I. -Wall -Wextra -pipe -O3 -g -ffast-math -flto -march=native -std=c++14 -DNDEBUG -MD -MP -
c -o Network.o Network.cpp
Network.cpp:41:10: fatal error: cblas.h: No such file or directory
#include <cblas.h>
          ^~~~~~~~~
compilation terminated.
make[1]: *** [Makefile:53: Network.o] Error 1
make[1]: Leaving directory 'D:/src'
make: *** [Makefile:2: default] Error 2
作者: lxjtt09    时间: 2017-10-25 15:11
棋力能赢过master-Lee就满足了。
作者: 兴兴    时间: 2017-10-25 16:43
看不懂哦,还是要等11月的zen7?
作者: tw3007    时间: 2017-10-25 16:55
咋弄?盼楼主解密
作者: newstain    时间: 2017-10-25 17:45
这个还没有训练。作者估计自己训练的话,有生之年都完不成,所以打算请爱好者帮忙训练。
我们等后续吧,到时候有钱出钱,有力出力,参与的人多了,搞不好用不了多久也能训练出很厉害的网络。
作者: lu01    时间: 2017-10-25 18:25
newstain 发表于 2017-10-25 17:45
这个还没有训练。作者估计自己训练的话,有生之年都完不成,所以打算请爱好者帮忙训练。
我们等后续吧,到 ...

那他要尽量让爱好者容易用
作者: oceanland    时间: 2017-10-25 22:30
这只是开始,作者说了咱们自己常规训练的话要等千年,不过期待着很快就会有别的突飞猛进的办法,值得持续关注。
作者: lu01    时间: 2017-10-26 07:54
lu01 发表于 2017-10-25 18:25
那他要尽量让爱好者容易用

出了windows可执行版
https://github.com/gcp/leela-zero/releases


作者: lu01    时间: 2017-10-26 07:55
lu01 发表于 2017-10-26 07:54
出了windows可执行版
https://github.com/gcp/leela-zero/releases

                  0.1            
                gcp        released this          2 hours ago      
   
              Initial release.
Requires a weights file. Search parameters have not been tuned yet. You must have working OpenCL drivers to use this.
      
      Downloads        


作者: lu01    时间: 2017-10-26 08:06
lu01 发表于 2017-10-26 07:55
0.1                            gcp        released this          2 hours ago     ...

缺文件
[attach]139760[/attach]

作者: liangr    时间: 2017-10-26 09:56
lu01 发表于 2017-10-26 08:06
缺文件

这是Debug版本,是调试用的,非发布用的release版本。

作者: lu01    时间: 2017-10-26 10:06
估计作者忙中出错,编译错
作者: 原力猫    时间: 2017-10-26 11:54
lu01 发表于 2017-10-26 08:06
缺文件

你的机器缺VC运行库吧

作者: lu01    时间: 2017-10-26 12:43
在网上下载了2个文件,可以执行了
D:\src>leela-zero --help
Leela Zero  Copyright (C) 2017  Gian-Carlo Pascutto
This program comes with ABSOLUTELY NO WARRANTY.
This is free software, and you are welcome to redistribute it
under certain conditions; see the COPYING file for details.

Allowed options:
  -h [ --help ]                 Show commandline options.
  -g [ --gtp ]                  Enable GTP mode.
  -t [ --threads ] arg (=1)     Number of threads to use.
  -p [ --playouts ] arg         Weaken engine by limiting the number of
                                playouts. Requires --noponder.
  -b [ --lagbuffer ] arg (=100) Safety margin for time usage in centiseconds.
  -r [ --resignpct ] arg (=10)  Resign when winrate is less than x%.
  -m [ --randomcnt ] arg (=0)   Play more randomly the first x moves.
  -n [ --noise ]                Enable policy network randomization.
  -w [ --weights ] arg          File with network weights.
  -l [ --logfile ] arg          File to log input/output to.
  -q [ --quiet ]                Disable all diagnostic output.
  --noponder                    Disable thinking on opponent's time.
  --gpu arg                     ID of the OpenCL device(s) to use (disables
                                autodetection).
  --rowtiles arg (=5)           Split up the board in # tiles.

http://www.jb51.net/dll/ucrtbased.dll.html
http://www.jb51.net/dll/vcruntime140d.dll.html
作者: lu01    时间: 2017-10-26 13:24
下载了 权数文件[https://sjeng.org/zero/best.txt.zip]

D:\src>leela-zero -g -w weights.txt
Using 1 thread(s).
Initializing OpenCL
Detected 1 OpenCL platforms
Platform version: OpenCL 1.2 CUDA 8.0.0
Platform profile: FULL_PROFILE
Platform name:    NVIDIA CUDA
Platform vendor:  NVIDIA Corporation
Device ID:     0
Device name:   GeForce GT 730
Device type:   GPU
Device vendor: NVIDIA Corporation
Device driver: 376.62
Device speed:  901 MHz
Device cores:  2 CU
Device score:  1112
Selected platform: NVIDIA CUDA
Selected device: GeForce GT 730
with OpenCL 1.2 capability
Wavefront/Warp size: 32
Max workgroup size: 1024
Max workgroup dimensions: 1024 1024 64
Detecting residual layers...256 channels...12 layers
Transferring weights to GPU...done
BLAS Core: Nehalem
作者: lu01    时间: 2017-10-26 13:47
没法像leelagtp版那样分析

D:\src>sgfanalyze.py 171025.sgf --leela Leela0110GTP.exe  >171025_analyzed.sgf
Warning: Komi not specified, assuming 7.500000
Executing approx 519 analysis steps

|                                                  |   done% | Est... | done / total
|                                                  |   0.00% | Est... | 0 / 519
|                                                  |   0.19% | 0:41:19 | 1 / 517

D:\src>sgfanalyze.py 171025.sgf --leela Leela0110GTP_OpenCL.exe  >171025a_analyzed.sgf
Warning: Komi not specified, assuming 7.500000
Executing approx 519 analysis steps

|                                                  |   done% | Est... | done / total
|                                                  |   0.00% | Est... | 0 / 519
|                                                  |   0.19% | 0:20:15 | 1 / 517

D:\src>sgfanalyze.py 171025.sgf --leela Leela-zero.exe   >171025b_analyzed.sgf
Warning: Komi not specified, assuming 7.500000
Executing approx 519 analysis steps

|                                                  |   done% | Est... | done / total
|                                                  |   0.00% | Est... | 0 / 519
Traceback (most recent call last):
  File "D:\src\sgfanalyze.py", line 462, in <module>
    leela.start()
  File "D:\src\sgftools\leela.py", line 196, in start
    self.send_command('boardsize %d' % (self.board_size))
  File "D:\src\sgftools\leela.py", line 160, in send_command
    self.p.stdin.write(cmd + "\n")
IOError: [Errno 22] Invalid argument
Failure, reporting partial results...

|==================================================| 100.00% | 0:00:00 | 519 / 519
|==================================================| 100.00% | Done. | Elapsed Time: 0:00:02
作者: 原力猫    时间: 2017-10-26 17:42
这个也是引擎文件,要用平台加载才能用。俺试了一下,加载才训练了几天的库已经能砍翻弈城7了
作者: lu01    时间: 2017-10-26 17:51
原力猫 发表于 2017-10-26 17:42
这个也是引擎文件,要用平台加载才能用。俺试了一下,加载才训练了几天的库已经能砍翻弈城7了

能改造源代码用于sgf分析吗

作者: newstain    时间: 2017-10-26 17:56
lu01 发表于 2017-10-26 17:51
能改造源代码用于sgf分析吗

先要等棋力提高。将来一定有分支来做分析的

作者: 飞扬破刀    时间: 2017-10-26 18:51

作者: liangr    时间: 2017-10-26 19:27
太牛了。家用版alpha zero。
作者: ldwb7810    时间: 2017-10-27 11:15
用什么加载
作者: 原力猫    时间: 2017-10-27 13:47
本帖最后由 原力猫 于 2017-10-27 13:50 编辑

有些事件说明一下,这个版本只是一个演示版,还是用人类的棋谱训练的,棋很本分,不善于乱战。指望其棋力的同学就没有必要试了,比现在的里拉0.110差远了。
加载的话是这样的:用sabaki , gogui . drago这类平台都可以,这里给个通用参数:-g --noponder -w weights.txt -t 8
运行中如果提示缺少某某文件可以去网上下载后放到里拉零的目录里就行了。还有weights.txt这个文件一定要有,也是放在目录中

因为缺少训练狗用的硬件资源,所以里拉的作者正在准备搞分布式计算,发动大家一起来训练新狗。这事也许近期就有眉目了

作者: lu01    时间: 2017-10-27 14:18
[attach]139814[/attach]

[attach]139813[/attach]

如果缺文件,用这2个



作者: stillcen    时间: 2017-10-27 14:55
已经看不懂怎么玩的了。求大师们训练好狗狗,然后再分享!
作者: oceanland    时间: 2017-10-27 20:26
本帖最后由 oceanland 于 2017-10-27 20:28 编辑

今天用Leela Zero执黑对Leela本尊,结果可供哈哈,让我见识了有史以来最强的填子AI
[attach]139825[/attach]
作者: lu01    时间: 2017-10-28 05:34
这么神奇
作者: lu01    时间: 2017-10-28 05:41
又更新Add "dump_training" command.
作者: guandaxin1    时间: 2017-10-28 14:05
lu01 发表于 2017-10-28 05:41
又更新Add "dump_training" command.

这个命令怎么用?





欢迎光临 飞扬围棋 (http://flygo.net/BBS/) Powered by Discuz! X3.2