Dear all,
I am working on a program to use Leela to help review my games. And for that, I am parsing the standard output of Leela in console when running in gtp mode. I am not so clear with the meaning of some Leela's messages. In fact, I am not so clear with most of the output, so I am coming with a lot of questions.
Let me show an example (using Leela 6.2 under Linux).
Here I run Leela in gtp:
Code:
./leela_062_linux_x64 --gtp
Then in the terminal, I input some game moves using gtp commands, as follow:
Code:
play black q4
play white d16
play black q17
play white d3
play black d5
play white f4
play black c3
play white c2
play black c4
play white e2
play black c9
play white q15
play black r13
play white r17
play black r18
play white q16
play black p17
play white r14
play black q13
play white s17
Note I did not mention anything specific about komi; so this would give black a advantage in Leela's eye. Also; this game if from
Henning W. as published on that thread:
http://lifein19x19.com/forum/viewtopic.php?f=4&t=13669.
At that point, the go board position should be like this:

Current game position, black to play
- Click Here To Show Diagram Code
[go]$$c Current game position, black to play
$$ ---------------------------------------
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . X X O O . |
$$ | . . . O . . . . . . . . . . . O . . . |
$$ | . . . . . . . . . . . . . . . O . . . |
$$ | . . . . . . . . . . . . . . . . O . . |
$$ | . . . . . . . . . . . . . . . X X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . X . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . X . . . . . . . . . . . . . . . |
$$ | . . X . . O . . . . . . . . . X . . . |
$$ | . . X O . . . . . . . . . . . . . . . |
$$ | . . O . O . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]
Then, I ask Leela to play the next move with that gtp command:
Code:
genmove black
Here is Leela output:
Code:
MC winrate=0.375000 score=W+7.0
Nodes: 8333, Win: 51.44%, PV: n16 o15 n15 o14 q10 l17
Nodes: 19888, Win: 51.62%, PV: n16 o15 n13 o16 o17
Nodes: 31234, Win: 51.26%, PV: n16 o15 o13 o16 o17 s18 k17
n16 -> 28871 (U: 51.35%) (R: 51.71%: 29322) (N: 64.1%) PV: n16 o15 o13 o16 o17 s18 n15
m17 -> 4769 (U: 50.93%) (R: 51.75%: 7161) (N: 15.3%) PV: m17 o16 o17 r9
s18 -> 0 (U: 0.00%) (R: 0.00%: 1104) (N: 7.9%) PV: s18
o15 -> 0 (U: 0.00%) (R: 0.00%: 1183) (N: 6.4%) PV: o15
o16 -> 0 (U: 0.00%) (R: 0.00%: 1297) (N: 2.4%) PV: o16
n17 -> 0 (U: 0.00%) (R: 0.00%: 2387) (N: 1.1%) PV: n17
====================================
28871 visits, score 51.35% (from 51.29%) PV: n16 o15 o13 o16 o17 s18 n15
33640 visits, 3080 nodes, 4028 vps
= n16
So now (for what I understand), Leela proposes to play n16 as the next move. And the expected follow up is as follow: o15 o13 o16 o17 s18 n15
And other good move that Leela considered is M17, with that follow up: o16 o17 r9
For those two possibilities, what are the meanings of the complete lines? for example, for N16, what the meaning of "
U: 51.35%", "
R: 51.71%: 29322" and "
N: 64.1%" in
Code:
n16 -> 28871 (U: 51.35%) (R: 51.71%: 29322) (N: 64.1%) PV: n16 o15 o13 o16 o17 s18 n15
The other potential moves (S18, O15, O16, N17) have U and R value at 0%, what the meaning for that? Are those moves that were immediately refuted by Leela (bad moves)?
Regarding the fist line output:
Code:
MC winrate=0.375000 score=W+7.0
How to interpret it? 37.5% of chance to win for black according to Monte Carlo search ?
Those 3 lines:
Code:
Nodes: 8333, Win: 51.44%, PV: n16 o15 n15 o14 q10 l17
Nodes: 19888, Win: 51.62%, PV: n16 o15 n13 o16 o17
Nodes: 31234, Win: 51.26%, PV: n16 o15 o13 o16 o17 s18 k17
Are they potential variations on the main line of play, N16?
And finally, for that line:
Code:
28871 visits, score 51.35% (from 51.29%) PV: n16 o15 o13 o16 o17 s18 n15
The score of 51.35% is from the U value above (my guess), then what about that "
from 51.29%"? Is that the winning rate estimated by Leela prior to play N16?
Ok, so now the situation on the board is as follow:

Leela just played N16
- Click Here To Show Diagram Code
[go]$$c Leela just played N16
$$ ---------------------------------------
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . X . . |
$$ | . . . . . . . . . . . . . . X X O O . |
$$ | . . . O . . . . . . . . # . . O . . . |
$$ | . . . . . . . . . . . . . . . O . . . |
$$ | . . . . . . . . . . . . . . . . O . . |
$$ | . . . . . . . . . . . . . . . X X . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . X . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ | . . . X . . . . . . . . . . . . . . . |
$$ | . . X . . O . . . . . . . . . X . . . |
$$ | . . X O . . . . . . . . . . . . . . . |
$$ | . . O . O . . . . . . . . . . . . . . |
$$ | . . . . . . . . . . . . . . . . . . . |
$$ ---------------------------------------[/go]
If I now input the following gtp command:
Code:
mc_score
I got:
Code:
= W+6.5
W+6.5 is and estimation of Leela result at this point of the game?
Thanks in advance for your replies. I am coming with a lot of questions, but I feel that there a lot of potential from learning from Leela's output, for players several stones weaker than Leela (like me). I am trying to make the extration of such information automatic and displayed in an adequate way to review games.
Best regards,