3

On Windows 10 I have installed the latest versions of Arena (v3.5.1) and the Lc0 engine (v0.23.1). However I have only found one weights.pb file that it will accept. The one in the link in this Q&A. But this seems rather weak, Stockfish beats it every time and it seems to make silly mistakes, particularly in the end game.

I have downloaded and unpacked several weights files from the Lc0 Networks page but they all give errors, mostly wrong format or wrong version, even those with today's date.

Can anyone suggest

  1. What am I doing wrong? Am I downloading from the wrong place? The wrong file?
  2. Where I can download a strong set of weights that will work with my version?

To try and give the additional information suggested by Phonon 37 in their comment:-

The version of SF I'm using is that which comes bundled with Arena, Stockfish_9_x64. Both engines are configured to run with 12 "common max CPU cores" under the UCI tab - Options for all UCI Engines. (I've got a Ryzen 8+8 core CPU) They are paired together in the default Engines > Tournament with 10 rounds of 5 minute games.

But the real problem isn't that SF beats Lc0 10-0, it's before they even get to play. Lc0 rejects all but one weights file when I am in (F11) Engine Management > Details, change the -w configuration on the command line and watch it throw the error in the debug window (F4) when I click on "Start this engine right now!". If I could solve this, I could try some different weights until I find one I like.

1
  • To meaningfully answer your first question, please try to provide as much detail as you can, in particular about how you're pairing the two engines to play together (e.g. what's the format), and what computational resources have you given to each engine? Additionally, here's a related post on how the strength of NN-based engines is related to the computational resources used for its training, all of which is related to your question of why your trained version of Lc0 (i.e. the weights you use) is much weaker than SF.
    – Ellie
    Jan 20, 2020 at 13:52

2 Answers 2

5

Since you didn't specify some things, I'm just going to give instructions from scratch. Since you didn't specify which version of lc0 you downloaded, make sure that it's 23.2 (from https://github.com/LeelaChessZero/lc0/releases). If you only have a cpu you want https://github.com/LeelaChessZero/lc0/releases/download/v0.23.2/lc0-v0.23.2-windows-cpu-dnnl.zip. For cpu only, the best net is no longer LD2, although it's still pretty strong. A current list of best nets of different sizes is at https://github.com/LeelaChessZero/lc0/wiki/Best-Nets-for-Lc0. At time of writing, current best 10b net is probably 58599 (https://lczero.org/get_network?sha=2b482ff696e3a4032be1b7477567661527a9fac4166591167bf0a71183f9a669). Based on what you were reporting, I'm guessing you probably had an old version of lc0 that is incompatible with newer nets. It will likely still be a few hundred elo worse than SF without a gpu, but it should at least put up a fight.

Some other minor things to consider:

  1. Lc0 currently has weird time management when playing without an increment. This is a known bug that really should be fixed.
  2. Default lc0 settings are for 2 threads iirc. Setting it to the number of cores you have is better with a cpu, but worse with a gpu.
  3. You will probably get faster advice in the future by asking in the #help channel of the lc0 discord.

I hope this helps.

1
  • Thanks for your help. It appears that I downloaded "the latest" version (23.1) from an out of date source. 23.2 works fine with all the weights files I've tried so far. The link to the "best" weights files is also much appreciated since I'd not found that page. At least ti can now beat SF occasionally and sometimes draw. Jan 22, 2020 at 14:59
-1

Leela chess zero engine aka LC0 is a neural net aka NN based attempt to learn to play chess. Arena is a graphical interface aka GUI to interact with it.

Why doesnt it do better against Stockfish?

Add a 30 move opening book and a similar one for endgames and then train the NNs better longer and you will do better against Stockfish. LC0 is self learning so the more training the better it gets. Using a pretrained network is also possible.

As to weights file used to train it there are many factors in play. Win10 is frequently a problem itself. How big and fast is your PC? Have you killed all the crapware that interferes with running things?

It could be a bug in the version of LC0 you are using. V3.2 is the latest stable version and you should try that one.

It could be in problems with the formatting of the Pb file used for weighting. Maybe you have errors in downloading. There are many reasons why software does not work like you expect.

I have found oodles of pb files. WHERE did you download yours from? Didn't you find many many pb files from the same place you got the LC0 from? Try some from here: http://lczero.org/networks/

The name will be some long hash string, for example: b82f0b34b96c8f38f68ee97703b4149ab976122ca9bed6120f9dea88d733d266

Rename to "weights" (for convenience).

Place in the same directory with the lc0 application. On a Mac this is /Users/[username]/lc0/build/release/.

The file will be found automatically after opening lc0 in the command line.

Note that the latest network is not always the strongest. To find a strong network ID, check the "Test30" tab in the Google Doc.

3
  • My PC has an 8 core (+8 virtual) Ryzen processor with 16Gb of RAM. There would normally be only a browser and email client running. But this is irrelevant, I'm not asking about performance, just working weights files. I've been downloading them from the site you quote, what exactly did you do to get working ones?. According to Github the latest version is V0.23.2. There is no mention of a V3.2. The Windows version requires a weights file to be supplied via the -w switch on the command line. It does not automatically find it. Jan 20, 2020 at 21:35
  • When I searched the reference I found said 3.2 or else switched it around and I made a typo as I copied it. Win10 can do many funny things to you that you do not realize. I guarantee that windoze has a lot more than a browser and email client running. If it is not RAM size or other issue then maybe the file did not work and you only assumed it did. Do you really need more than the one that is rated highest?? Jan 20, 2020 at 21:58
  • Stable release v0.23.2 31 December 2019; 18 days ago per wikipedia Jan 21, 2020 at 3:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.