6

Apparently there was a major update to Stockfish recently such that it gained +50 elo (per regression tests). I'm told that the difference is coming from the new NNUE (efficiently updatable neural network) eval function. In other words Stockfish is now a hybrid engine utilizing AB search & NN eval.

Questions:

  • Is this picture correct?
  • If so, how is the NNUE being trained? Is it only being trained on Stockfish games, or does it also utilize games by other engines?
  • If NNUE is being trained on Stockfish games, does that mean Stockfish's original handwritten eval will continue to be tested and improved on? Or will Stockfish NNUE be trained on Stockfish NNUE games in the future (i.e. the handwritten eval is now obsolete and will not be developed anymore)?
  • Does this mean Stockfish's update process will now take longer? In the sense that for every new patch, a new NNUE would need to be trained, and then the new patch + new network plays against the old patch + old network?
4
  • This is probably a Machine Learning or programming question rather than a chess one
    – David
    Aug 10 '20 at 11:11
  • 1
    @David I don't see why it would not be a chess question. It's completely about Stockfish.
    – Allure
    Aug 10 '20 at 14:03
  • Would you consider a question about the market salary of a lumberjack a chess question? You can make chess boards out of wood....
    – David
    Aug 10 '20 at 17:49
  • 1
    @David I feel like you don't understand the question. If you agree that questions about how Stockfish works are relevant in this SE, then you must agree that this question is also relevant.
    – Allure
    Aug 10 '20 at 19:39
6

Answers to your question:

Is this picture correct?

You got it exactly right. It's exactly that- ab search with NN eval.

If so, how is the NNUE being trained? Is it only being trained on Stockfish games, or does it also utilize games by other engines?

Basically, it's given a bunch of positions and the SF eval at a certain depth, and is trained from that data. I'm not sure where the positions come from but I believe SF self-play.

If NNUE is being trained on Stockfish games, does that mean Stockfish's original handwritten eval will continue to be tested and improved on? Or will Stockfish NNUE be trained on Stockfish NNUE games in the future (i.e. the handwritten eval is now obsolete and will not be developed anymore)?

Yeah, handwritten eval will continue to be worked on. It's also worth noting that SF (the one after the merge) technically uses its old eval in certain types of positions- sadly I can't go into more detail since it's constantly changing with new elo-gaining patches, but as I understand it, classical eval is meant to be used in "messier" positions, while NNUE is used in quieter positions.

Does this mean Stockfish's update process will now take longer? In the sense that for every new patch, a new NNUE would need to be trained, and then the new patch + new network plays against the old patch + old network?

Nope, patches should come at the same speed (currently they're coming at a much faster rate due to obvious improvements being all over, like, I go to sleep, I wake up, already several patches gaining elo....). As I understand, there'd be no need for a new NNUE.

2
  • As I understand, there'd be no need for a new NNUE If there's no need for a new NNUE, what's the point of continuing to work on handwritten eval? Also, does this mean patches will be primarily about search now?
    – Allure
    Aug 12 '20 at 3:13
  • 1
    There would be no need for a new NNUE with every next patch, but NNUE can continue to be trained for sure (don't know if it would still be trained on stockfish traditional eval at depth whatever, or stockfish nnue/handwritten mix as SF is currently using- don't think a decision's been made on that). Even if the NNUE stayed the same, there'd still be a point, as in some positions where it's "crazy" (exact definition of this changes with half the patches right now) classical eval is used instead of NNUE. ATM most of the patches seem to be fine tuning where classical eval and NNUE eval are used.
    – pulsar512b
    Aug 12 '20 at 3:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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