Giter Site home page Giter Site logo

lightvector / katago Goto Github PK

View Code? Open in Web Editor NEW
3.3K 76.0 545.0 73.12 MB

GTP engine and self-play learning in Go

Home Page: https://katagotraining.org/

License: Other

CMake 0.42% Shell 0.99% C++ 83.43% Cuda 1.19% C 0.87% Python 11.57% HTML 1.05% CSS 0.04% JavaScript 0.44%

katago's People

Contributors

anoek avatar avtomaton avatar bernds avatar chinchangyang avatar dwt avatar emanuel-de-jong avatar espadrine avatar farmersrice avatar fuhaoda avatar hyln9 avatar iopq avatar isty2e avatar kinfkong avatar lightvector avatar lpuchallafiore avatar nerai avatar omnipotententity avatar rimathia avatar rooklift avatar sanderland avatar shammyx avatar simon300000 avatar tfifie avatar tychota avatar y-ich avatar yawen-d avatar yenw avatar yffbit avatar yzyray avatar zakki avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

katago's Issues

compiling on Windows

Will update Windows build here.

Complete package: https://drive.google.com/file/d/1bdIlVDJ3x6FZtX5fmuG6wNbb57GFU8S0/view (6/27/2019, use new cudnn DLL)


Original content:

I tried to compile the GTP engine on Windows but failed:

>------ 生成 已启动: 项目: CMakeLists,配置: RelWithDebInfo ------
  [1/53] "e:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe"  /nologo /TP -DUSE_CUDA_BACKEND -IC:\KataGo\cpp\external -IC:\KataGo\cpp\external\tclap-1.2.1\include -IE:\zlib\include -IE:\CUDA\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /Zi /O2 /Ob1 /DNDEBUG   -std:c++14 /showIncludes /FoCMakeFiles\main.dir\core\elo.cpp.obj /FdCMakeFiles\main.dir\ /FS -c C:\KataGo\cpp\core\elo.cpp
  FAILED: CMakeFiles/main.dir/core/elo.cpp.obj 
  "e:\Program Files (x86)\Microsoft Visual Studio\2017\Community\VC\Tools\MSVC\14.14.26428\bin\HostX64\x64\cl.exe"  /nologo /TP -DUSE_CUDA_BACKEND -IC:\KataGo\cpp\external -IC:\KataGo\cpp\external\tclap-1.2.1\include -IE:\zlib\include -IE:\CUDA\include /DWIN32 /D_WINDOWS /W3 /GR /EHsc /MD /Zi /O2 /Ob1 /DNDEBUG   -std:c++14 /showIncludes /FoCMakeFiles\main.dir\core\elo.cpp.obj /FdCMakeFiles\main.dir\ /FS -c C:\KataGo\cpp\core\elo.cpp
c:\katago\cpp\core\global.h(32): error C3646: “__attribute__”: 未知重写说明符
...

When I run code analysis, I was told
C:/KataGo/cpp/core/global.cpp(14): fatal error C1083: 无法打开包括文件: “dirent.h”: No such file or directory
and when I looked into core/global.cpp, I found
#include <dirent.h> //TODO this is not portable to windows, use C++17 filesystem library when C++17 is available

Is this the only obstruction to porting to Windows? (Seems it can work under Windows though: https://github.com/tronkko/dirent)

I experienced some problem with the Git portion in CMakeLists.txt, so I removed it (not sure about what it is for), but some source files require program/gitinfo.h; would it work if I rename gitinfotemplate.h to gitinfo.h?

Do you happen to plan to add a bit stronger weight?

difference.zip
1, Do you happen to plan to add a bit stronger weight? I continued to lose the game by 1.5 points or 0.5 points to MiniGo in Block 20 this time. If weight is added, do I have to realize anew? I'm asking this question because I'm curious about it.

2, I'm afraid the way of counting the total points acquired in both the website and HanQ Baduk is quite different. For example, when I lose by 0.5 points in HanQ Baduk, I win by 0.5 point in the website. I'm posting this because the problem must be solved and corrected soon.

1

The opponent's win

2

https://online-go.com/game/18355480
my black win

How to improve KataGo at high handicap?

There has been discussions about why KataGo is no so strong at high handicap (5 stones and above). Typically, KG will immediately invade the 4 corners, then somewhat poorly reduce black big moyo, leading to an easy win for Black without much complication. Humans players would like to see KG keep the game more 'open', with more uncertainty, so that humans may have more complex fights, unstable groups, etc....to deal with.

  • You have explained, @lightvector, that self-play games include only a small fraction of handicap games, and only at low handicap (max 2?). Self-playing more handicap games, at higher handicap might help, possibly.

  • Re §6.2.2 of your paper, 'Game Variety and Exploration', you explain that a fraction of games (5%) are definitely branched after choosing a 'best among few random moves', and after komi has been adjusted to balance the game. Handicap games, at least their early phase, are characterized by strong imbalance, at least in early phases. At high imbalance, utility is mostly driven by score component, I assume. Having more self-play games in strong (but not too much) imbalance would teach the policy to prefer moves mostly based on which moves reduce the score gap, even if failing to improve the position value. More of these adversarial positions in the training might help the policy to depart from its 'zero bot' approach of trading corners maybe...

  • In the same line, handicap games in the training might need to be played with more imbalance (no komi full compensation). But I lack the details on how they are actually played, so this remark might be moot.

  • Humans comments somewhat revolves on how the bot should keep the game complex, unstable. At the search level (match games, not self-play a priori), I was wondering how to tweak the utility function so that search would favor 'uncertainty'. Uncertainty that would help is not just variance. In a beginning of a high handicap game, maybe there is not much variance, at least in the value: it's a loss!
    Would it be possible to 'anneal' (through exponentiation e.g.) the ownership head output, so as to discount sure territory vs fuzzy territory? That might bent, through the search process, the initial inclination of the policy head for corner invasion for instance. And more generally, favor unsettled situations vs settled ones. That annealing parameter might be made dependent on the value, so that this effet fades when white catches up.

Just fuzzy ideas offered with no data oc, but intended to launch the debate... :-)

SGF files of KataGo training set and evaluations

Hi :) First of all, thanks for an intriguing experiment with alternative way of training the Go bot! It looks very promisingly.
My issue is simple. Do you have a plans to publish the sgf's with the freshest selfplay and/or evaluation games?
Would be great to take a look at KataGo's full strength evaluation games for study its opening ideas, compare it with the ones from Leela Zero and MiniGo.
I can use my own storage for saving these games to save the harddisk space for you.

Fastest config for v1.1

Notice: This is fastest only, not the best.
CPU: Intel i5-8500
GPU: nVidia RTX 2060
gtp_example.cfg:

numSearchThreads = 36
nnMaxBatchSize = 36
cudaUseFP16 = true
cudaUseNHWC = true

about 2500 visits / second

2019“CHINA SECURITIES Cup” The World AI Weiqi Open

Will KataGo participate in the competition?


http://sports.sina.com.cn/go/2019-05-31/doc-ihvhiews6020777.shtml?cre=tianyi&mod=pcpager_focus&loc=22&r=9&rfunc=100&tj=none&tr=9

ALLOWANCE:
Free accommodation is up to 2 people per team。 Traveling allowance is shown as below:

  • Asia: 10000 Yuan for each team。
  • Rest region of the world: 20000 Yuan for each team。

PRIZES:
Total bonus: 800,000 ¥ before tax。
Rank | 1 | 2 | 3 | 4 | 5-8
Prize(Yuan) | 450,000 | 150,000 | 60,000 | 40,000 | 20,000
Human-AI Pair Weiqi competition: The top eight AI teams in the preliminary competition will be paired with a human player。 The knock-out system is adopted。 The winner will be rewarded with 20,000 RMB in total。(AI team and human player is awarded 10,000 RMB each)

Missing GTP command "undo"

The GTP command "undo" seems missing. It is widely used in GUIs (e.g. Lizzie).

$ git show --quiet --pretty=format:'%h%d'
fb23971 (HEAD -> opencl, origin/opencl)
$ git grep undo -- gtp.cpp
$ ./main gtp -model ../../g104-b6c96-s97778688-d23397744/model.txt.gz -config configs/gtp_example.cfg
play b d4
=

undo
? unknown command

win64 opencl version cannot hold 20x256 model?

when i use 6x96 model, it works

D:\KataGo-1.1>main_opencl gtp -model 6x96.txt -config D:\KataGo-1.1\configs\gtp_example.cfg
KataGo v1.1
Loaded model 6x96.txt
GTP ready, beginning main protocol loop
play b c3
=


genmove w
= Q16

play b c16
=

genmove w
= Q4

its log

2019-06-26 07:42:26+0800: GTP Engine starting...
2019-06-26 07:42:26+0800: nnRandSeed0 = 7966693526900077070
2019-06-26 07:42:26+0800: After dedups: nnModelFile0 = 6x96.txt useFP16 false useNHWC false
2019-06-26 07:42:26+0800: Found OpenCL Device 0: GeForce GT 730 (NVIDIA Corporation)
2019-06-26 07:42:27+0800: Loaded neural net with nnXLen 19 nnYLen 19
2019-06-26 07:42:27+0800: OpenCL backend: Model version 5
2019-06-26 07:42:27+0800: KataGo v1.1
2019-06-26 07:42:27+0800: Loaded model 6x96.txt
2019-06-26 07:42:27+0800: GTP ready, beginning main protocol loop
2019-06-26 07:42:49+0800: Controller: play b c3
2019-06-26 07:42:49+0800: = 
2019-06-26 07:43:02+0800: Controller: genmove w
2019-06-26 07:43:24+0800: MoveNum: 1 HASH: E615BF555BD638A9B3D894DA619930F3
   A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . . . . . . . . .
18 . . . . . . . . . . . . . . . . . . .
17 . . . . . . . . . . . . . . . . . . .
16 . . . . . . . . . . . . . . . @ . . .
15 . . . . . . . . . . . . . . . . . . .
14 . . . . . . . . . . . . . . . . . . .
13 . . . . . . . . . . . . . . . . . . .
12 . . . . . . . . . . . . . . . . . . .
11 . . . . . . . . . . . . . . . . . . .
10 . . . . . . . . . . . . . . . . . . .
 9 . . . . . . . . . . . . . . . . . . .
 8 . . . . . . . . . . . . . . . . . . .
 7 . . . . . . . . . . . . . . . . . . .
 6 . . . . . . . . . . . . . . . . . . .
 5 . . . . . . . . . . . . . . . . . . .
 4 . . . . . . . . . . . . . . . . . . .
 3 . . X . . . . . . . . . . . . . . . .
 2 . . . . . . . . . . . . . . . . . . .
 1 . . . . . . . . . . . . . . . . . . .

koPOSITIONALscoreAREAsui1komi7.5
Time taken: 22.121
Root visits: 100
NN rows: 79
NN batches: 79
NN avg batch size: 1
PV: Q16 Q4 D16 R16
Tree:
: T   2.91c W   3.45c S  -0.54c ( +1.2) N     100  --  Q16 Q4 D16 R16
---White(^)---
Q16 : T  -3.39c W  -3.89c S   0.49c ( -1.2) LCB    4.33c P 19.72% WF 11.30% PSV      23 N      23  --  Q16 Q4 D16 R16
D16 : T  -2.79c W  -3.35c S   0.56c ( -1.1) LCB    5.21c P 19.39% WF 11.17% PSV      21 N      21  --  D16 Q16 Q4 Q3
Q4  : T  -3.49c W  -3.93c S   0.45c ( -1.3) LCB    4.93c P 17.93% WF 11.32% PSV      20 N      20  --  Q4 D16 Q16 Q3
R16 : T  -3.47c W  -3.89c S   0.43c ( -1.4) LCB   15.01c P  6.31% WF 11.28% PSV       8 N       8  --  R16 D16 Q4 P17
C16 : T  -3.69c W  -4.12c S   0.42c ( -1.4) LCB   15.84c P  5.57% WF 11.32% PSV       7 N       7  --  C16 Q16 Q4 E17
R4  : T  -1.82c W  -2.47c S   0.65c ( -1.0) LCB   18.69c P  6.92% WF 11.02% PSV       6 N       6  --  R4 D16 Q16
D17 : T  -0.90c W  -1.78c S   0.88c ( -0.6) LCB   29.08c P  6.02% WF 10.89% PSV       5 N       5  --  D17 Q16 Q4
Q17 : T  -2.03c W  -2.69c S   0.66c ( -1.0) LCB   28.16c P  5.57% WF 11.06% PSV       5 N       5  --  Q17 D16 Q4
Q3  : T   0.85c W  -0.34c S   1.19c ( -0.1) LCB   54.16c P  5.13% WF 10.65% PSV       4 N       4  --  Q3 D16 Q16

2019-06-26 07:43:24+0800: = Q16
2019-06-26 07:44:07+0800: Controller: play b c16
2019-06-26 07:44:07+0800: = 
2019-06-26 07:44:11+0800: Controller: genmove w

but it failed to run with 20x256 as 106th reply at
leela-zero/leela-zero#2431

suggest to remove models from the source code to reduce the file size

namely

g103-b6c96-s103408384-d26419149-info.txt
g103-b6c96-s103408384-d26419149.txt.gz
grun2-b6c96-s128700160-d49811312-info.txt
grun2-b6c96-s128700160-d49811312.txt.gz
grun50-b6c96-s156348160-d118286860.txt.gz
run4-s67105280-d24430742-b6c96-info.txt
run4-s67105280-d24430742-b6c96.txt.gz

Suspicious noResultValue and score in fillValueTDTargets

The fillValueTDTargets function appears to be accumulating time-decayed averages of the winValue, lossValue, noResultValue, score parameters, to use as training targets. However, the arithmetic for noResultValue and score use = rather than +=, which means that the last value wins and no accumulation takes place. Typo or intentional?

noResultValue = weightNow * targets.noResult;

Question of compatability

Perhaps it is already explained somewhere, so I apologise if I missed it. Is it possible to use KataGo with something like Lizzie, by transporting the weights file over to the installation folder?
I find your project interesting, but I don't have a c++ compiler.

OpenCL problem with Windows on Intel integrated CPU

I first waited for the tuning to finish then whenever I launch it it spits out

KataGo v1.2
Using OpenCL Device 0: Intel(R) HD Graphics 5500 (Intel(R) Corporation) OpenCL 2
.0
Loaded tuning parameters from: ./KataGoData/opencltuning/tune_gpuIntelRHDGraphic
s5500_x19_y19_c96_mv5.txt
Uncaught exception: CL_BUILD_PROGRAM_FAILURE
BUILD LOG FOR xgemmDirectProgram ON DEVICE 0
fcl build 1 succeeded.

and then it quits

Plans for the future?

Sorry if opening an issue is not adequate, but I didn't see an alternative (ie a discord channel?).

First of all, huge congratulations, KataGo is an excellent program, very strong on 13x13 and 19x19, providing a lot of value added Go things: handicap, no weak play in end games, variable komi, variable board sizes, extremely fast and efficient improvement...
That's just AMAZING, congratulations : -))). LZ130 strength in 30 weeks x GPU, it's incredible: with current LZ computing power, that would take ~1 week where LZ took ~6 months!

Then a question: what are the next steps?
More precisely:

  • Is it possible to continue training it, and will you give us the opportunity to contribute (eg through an LZ approach, with an "autogtp" tool, including a windows version ; -)?
  • What about larger nets (20, 30 or possibly 40 block)?
  • Other ideas (over ones you already hinted: rectagular board sizes, japanese rules, ...)?

I'd be more than happy to switch my hardware from LZ and to dedicate it to train KataGo full time (on my Windows set-up)...

Speeding up runs even faster?

leela-zero/leela-zero#2282

this patch lets you select moves with very few playouts, as long as they have a good winrate with SOME visits (10% and maximum lowest confidence bound)

But on higher visits it seems like a wash because Leela Zero prefers the higher winrate move to visit anyway. But on lower visits it lets you find a good move quickly! That means you can go up to a bigger network size faster - before you'd need to learn on say 1600 visits, but now maybe 300 visits can do the job while still incrementally getting stronger

maximum memory usage

LeeLa has a way to limit the memory usage of the engine.
i.e. lz-setoption name maximum memory use (mib) value 1024

I was wondering if KataGo also has some way to define a memory usage limit. It's especially useful when you use multiple bots on the same server or use the bot for hours without interruption.

( I went through the settings in the example config folder, but perhaps overlooked something. )

lcb in version 1.1

The output that I get with version 1.1 is:

afbeelding

Shouldn't there be an lcb value in this format ?
Or is that something which is different from how LeeLa Zero works ?

Thank you in advance.

(PS: what is the utility value ?)

what is the meaning of label 1,2,3 in broad of gtp.log

koPOSITIONALscoreAREAsui1komi7.5
Time taken: 24.305
Root visits: 1000
NN rows: 254
NN batches: 254
NN avg batch size: 1
PV: B13 N4 O3 M4 Q6 Q7 Q5 S5 S4 P7 M3 S3 T4 R3 R4 Q3 P3 L3 L2
Tree:
: T -25.82c W -24.00c S  -1.82c ( -2.3) N    1000  --  B13 N4 O3 M4 Q6 Q7 Q5
---Black(^)---
B13 : T  25.07c W  23.32c S   1.74c ( +2.2) LCB   27.33c P 64.57% WF 10.36% PSV     938 N     938  --  B13 N4 O3 M4 Q6 Q7 Q5 S5
B15 : T  49.00c W  44.68c S   4.31c ( +5.9) LCB   93.82c P  8.59% WF  6.38% PSV      11 N      11  --  B15 B16 B14 C13 B13 C12 C11
Q6  : T  40.84c W  37.66c S   3.18c ( +4.2) LCB   61.23c P  5.18% WF  7.61% PSV      10 N      10  --  Q6 Q7 Q5 S5 S4 P7 B13 S3
E15 : T  28.29c W  26.25c S   2.04c ( +2.7) LCB   52.24c P  1.55% WF  9.56% PSV       9 N       9  --  E15 F15 B13 B5 B6 C7
S17 : T  39.40c W  36.13c S   3.26c ( +4.4) LCB   81.55c P  4.30% WF  7.93% PSV       8 N       8  --  S17 S16 B13 F12
S5  : T  40.88c W  37.40c S   3.48c ( +4.8) LCB   70.97c P  4.07% WF  7.72% PSV       8 N       8  --  S5 Q5 P4 B12 O7 N5
N8  : T  35.00c W  31.90c S   3.10c ( +4.4) LCB  110.95c P  1.30% WF  8.78% PSV       4 N       4  --  N8 M4 P8
O7  : T  45.12c W  41.01c S   4.11c ( +5.8) LCB  167.06c P  2.37% WF  7.71% PSV       3 N       3  --  O7 N4 O3
M9  : T  36.93c W  34.18c S   2.75c ( +3.5) LCB  349.94c P  0.74% WF  8.64% PSV       3 N       3  --  M9 O9 S5
S16 : T  37.45c W  34.61c S   2.84c ( +3.7) LCB  280.00c P  1.05% WF  8.71% PSV       2 N       2  --  S16 S15

2019-06-21 13:07:50+0800: = B13
2019-06-21 13:08:19+0800: Controller: play W N4
2019-06-21 13:08:19+0800: = 
2019-06-21 13:08:19+0800: Controller: genmove b
2019-06-21 13:08:53+0800: MoveNum: 96 HASH: 90CD293F594E8971F188A2787AA416DF
   A B C D E F G H J K L M N O P Q R S T
19 . . . . . . . . . . . X . . . . . . .
18 . . . . . . . . X O X . X X . . . . .
17 . . X X X X X . X O X X O O . X X . .
16 . . O O O O X O X O O O X . O O O . .
15 . . . . . . O X . O X X X . . . . . .
14 . . O . X O1O X X X O X O O . . . . .
13 . X2. . X O X O . . O X X O . . . . .
12 . . . X . . . O X X O . O O . . . . .
11 . . . . X O . . . . . O . . . . . . .
10 . . . X O O . . . . . . . . . . . . .
 9 . . . X . . . . . . . . . . . . . . .
 8 . . . . . . . . . . . . . . . . . . .
 7 . . . . . . . . . . . . . . . . . . .
 6 . . O X . . . . . . . . . . O . O O .
 5 . . X . . X . . . . . . . O . . X . .
 4 . . . X . X O . . . . @ O3X . X . . .
 3 . O X O O O . . . . . . X . . . . . .
 2 . . O . . . . . . . . . . . . . . . .
 1 . . . . . . . . . . . . . . . . . . .

Questions on 1.1 release

I had a couple question related to the 1.1 release. I am running the windows compile created by AlreadyDone over on the Leela git page.

I notice in Sabaki that the GPU load is high and TDP is at 80-90% when the engine is "idle", i.e. no gtp commands have been given. Leela Zero, by contrast, will not load the GPU until a command is given. Does that mean I have some setting configured incorrectly, or perhaps something related to how Sabaki is trying to interface with it?

My second question is related to variations displayed in Sabaki. I notice that they are appear to be capped at 10 moves. Is there a way to expand this?

If these are issues purely with Sabaki I wouldn't expect anyone here to know the answers, but I thought I would ask in case it's a configuration thing with Katago.

Great work on this project, seems to be much more flexible than other "zero" methods, such as Leela.

Wishlist: Support traditional Chinese (scoring) rule?

In the abstract of an article, the author sketched the traditional Chinese (scoring) rule, and the difference between the traditional one and the modern one:

Under the traditional Chinese rules, a player's score was the maximum number of stones he could in theory play on the board. Since every groups needs two liberties to live, this rule created a two-point group tax: the player with the more separate groups lost two points for evey excess group. (In practice, one point per excess group was subtracted from the player's score and added to his opponent's score so that the total remained 361. {This does not compute; it could convert a clear winner into a loser. Only by adding two points per group could the total be made 361. --wjh}) Modern Chinese rules avoid this by counting both stones and surrounded points.

I wonder whether we would support this. It could be used to analyze traditional Chinese games, and to understand differences of good strategies between the traditional one and the modern one.

CPU-only version

I would like to use KataGo since it has VERY attractive features: score/ownership estimation, variable komi, and handicap games. But I do not have a GPU and I wish for CPU-only one.

Even if CPU-only version is too slow for analysis in general, it must be useful for ownership estimation at least. I implemented ownership/endstate visualization based on a modified leela zero by ihavnoid, and found that it is so much fun. Change of ownership is interesting in particular. It reveals side effects of moves that I did not recognized well. I hope to watch KataGo's estimation in the same way.

final_score outputs only W+

I've been experiencing the following problem with both Sabaki and Lizzie: final_score command outputs always W+ (ie. W+7.5) even if Black has a lead/is winning according to the winrate. The points can differ but the lead is always for white.

OS: Ubuntu 18.04

why the time cost of opencl version is less than cuda version

D:\KataGo-1.1\katago12bc = 1.2beta cuda
D:\KataGo12b\katago =1.2beta opencl

# Black: KataGo
# BlackCommand: D:\KataGo-1.1\katago12bc gtp -model d:\model696.txt -config D:\KataGo12b\gtp_example.cfg
# BlackLabel: KataGo:1.2-beta
# BlackVersion: 1.2-beta
# Date: July 19, 2019 1:33:24 PM CST
# Host: PC
# Komi: 7.5
# Referee: -
# Size: 19
# White: KataGo
# WhiteCommand: D:\KataGo12b\katago gtp -model d:\model696.txt -config D:\KataGo12b\gtp_example.cfg
# WhiteLabel: KataGo:1.2-beta
# WhiteVersion: 1.2-beta
# Xml: 0
#
#GAME	RES_B	RES_W	RES_R	ALT	DUP	LEN	TIME_B	TIME_W	CPU_B	CPU_W	ERR	ERR_MSG
0	W+R	W+R	W+R	0	-	302	654	522	0	0	0	
1	B+R	B+R	B+R	0	-	247	523.1	438	0	0	0	
2	B+R	B+R	B+R	0	-	175	485.8	390	0	0	0	
3	B+R	B+R	B+R	0	-	281	689.5	557.9	0	0	0	
4	B+R	B+R	B+R	0	-	225	488.8	398.5	0	0	0	
5	B+R	B+R	B+R	0	-	253	586.4	514.7	0	0	0	
6	B+R	B+R	B+R	0	-	215	472.5	395.5	0	0	0	
7	W+R	W+R	W+R	0	-	208	431.5	374.8	0	0	0	
8	W+R	W+R	W+R	0	-	218	524.6	426.9	0	0	0	
9	W+R	W+R	W+R	0	-	156	305.7	258	0	0	0

Startup message

How about writing a startup message to STDERR after initialization so that GUIs know when to begin sending GTP commands? Though I couldn't reproduce the problem by myself, GUIs may need to wait for initialization of the engine in a certain situation (kaorahi/lizgoban#4).

In addition, Leela Zero shows the network size in initialization. It is also convenient for GUIs.

Additional networks?

Is there a place we can download g1 through g65 networks? I am interested in running some experiments with them.

Implemeting for other board games?

I am trying to implment AlphaGo algorithm on my own board game. Is this repo capable of changing the game if I already have the game environment + logic already?

loadsgf command shows warning, how to solve it

loadsgf test.sgf
WARNING: Loaded sgf has rules koSIMPLEscoreAREAsui0komi7.5 but GTP is set to rules koPOSITIONALscoreAREAsui1komi7.5

(;GM[1]FF[4]CA[UTF-8]
RU[Chinese]SZ[19]KM[7.5]TM[900]
PW[LZ_05db_ELFv2_p800]PB[h_15b_512k_v3200]WR[3195]BR[2678?]DT[2019-07-06]PC[(CGOS) 19x19 Computer Go Server]RE[B+Resign]GN[576490]
;B[dp]BL[899];W[pd]WL[897];B[pp]BL[897];W[dd]WL[893];B[cf]BL[897];W[qq]WL[889];B[qp]BL[893];W[pq]WL[885]
;B[nq]BL[892];W[nr]WL[882];B[fc]BL[889];W[op]WL[879];B[oq]BL[887];W[or]WL[875];B[mq]BL[887];W[oo]WL[873]
;B[rp]BL[887];W[lq]WL[871];B[mr]BL[886];W[rq]WL[870];B[qm]BL[885];W[po]WL[867];B[qo]BL[883];W[lp]WL[865]
;B[lr]BL[882];W[pm]WL[859];B[ql]BL[880];W[jq]WL[857];B[no]BL[878];W[pl]WL[854];B[pk]BL[876];W[qk]WL[850]
;B[nn]BL[874];W[nm]WL[846];B[rk]BL[872];W[qj]WL[844];B[rj]BL[872];W[qi]WL[841];B[ri]BL[870];W[mm]WL[839]
;B[ns]BL[867];W[ps]WL[834];B[lo]BL[866];W[qh]WL[829];B[ln]BL[864];W[sp]WL[824];B[qn]BL[862];W[so]WL[819]
;B[rh]BL[859];W[qg]WL[816];B[rg]BL[859];W[rf]WL[811];B[nk]BL[857];W[mk]WL[806];B[ok]BL[854];W[nl]WL[802]
;B[mj]BL[852];W[lk]WL[798];B[qf]BL[851];W[re]WL[792];B[pf]BL[850];W[oh]WL[787];B[ni]BL[849];W[nh]WL[781]
;B[mh]BL[846];W[nf]WL[775];B[kj]BL[842];W[kk]WL[769];B[jk]BL[840];W[jl]WL[763];B[lj]BL[838];W[il]WL[759]
;B[jn]BL[836];W[sl]WL[753];B[rl]BL[834];W[sm]WL[746];B[om]BL[832];W[ol]WL[743];B[pn]BL[832];W[on]WL[738]
;B[np]BL[830];W[om]WL[732];B[kl]BL[829];W[km]WL[724];B[lm]BL[827];W[ll]WL[716];B[mn]BL[827];W[ml]WL[710]
;B[kl]BL[826];W[oc]WL[703];B[rs]BL[824])


How to set faster?

numSearchThreads is limitted by CPU or GPU?
nnMaxBatchSize should be equal to numSearchThreads?
Others?

Tried compiling on Ubuntu 18, here are some steps

  1. Install the latest cmake

had to install pip, remove old cmake, install newer version with pip

  1. install these packages:
    nvidia-cuda-toolkit
    libcudnn7-dev
    libzip-dev

there are maybe a few I didn't need to get again since I had previously installed lz

Can I use your TensorFlow model?

Hi.

Thank you for your nice research!

I cloned this repository and downloaded b15c192-s279618816-d16499002.zip.
And I tried to use play.py etc. in python directory but failed.

Here is an error I got:

Traceback (most recent call last):
  File "play.py", line 833, in <module>
    saver.restore(session, modelpath)
  File "/Users/yuji/.virtualenvs/python-6ZMcOZYe/lib/python3.6/site- packages/tensorflow/python/training/saver.py", line 1268, in restore
+ compat.as_text(save_path))
ValueError: The passed save_path is not a valid checkpoint: ../models/b15c192-s279618816-d164990022/

I took a look at the expanded directory of b15c192-s279618816-d16499002.zip and added 'saved_model/variables/variables' to modelpath in the line of 'saver.restore(session, modelpath)' but did not succeeded.
The cause maybe be the lack of .meta file of checkpoint in saved_model directory.

I have no idea how to generate .meta file.
Can I use your TensorFlow model?

Thank you.

CUBLAS_STATUS_NOT_INITIALIZED

installed katago, works fine most of the time. But sometimes I have the following error.
But as you can see, just retrying fixes it.

afbeelding

Paper: questions and ideas

First of all, thank you for the experiments and the release of a paper with dazzling variety of methods and details!

This fact is ambiguous in DeepMind’s published papers due to ambiguity about whether a [-1,1] or [0,1] scale was used, and was only clarified much later by an individual researcher in a forum post here: http://talkchess.com/forum3/viewtopic.php?f=2&t=69175&start=70#p781765

If you are referring to Matthew Lai, he's a research engineer at DeepMind involved in the development of AlphaZero ...

image
Is a square root missing here?

Regarding one network for different sizes of boards: I am curious how your net perform against the 13x13 net converted from a 19x19 LZ 40b net (available at leela-zero/leela-zero#2240). Though it hasn't been trained on 13x13 games, it's the currently strongest 13x13 net available, and said to be of superhuman strength. Your 15b net achieves potentially superhuman strength on 19x19 as estimated in the paper, and though it hasn't been trained on as many 13x13 games, 13x13 should be easier to master due to smaller board size, so I think it would be a good matchup.

I am curious what you find about fair komi on even-sized boards. Are they usually closer to 4 or 6? (I guess the latter.)

The same method should allow the net to play on rectangular boards or disjoint unions of boards. If the two boards are identical the second player has a perfect mirroring strategy, which can only be broken by superko rules, I think. (I can imagine a double ko situation.)

Remaining game length as auxiliary prediction target

Did you consider or even already experiment with having the network predict the remaining number of moves in a game? Game length is admittedly kind of a dubious concept in the game of go (depending on the ruleset), but it's otherwise universal enough for it to be nice to find out whether predicting it might prove (significantly) beneficial. As a bonus, the info would be valuable for use in the time management (especially if the predictions are further divided by outcome (win/loss/draw)).

Document `./write`

Once again, nice works :)

The write command is undocumented. I think it is usefull to start "master" like bots:
I assume its usage would be something like:

./write -pool-size 50000 -train-shards 10 -val-game-prob 0.05 -gamesdir <DIRECTORY WITH SGF FILES> -output <TARGET>.h5

Once we get the target h5, how to include it in the selfpay loop ?

I will be happy to open a PR with those information.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.