Lc0 Game Length

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

Moderators: hgm, Rebel, chrisw

Hamster
Posts: 26
Joined: Sat May 25, 2013 6:38 pm
Location: Wien

Lc0 Game Length

Post by Hamster »

Lc0 calculates WDL predictions but does it also calculate game length predictions? It might be a by-product.

I would be very much interested in which positions result (on average) in longer games and which ones lead to shorter one. In a correspondence game sometimes you want to drag a game out and sometimes you want to come to an end soon and Lc0 might help in finding the respective positions.
User avatar
yurikvelo
Posts: 710
Joined: Sat Dec 06, 2014 1:53 pm

Re: Lc0 Game Length

Post by yurikvelo »

Game length is DTM or distance to adjudication (e.g. +5 eval)

DTM is very different from early adjudiction.
brianr
Posts: 536
Joined: Thu Mar 09, 2006 3:01 pm

Re: Lc0 Game Length

Post by brianr »

Yes, it does. In addition to the Policy and Value NN output heads used with AZ, Lc0 added a third called moves left head (MLH).
It does not appear to add playing strength, but it does tend to reduce the "trolling" Lc0 was known for in endgames.
See:
https://github.com/LeelaChessZero/lc0/search?q=mlh
User avatar
yurikvelo
Posts: 710
Joined: Sat Dec 06, 2014 1:53 pm

Re: Lc0 Game Length

Post by yurikvelo »

I don't think he asks about EG. After +5.00 no need to play further.
Correspondence game is definitely not about DTM-solving.
If you have 2 moves in multiPV, one +1.00 and second +1.50 you cannot predict which PV will lead to +5.00 in less plies.
Early reward on horizon doesn't guarantee queen advantage in less plies.
Hamster
Posts: 26
Joined: Sat May 25, 2013 6:38 pm
Location: Wien

Re: Lc0 Game Length

Post by Hamster »

I did not have the endgame in mind. I am thinking more about finding complex positions and one of the characteristics of a complex position is that they tend to lead to longer games compared to symmetric, open positions which often result in exchanges and shorter games. The only way how I currently get a metric of how long a game might last with a given position to play an engine tournament and then look at the average number of moves. I am sure an expected number of moves until the end of the game would be something that is possible to get out of Lc0 but as I am not a programmer I would not be able to do it myself. So I was wondering if such a metric happens to exist already or if there is a certain proxy available.
User avatar
yurikvelo
Posts: 710
Joined: Sat Dec 06, 2014 1:53 pm

Re: Lc0 Game Length

Post by yurikvelo »

Hamster wrote: Tue Sep 07, 2021 11:44 am I did not have the endgame in mind. I am thinking more about finding complex positions and one of the characteristics of a complex position is that they tend to lead to longer games compared to symmetric, open positions which often result in exchanges and shorter games. The only way how I currently get a metric of how long a game might last with a given position to play an engine tournament and then look at the average number of moves. I am sure an expected number of moves until the end of the game would be something that is possible to get out of Lc0 but as I am not a programmer I would not be able to do it myself. So I was wondering if such a metric happens to exist already or if there is a certain proxy available.
I don't think this feature:
https://lczero.org/blog/2020/05/lc0-v0. ... -left-head

has anything to do with predicting game length after opening / early midgame
I don't know how it is exactly working, from how it is described I can suggest it prefer (values higher) "symmetric, open positions which often result in exchanges and shorter games"
So, PV eval is biased toward simplification.

I think best way at the moment is doing fast multiPV with SF-abrok to choose move candidates.
Then do Monte-carlo (what you call engine tournament), but self-play with single engine (not 2 engines). No reason to spend CPU/RAM resources on 2 engines.
Automated play probably is possible with Cutechess-CLI and full automatization (multiPV + Monte-carlo on first N moves satysfying threshold criteria) possible with some script (e.g. Python) to run cutechess
Hamster
Posts: 26
Joined: Sat May 25, 2013 6:38 pm
Location: Wien

Re: Lc0 Game Length

Post by Hamster »

Great answer from yurikvelo, thank you.