Lc0 Evaluation Explanation

Discussion of anything and everything relating to chess playing software and machines.

Moderators: Harvey Williamson, bob, hgm

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Posts: 1404
Joined: Mon Apr 23, 2018 5:54 am

Re: Lc0 Evaluation Explanation

Post by jp » Fri Aug 30, 2019 9:17 pm


There is a link in the first post of the thread.

We've already said N is the number of visits.
Last edited by jp on Fri Aug 30, 2019 9:47 pm, edited 1 time in total.

Posts: 6442
Joined: Mon Jan 08, 2007 11:31 pm
Location: PA USA
Full name: Louis Zulli

Re: Lc0 Evaluation Explanation

Post by zullil » Fri Aug 30, 2019 9:26 pm

cma6 wrote:
Fri Aug 30, 2019 9:13 pm
Do you know the meaning of these terms: "P", "Q", "Q+U", & "V"?
I am guessing that V = visits. But, as pointed out, Be2 does not have the highest V value of all the moves shown. Or does the lc0 site have an explanation of the parameters, since when I searched here for "visits", it gave me no new information.
I'm actually a newcomer to NN engines, so I'm still learning. I believe P is the probability that the move is the right one to play in this position, based solely on the output of the net, with no additional searching/roll outs. So the P values give an initial suggestion of which moves are likely good ones, and so worthy of further analysis. There is a discussion of these various variables here: ... Chess-Zero

Love to find something better, but not as technical as reading a research article!

Posts: 178
Joined: Thu May 29, 2014 3:58 pm

Re: Lc0 Evaluation Explanation

Post by cma6 » Sat Aug 31, 2019 1:09 am

Thanks for the excellent link.

Posts: 1404
Joined: Mon Apr 23, 2018 5:54 am

Re: Lc0 Evaluation Explanation

Post by jp » Mon Sep 02, 2019 2:01 pm

Hamster wrote:
Fri Aug 30, 2019 8:23 pm
jp wrote:
Fri Aug 30, 2019 12:17 am
It looks to me that it does have the highest Q+U, as well as the highest N, but the only one the list of moves is in order for is N (visits).

I don't know what the "(+7)" in the top line means or the "(712)".
You are right, Q+U is actually the highest.

If Lc0 chooses the move with the most visits what would be a useful interpretation of the other variables?
E.g. why not choose the average expected value of all playouts for a move (Q)?
I found the meaning of the "(+7)", etc. It's "how many visits are processed by other threads when this is printed".
I still don't know what the "(712)", etc. mean.

By useful interpretation, I guess you mean from the chess point of view. Many of these outputted variables may be mainly useful from the computing point of view.

If it just chooses Q, it'll run into the standard MCTS problem where an engine "may favor a losing move with only one or a few forced refutations, due to the vast majority of other moves providing a better random playout score than other, better moves".

Posts: 162
Joined: Wed May 23, 2018 7:29 pm

Re: Lc0 Evaluation Explanation

Post by crem » Tue Sep 03, 2019 11:10 am

Code: Select all

e2e4 (123) N: 329 (+ 4) (V: -12.34%) (P:38.12%) (Q: -0.2325) (U: 0.2394) (Q+U: 0.0069)
 ^    ^       ^    ^      ^           ^          ^            ^           ^
 |    |       |    |      |           |          |            |           Q+U, see below
 |    |       |    |      |           |          |           U from PUCT formula,
 |    |       |    |      |           |          |           see below.
 |    |       |    |      |           |         Average value of V in a subtree
 |    |       |    |      |          Probability of this move, from NN, 0%..100%
 |    |       |    |     Expected outcome for this position, directly from NN, -100%..100%
 |    |       |   How many visits are processed by other threads when this is printed.
 |    |      Number of visits. The move with maximum visits is chosen for play.
Move  |
    Internal move id (for debugging)

* U = P * Cpuct * sqrt(sum of N of all moves) / (N + 1)
  CPuct is a search parameter, can be changed with a command line flag.
* The move with largest Q+U will be visited next
* The move with the highest N is played when search is stopped
See also same formula here:

Posts: 14
Joined: Sat May 25, 2013 4:38 pm
Location: Wien

Re: Lc0 Evaluation Explanation

Post by Hamster » Fri Sep 06, 2019 9:35 pm

Nice that the most useful explanation came right on my birthday :mrgreen:

Yes, useful was meant from a chess point of view. More specifically I am looking for ideas on how to decide between
different moves for correspondence chess (CC) but also for an OTB opening repertoire. In CC often times one prefers
complex positions to simple ones and one tries to avoid drawing lines and I am hoping to get such info from the lc0
output. Exciting would be to see the draw-percentage from the playouts.

Post Reply