Skip to content

Commit b648247

Browse files
committed
Refine improving-logic
Don't rely on the assumption that we are improving after surviving a check. Instead, compare with the static eval of 2 moves before. STC https://tests.stockfishchess.org/tests/view/5dedfd7f3cff9a249bb9e44d LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 38859 W: 8621 L: 8397 D: 21841 LTC https://tests.stockfishchess.org/tests/view/5dee1b5a3cff9a249bb9e465 LLR: 2.95 (-2.94,2.94) [0.00,3.50] Total: 51130 W: 8308 L: 7996 D: 34826 Bench: 5371271
1 parent 443787b commit b648247

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/search.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -812,8 +812,8 @@ namespace {
812812
&& eval <= alpha - RazorMargin)
813813
return qsearch<NT>(pos, ss, alpha, beta);
814814

815-
improving = ss->staticEval >= (ss-2)->staticEval
816-
|| (ss-2)->staticEval == VALUE_NONE;
815+
improving = (ss-2)->staticEval == VALUE_NONE ? (ss->staticEval >= (ss-4)->staticEval
816+
|| (ss-4)->staticEval == VALUE_NONE) : ss->staticEval >= (ss-2)->staticEval;
817817

818818
// Step 8. Futility pruning: child node (~30 Elo)
819819
if ( !PvNode

0 commit comments

Comments
 (0)