From 288a604411fa72b06b30f16194cd03592b28f6f2 Mon Sep 17 00:00:00 2001 From: Unai Corzo Date: Mon, 12 Oct 2020 09:03:49 +0200 Subject: [PATCH] Scale factor tweak Add !pawnsOnBothFlanks heuristic to scale factor. STC https://tests.stockfishchess.org/tests/view/5f8080575b3847b5d41f9134 LLR: 2.94 (-2.94,2.94) {-0.25,1.25} Total: 250960 W: 49779 L: 49168 D: 152013 Ptnml(0-2): 4224, 28822, 58802, 29383, 4249 LTC https://tests.stockfishchess.org/tests/view/5f832f498ea73fb8ddf83ddb LLR: 2.95 (-2.94,2.94) {0.25,1.25} Total: 88584 W: 11827 L: 11388 D: 65369 Ptnml(0-2): 585, 8079, 26578, 8412, 638 closes https://github.com/official-stockfish/Stockfish/pull/3179 bench: 3834252 --- src/evaluate.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index c68577a3..425ba6f8 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -905,7 +905,9 @@ namespace { sf = 37 + 3 * (pos.count(WHITE) == 1 ? pos.count(BLACK) + pos.count(BLACK) : pos.count(WHITE) + pos.count(WHITE)); else - sf = std::min(sf, 36 + 7 * pos.count(strongSide)); + sf = std::min(sf, 36 + 7 * pos.count(strongSide)) - 4 * !pawnsOnBothFlanks; + + sf -= 4 * !pawnsOnBothFlanks; } // Interpolate between the middlegame and (scaled by 'sf') endgame score -- 2.39.2