Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make sure all features of lczero.exe are implemented in lc0 #333

Closed
mooskagh opened this issue Apr 16, 2018 · 9 comments
Closed

Make sure all features of lczero.exe are implemented in lc0 #333

mooskagh opened this issue Apr 16, 2018 · 9 comments
Labels
lc0 new tensorflow based implementation

Comments

@mooskagh
Copy link
Contributor

  • Time management (aka smart pruning)
  • FPU reduction
    ...
@mooskagh mooskagh added the lc0 new tensorflow based implementation label Apr 16, 2018
@mooskagh
Copy link
Contributor Author

mooskagh commented Apr 30, 2018

So for now there are the following differences between lczero and lc0:

  • (done!) FPU reduction not implemented

  • (done!) Time management (aka smart pruning) is not implemented

  • (done!) There is "virtual loss bug" which is not ported

  • No CPU backend

  • No openCL backend (or other way to support AMD)

  • gzipped weights file is not supported (possibly move that to client.exe side)

  • training data is not gzipped (possibly move that to client.exe side)

  • (fixed!) lc0 plays weaker. 1200 nodes lc0 is roughly equal to 800 nodes lczero. Reasons unknown. Possible hypothesis:

    • due to "virtual loss bug"
    • Networks return slightly different results on openCL and TF weights, and it was trained on openCL weights, so it performs slightly better.
    • due to smart pruning
    • There is indeed a bug, which is hard to notice by debugging random moves.

@mooskagh
Copy link
Contributor Author

For the weaker play, the plan is to:

  • have "virtual loss bug" fixed in lczero to sync up mcts algorithm
  • port openCL backend from lczero to lz0 to sync up NN computation
  • after run evaluation of the same position on lczero and lc0 and debug differences

@jjoshua2
Copy link
Contributor

And now there is option in lczero for 6 piece syzygy WDL and DTZ too. WDL shouldn't be too hard to port, but DTZ root probing relies on SF similarities. @Tilps?

@Tilps
Copy link
Contributor

Tilps commented Apr 30, 2018

The existing tbprobe.cpp logic for both depends on having a material key and are written specifically to use stockfish's Position class API. But should be easy enough to port to some other arbitrary position class.
root_probe (whether using dtz or wdl) depends on having an 'active' status to stop search from using the root moves that root_probe determines are inferior - which requires the 'smart pruning' to be added. Once that exists it should be pretty straight forward.

@killerducky
Copy link
Collaborator

I would add smart pruning to the candidates for why it's 1200nodes to equal 800nodes. It gained quite a lot of Elo for LZGo. Quickest way to test is just disable smart pruning in lczero. If someone doesn't do it first I can try this maybe by Wednesday night.

@mooskagh
Copy link
Contributor Author

mooskagh commented May 1, 2018

When I disable both "smart pruning" and "virtual loss bug", lc0 and lczero produce nearly identical results. https://docs.google.com/spreadsheets/d/1jltiG1l8T0U9tOaIplDnragi60kMGPyCu2tYmRwNXMA/edit#gid=0

I'm going to port both into lc0 then.

@mooskagh
Copy link
Contributor Author

mooskagh commented May 1, 2018

I've implemented "virtual loss bug" and smart pruning, and from quick tests it looks promising. Will wait for more thorough tests to complete.

@mooskagh
Copy link
Contributor Author

mooskagh commented May 8, 2018

  • Fpu reduction implemented and enabled (to 0.2)
  • Virtual loss bug disabled
  • Last input plane is all ones now like in lczero
  • CPuct adjusted to 1.2

@mooskagh
Copy link
Contributor Author

This issue is covered by smaller issues, so closing this umbrella bug.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
lc0 new tensorflow based implementation
Projects
None yet
Development

No branches or pull requests

4 participants