It only updates parts incrementally when the board state changes. That way it doesn't need to recalculate the whole net every time.syzygy wrote: ↑Wed Aug 05, 2020 5:00 pmYes, with the NN running on CPU.
Apparently the NN is 20MB but using it in the eval only halves nps, which I find quite remarkable. I haven't tried to understand the code yet, but it seems to rely heavily on vector instructions (unsurprisingly).
So it turns out that NNs are much better than humans at writing evaluation functions (even taking into account speed of execution).
And while 20MB, it has a lot of functionally useless features. Can't compare it 1:1 with Leela.
There are also millions of different ways to encode information inside the NN, speed is affected depending on how much it has to recalculate each ply searched.
See below for examples:
https://github.com/tttak/Stockfish/tree ... hitectures
halfkp-mobility_256x2-32-32 doesn't add a lot of size, but it causes an enormous slowdown.
halfkpe4 (which I don't really understand) quadruples size but only introduces a very minor slowdown.


