]> git.sesse.net Git - stockfish/commitdiff
Do less futility pruning for captures.
authorVizvezdenec <Vizvezdenec@gmail.com>
Tue, 23 Jun 2020 11:55:52 +0000 (14:55 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 24 Jun 2020 19:56:11 +0000 (21:56 +0200)
The idea of this patch is that if capture can be described as
"less valuable piece takes more valuable piece" it's not really correct
to add only piece value of captured piece to static evaluation
since there can be more threats in other places and opponent can't really
do much but recapture our capturing piece which leaves us space for
more captures thus winning more material and increasing static eval.

passed STC
https://tests.stockfishchess.org/tests/view/5ef0167b122d6514328d760f
LLR: 2.96 (-2.94,2.94) {-0.50,1.50}
Total: 24736 W: 4838 L: 4607 D: 15291
Ptnml(0-2): 438, 2812, 5648, 3021, 449

passed LTC
https://tests.stockfishchess.org/tests/view/5ef073bc122d6514328d7693
LLR: 2.93 (-2.94,2.94) {0.25,1.75}
Total: 46152 W: 5865 L: 5567 D: 34720
Ptnml(0-2): 312, 4160, 13886, 4354, 364

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

bench 4789930

src/search.cpp

index 563d1aab410201fe1ff89949f2cef66e2bb5caed..671ac489e82ff595230697eba689f6c77546f08f 100644 (file)
@@ -1026,6 +1026,7 @@ moves_loop: // When in check, search starts from here
               if (   !givesCheck
                   && lmrDepth < 6
                   && !(PvNode && abs(bestValue) < 2)
+                  && PieceValue[MG][type_of(movedPiece)] >= PieceValue[MG][type_of(pos.piece_on(to_sq(move)))]
                   && !ss->inCheck
                   && ss->staticEval + 267 + 391 * lmrDepth + PieceValue[MG][type_of(pos.piece_on(to_sq(move)))] <= alpha)
                   continue;