Don't attempt probcut if ttMove is not good enough.
authorVizvezdenec <Vizvezdenec@gmail.com>
Wed, 15 Apr 2020 15:22:02 +0000 (18:22 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Wed, 15 Apr 2020 18:33:03 +0000 (20:33 +0200)
This idea is loosely based on xoroshiro idea about raisedBeta and ttmoves.
If our ttmove have low enough ttvalue and is deep enough (deeper than our probcut depth) it makes little sense to try probcut moves, since the ttMove already more or less failed to produce one according to transposition table.

passed STC
https://tests.stockfishchess.org/tests/view/5e9673ddc2718dee3c822920
LLR: 2.95 (-2.94,2.94) {-0.50,1.50}
Total: 72148 W: 14038 L: 13741 D: 44369
Ptnml(0-2): 1274, 8326, 16615, 8547, 1312

passed LTC
https://tests.stockfishchess.org/tests/view/5e96b378c2718dee3c8229bf
LLR: 2.94 (-2.94,2.94) {0.25,1.75}
Total: 89054 W: 11418 L: 10996 D: 66640
Ptnml(0-2): 623, 8113, 26643, 8515, 633

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

bench 4952731

src/search.cpp

index 76011840ba5c33fc297545a22020a04eab3a45ef..dae1e23c0339b6daa0b1fff438d4079b25ee21ff 100644 (file)
@@ -906,8 +906,12 @@ namespace {
         MovePicker mp(pos, ttMove, raisedBeta - ss->staticEval, &captureHistory);
         int probCutCount = 0;
 
         MovePicker mp(pos, ttMove, raisedBeta - ss->staticEval, &captureHistory);
         int probCutCount = 0;
 
-        while (  (move = mp.next_move()) != MOVE_NONE
-               && probCutCount < 2 + 2 * cutNode)
+        while (   (move = mp.next_move()) != MOVE_NONE
+               && probCutCount < 2 + 2 * cutNode
+               && !(   move == ttMove
+                    && (tte->bound() & BOUND_LOWER)
+                    && tte->depth() >= depth - 4
+                    && ttValue < raisedBeta))
             if (move != excludedMove && pos.legal(move))
             {
                 assert(pos.capture_or_promotion(move));
             if (move != excludedMove && pos.legal(move))
             {
                 assert(pos.capture_or_promotion(move));