1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-04 02:29:35 +00:00
BadFish/src/nnue/features
syzygy1 2046d5da30 More incremental accumulator updates
This patch was inspired by c065abd which updates the accumulator,
if possible, based on the accumulator of two plies back if
the accumulator of the preceding ply is not available.

With this patch we look back even further in the position history
in an attempt to reduce the number of complete recomputations.
When we find a usable accumulator for the position N plies back,
we also update the accumulator of the position N-1 plies back
because that accumulator is most likely to be helpful later
when evaluating positions in sibling branches.
By not updating all intermediate accumulators immediately,
we avoid doing too much work that is not certain to be useful.
Overall, roughly 2-3% speedup.

This patch makes the code more specific to the net architecture,
changing input features of the net will require additional changes
to the incremental update code as discussed in the PR #3193 and #3191.

Passed STC:
https://tests.stockfishchess.org/tests/view/5f9056712c92c7fe3a8c60d0
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 10040 W: 1116 L: 968 D: 7956
Ptnml(0-2): 42, 722, 3365, 828, 63

closes https://github.com/official-stockfish/Stockfish/pull/3193

No functional change.
2020-10-22 20:50:16 +02:00
..
feature_set.h More incremental accumulator updates 2020-10-22 20:50:16 +02:00
features_common.h Add NNUE evaluation 2020-08-06 16:37:45 +02:00
half_kp.cpp Use incremental updates more often 2020-09-28 16:54:35 +02:00
half_kp.h Use incremental updates more often 2020-09-28 16:54:35 +02:00
index_list.h Add NNUE evaluation 2020-08-06 16:37:45 +02:00