Skip to content

Commit f63d112

Browse files
pb00068snicolet
authored andcommitted
Use (strict) greater-than-operator for 'improving'
Currently on a normal bench run in ~0,7% of cases 'improving' is set to true although the static eval isn't improving at all, just keeping equal. It looks like the strict gt-operator is more appropriate here, since it returns to 'improving' its literal meaning without sideffects. STC {-1.00,3.00} failed yellow: https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28 LLR: -2.93 (-2.94,2.94) {-1.00,3.00} Total: 53155 W: 10170 L: 10109 D: 32876 Ptnml(0-2): 863, 6282, 12251, 6283, 892 non-regression LTC passed: https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41 LLR: 2.98 (-2.94,2.94) {-1.50,0.50} Total: 23961 W: 3114 L: 3018 D: 17829 Ptnml(0-2): 163, 2220, 7114, 2298, 170 CLoses #2496 bench: 4561386
1 parent 7ed817d commit f63d112

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/search.cpp

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,7 @@ namespace {
625625
Move ttMove, move, excludedMove, bestMove;
626626
Depth extension, newDepth;
627627
Value bestValue, value, ttValue, eval, maxValue;
628-
bool ttHit, ttPv, inCheck, givesCheck, improving, didLMR, priorCapture;
628+
bool ttHit, ttPv, inCheck, givesCheck, improving , didLMR, priorCapture;
629629
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture, singularLMR;
630630
Piece movedPiece;
631631
int moveCount, captureCount, quietCount;
@@ -825,8 +825,9 @@ namespace {
825825
&& eval <= alpha - RazorMargin)
826826
return qsearch<NT>(pos, ss, alpha, beta);
827827

828-
improving = (ss-2)->staticEval == VALUE_NONE ? (ss->staticEval >= (ss-4)->staticEval
829-
|| (ss-4)->staticEval == VALUE_NONE) : ss->staticEval >= (ss-2)->staticEval;
828+
// (~13 Elo)
829+
improving = (ss-2)->staticEval == VALUE_NONE ? (ss->staticEval > (ss-4)->staticEval
830+
|| (ss-4)->staticEval == VALUE_NONE) : ss->staticEval > (ss-2)->staticEval;
830831

831832
// Step 8. Futility pruning: child node (~50 Elo)
832833
if ( !PvNode

0 commit comments

Comments
 (0)