]> git.sesse.net Git - stockfish/commitdiff
Tweak trapped rook penalty
authorVizvezdenec <Vizvezdenec@gmail.com>
Wed, 22 Jan 2020 00:54:44 +0000 (03:54 +0300)
committerStéphane Nicolet <cassio@free.fr>
Thu, 23 Jan 2020 18:03:25 +0000 (19:03 +0100)
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...

src/evaluate.cpp

index 7c7ce95cebcf27d72960c0d34d45857e3d10f052..fad0771db4aa3e04f1be929f70443f34c7d8b536 100644 (file)
@@ -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 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
   constexpr Score WeakQueen          = S( 49, 15);
 
 #undef S