From: Vizvezdenec Date: Wed, 22 Jan 2020 00:54:44 +0000 (+0300) Subject: Tweak trapped rook penalty X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=18fc21eba0368fd5e3c4c4b8ee1000c9ac445425;ds=sidebyside Tweak trapped rook penalty This patch greatly increases the endgame penalty for having a trapped rook. Idea was a result of witnessing Stockfish losing some games at CCCC exchanging pieces in the position with a trapped rook which directly lead to a lost endgame. This patch should partially fix such behavior making this penalty high even in deep endgames. Passed STC http://tests.stockfishchess.org/tests/view/5e279d7cc3b97aa0d75bc1c4 LLR: 2.94 (-2.94,2.94) {-1.00,3.00} Total: 8528 W: 1706 L: 1588 D: 5234 Ptnml(0-2): 133, 957, 1985, 1024, 159 Passed LTC http://tests.stockfishchess.org/tests/view/5e27aee4c3b97aa0d75bc1e1 LLR: 2.95 (-2.94,2.94) {0.00,2.00} Total: 88713 W: 11520 L: 11130 D: 66063 Ptnml(0-2): 646, 8170, 26342, 8492, 676 Closes https://github.com/official-stockfish/Stockfish/pull/2510 Bench: 4964462 ---------------------- Comment by Malcolm Campbell: Congrats! I think this might be a common pattern - scores that seem to mainly apply to the midgame are often better with a similar (or at least fairly big) endgame value as well. Maybe there are others eval parameters we can tweak like this... --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 7c7ce95c..fad0771d 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -145,7 +145,7 @@ namespace { constexpr Score ThreatByKing = S( 24, 89); constexpr Score ThreatByPawnPush = S( 48, 39); constexpr Score ThreatBySafePawn = S(173, 94); - constexpr Score TrappedRook = S( 52, 10); + constexpr Score TrappedRook = S( 52, 30); constexpr Score WeakQueen = S( 49, 15); #undef S