Answers.Body: <p>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.</p>
  
  <p>Why doesnt it do better against Stockfish?   </p>
  
  <p>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. </p>
  
  <p>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?</p>
  
  <p>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.  </p>
  
  <p>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. </p>
  
  <p>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:  <a href="http://lczero.org/networks/" rel="nofollow noreferrer">http://lczero.org/networks/</a></p>
  
  <p>The name will be some long hash string, for example: b82f0b34b96c8f38f68ee97703b4149ab976122ca9bed6120f9dea88d733d266</p>
  
  <p>Rename to "weights" (for convenience).</p>
  
  <p>Place in the same directory with the lc0 application. On a Mac this is /Users/[username]/lc0/build/release/.</p>
  
  <p>The file will be found automatically after opening lc0 in the command line.</p>
  
  <p>Note that the latest network is not always the strongest. To find a strong network ID, check the "Test30" tab in the Google Doc.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T21:35:27.157Z
Answers.Text: 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](https://github.com/LeelaChessZero/lc0/releases/tag/v0.23.2) 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.
Answers.UserDisplayName: Peter Jennings
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T21:58:43.540Z
Answers.Text: 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??
Answers.UserDisplayName: edwina oliver
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T03:53:50.597Z
Answers.Text: Stable release 
  v0.23.2                   31 December 2019; 18 days ago per wikipedia
Answers.UserDisplayName: edwina oliver
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T14:58:50.677Z
Answers.LastActivityDate: 2020-01-20T15:04:59.453Z
Answers.LastEditDate: 2020-01-20T15:04:59.453Z
Answers.UserDisplayName: edwina oliver
Answers.Body: <p>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 <a href="https://github.com/LeelaChessZero/lc0/releases" rel="noreferrer">https://github.com/LeelaChessZero/lc0/releases</a>). If you only have a cpu you want <a href="https://github.com/LeelaChessZero/lc0/releases/download/v0.23.2/lc0-v0.23.2-windows-cpu-dnnl.zip" rel="noreferrer">https://github.com/LeelaChessZero/lc0/releases/download/v0.23.2/lc0-v0.23.2-windows-cpu-dnnl.zip</a>. 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 <a href="https://github.com/LeelaChessZero/lc0/wiki/Best-Nets-for-Lc0" rel="noreferrer">https://github.com/LeelaChessZero/lc0/wiki/Best-Nets-for-Lc0</a>. At time of writing, current best 10b net is probably 58599 (<a href="https://lczero.org/get_network?sha=2b482ff696e3a4032be1b7477567661527a9fac4166591167bf0a71183f9a669" rel="noreferrer">https://lczero.org/get_network?sha=2b482ff696e3a4032be1b7477567661527a9fac4166591167bf0a71183f9a669</a>). 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.</p>
  
  <p>Some other minor things to consider:</p>
  
  <ol>
  <li>Lc0 currently has weird time management when playing without an increment. This is a known bug that really should be fixed.</li>
  <li>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.</li>
  <li>You will probably get faster advice in the future by asking in the #help channel of the lc0 discord.</li>
  </ol>
  
  <p>I hope this helps.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-22T14:59:35.553Z
Answers.Text: 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.
Answers.UserDisplayName: Peter Jennings
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T05:11:34.110Z
Answers.LastActivityDate: 2020-01-21T05:11:34.110Z
Answers.UserDisplayName: Oscar Smith
Body: <p>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 <a href="https://chess.stackexchange.com/questions/24754/leela-chess-zero-weight-files">this Q&amp;A</a>. But this seems rather weak, Stockfish beats it every time and it seems to make silly mistakes, particularly in the end game.</p>
  
  <p>I have downloaded and unpacked several weights files from the <a href="http://lczero.org/networks/" rel="nofollow noreferrer">Lc0 Networks page</a> but they all give errors, mostly wrong format or wrong version, even those with today's date.</p>
  
  <p>Can anyone suggest</p>
  
  <ol>
  <li>What am I doing wrong? Am I downloading from the wrong place? The wrong file?</li>
  <li>Where I can download a strong set of weights that will work with my version?</li>
  </ol>
  
  <p>To try and give the additional information suggested by Phonon 37 in their comment:-</p>
  
  <p>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.</p>
  
  <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-20T13:52:24.717Z
Comments.Text: 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](https://chess.stackexchange.com/q/23181/3594) 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.
Comments.UserDisplayName: Ellie
Tags: <engines>
Title: Lc0 weights file
ThreadText: # Lc0 weights file
  
  (Asked by: username_0 on 2020-01-20)
  
  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](https://chess.stackexchange.com/questions/24754/leela-chess-zero-weight-files). 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](http://lczero.org/networks/) 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.
  
  **Tags:** engines
  
  > **Comments:**
  > **username_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](https://chess.stackexchange.com/q/23181/3594) 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.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2020-01-21. Score: 5 | Accepted answer
  
  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.
  
  > **Comments:**
  > **username_0**: 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.  
  
  ---
  
  ### Answer by username_2 on 2020-01-20. Score: -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.
  
  > **Comments:**
  > **username_0**: 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](https://github.com/LeelaChessZero/lc0/releases/tag/v0.23.2) 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.  
  > **username_2**: 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??  
  > **username_2**: Stable release  v0.23.2                   31 December 2019; 18 days ago per wikipedia  
  
  ---
  
  