Run LC Zero in LittleBlitzerGUI

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

Moderators: hgm, Rebel, chrisw

User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

Here a short step-by-step manual to use LC Zero in the LittleBlitzerGUI:

1) Download the Windows CPU-version of Leela here: https://github.com/glinscott/leela-chess/releases
2) Create a folder called Leela and put the three files into it, which you get, when you unzip the downloaded file (Step 1) (client.exe, lczero.exe and libopenblas.dll)
3) Download the latest network-file.
4) Unpack the file and you get a folder called weights_127.txt (127 is the number of the Network at the moment of writing this manual).
5) Rename the file in it to weights.txt.
6) Copy weights.txt in your Leela-folder.

To use LC0 in the LittleBlitzerGUI, type this in the engines.LBE-file of the LittleBlitzerGUI:

Engine=C:\Users\Pohl\Documents\LittleBlitzer\Engines.UCI\Leela\lczero.exe -t 1 --noponder
LB_Name=LC0 v0.5 (CPU) Id=127


(change the path in the first line to the path to your Leela-folder and change the Id=127 number to the number of the Network-Id, you use).



Because the evaluation-output of LC0 is strange, it is strongly recommended to play all games until mate or draw with the LBG. For this, change Adjudicate-rules in the tournament.lbt file.

For example:
AdjudicateMateScore: 9000
AdjudicateMateMoves: 40
AdjudicateDrawMoves: 254
JJJ
Posts: 1346
Joined: Sat Apr 19, 2014 1:47 pm

Re: Run LC Zero in LittleBlitzerGUI

Post by JJJ »

Will you test it for yourself Stephan ?
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

JJJ wrote:Will you test it for yourself Stephan ?
I followed some games on twitch - it seems, Leela is around 2300-2350 Elo at the moment. So, Leela is much too weak to test it with my testing-conditons (all other engines in my gamebase have more than 3100 Elo).

So, at the moment, it makes no sense for me, to test Leela. But lets see, how far Leela can progress.

An very interesting project.
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

With this settings, Leela runs on one Thread/core on the CPU. So it is possible to run more than 1 game simultaneously (set the number of Threads=1 for all opponent engines). But mention, that the newer bigger networks since version 123 are computed very slow by Leela, especially on CPU. But using the GPU would be not fair for the opponent engines, which are running on CPU only, of course.
The nps-value, the LittleBlitzerGUI prints out for Leela, is the number of rollouts done by Leela per second.
jhellis3
Posts: 546
Joined: Sat Aug 17, 2013 12:36 am

Re: Run LC Zero in LittleBlitzerGUI

Post by jhellis3 »

But using the GPU would be not fair for the opponent engines, which are running on CPU only, of course.
Lol.
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

jhellis3 wrote:
But using the GPU would be not fair for the opponent engines, which are running on CPU only, of course.
Lol.
What is so funny about the fact, that a valid testing and rating means, each engine should have access on the same resources?!?
LC Zero can use the GPU for its learning and improving. But not in gameplay for testing and rating.
jhellis3
Posts: 546
Joined: Sat Aug 17, 2013 12:36 am

Re: Run LC Zero in LittleBlitzerGUI

Post by jhellis3 »

You test Brainfish....

And if a GPU is present in the system, nothing is stopping other chess programs from taking advantage of its compute power. Each engine would have access to the same resources.

Imagine having a tournament, and saying well, some of the engines present do not support TBs, so no other engines get to use them either.

Or some engines only support using 1GB of hash, so that is the max for all engines despite the fact that 32GB are available and some support using that much.
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

Brainfish is a special case. That is true. It is not only testing, but generating games, which help Thomas Zipproth to improve the Cerebellum-Library. But it is true, that the Brainfish-rating is not 100% equal to Stockfish, Komodo etc.
It is some kind of experimental testing, what the Library can gain in Elo. Everybody should mention that. And the high number of played games help to close “holes“ in the Library.
But I agree, that Brainfish should not be rated by a ratinglist like FGRL, IPON, CEGT, CCRL. Lets see, if LC Zero will be allowed to use the GPU, when it is tested for those lists. Its not my decision, but I would not allow LC Zero using the GPU.
Last edited by pohl4711 on Sat Apr 14, 2018 7:17 pm, edited 1 time in total.
jhellis3
Posts: 546
Joined: Sat Aug 17, 2013 12:36 am

Re: Run LC Zero in LittleBlitzerGUI

Post by jhellis3 »

What about hash size? Different engines take up different amounts of space per TT entry. If one is more efficient than the other, then assigning a fixed amount of hash size to both engines will result in one having few entries available and thus be at a relative disadvantage. Perhaps each engine should be given enough space so that they can store an equal amount of entries.

There are also different compilers used & different compiler flags used even when the compiler & version are the same....

Ah well, I am sure it will work itself out :wink: .
User avatar
pohl4711
Posts: 2433
Joined: Sat Sep 03, 2011 7:25 am
Location: Berlin, Germany
Full name: Stefan Pohl

Re: Run LC Zero in LittleBlitzerGUI

Post by pohl4711 »

jhellis3 wrote:What about hash size? Different engines take up different amounts of space per TT entry. If one is more efficient than the other, then assigning a fixed amount of hash size to both engines will result in one having few entries available and thus be at a relative disadvantage.

There are also different compilers used & different compiler flags used even when the compiler & version are the same....

Ah well, I am sure it will work itself out :wink: .
The amount of memory for hashing is the resource. Not the hash-algorithm of the engines. If one engine uses the memory better, it can and should play better.

And different compiles can lead to different speed. Because of this, I write on my website, which compiles I use. And so do other testers.

End of discussion.
Last edited by pohl4711 on Sat Apr 14, 2018 7:23 pm, edited 1 time in total.