From: Topologist Date: Mon, 28 Mar 2022 09:50:08 +0000 (+0200) Subject: Play more positional in endgames X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;ds=sidebyside;h=471d93063a8fc1803a4a34397fe39e2344a05d76;p=stockfish Play more positional in endgames This patch chooses the delta value (which skews the nnue evaluation between positional and materialistic) depending on the material: If the material is low, delta will be higher and the evaluation is shifted to the positional value. If the material is high, the evaluation will be shifted to the psqt value. I don't think slightly negative values of delta should be a concern. Passed STC: https://tests.stockfishchess.org/tests/view/62418513b3b383e86185766f LLR: 2.94 (-2.94,2.94) <0.00,2.50> Total: 28808 W: 7832 L: 7564 D: 13412 Ptnml(0-2): 147, 3186, 7505, 3384, 182 Passed LTC: https://tests.stockfishchess.org/tests/view/62419137b3b383e861857842 LLR: 2.96 (-2.94,2.94) <0.50,3.00> Total: 58632 W: 15776 L: 15450 D: 27406 Ptnml(0-2): 42, 5889, 17149, 6173, 63 closes https://github.com/official-stockfish/Stockfish/pull/3971 Bench: 7588855 --- diff --git a/src/nnue/evaluate_nnue.cpp b/src/nnue/evaluate_nnue.cpp index 9254e36f..9ee599f4 100644 --- a/src/nnue/evaluate_nnue.cpp +++ b/src/nnue/evaluate_nnue.cpp @@ -143,7 +143,7 @@ namespace Stockfish::Eval::NNUE { // overaligning stack variables with alignas() doesn't work correctly. constexpr uint64_t alignment = CacheLineSize; - int delta = 7; + int delta = 10 - pos.non_pawn_material() / 1515; #if defined(ALIGNAS_ON_STACK_VARIABLES_BROKEN) TransformedFeatureType transformedFeaturesUnaligned[