From 04dd59fb4d6960c5018f06921728f6ce3e28a0aa Mon Sep 17 00:00:00 2001 From: Tomasz Sobczyk Date: Thu, 13 Jan 2022 01:35:55 +0100 Subject: [PATCH] dsa --- src/search.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/search.c b/src/search.c index 2c97b76..b1e1834 100644 --- a/src/search.c +++ b/src/search.c @@ -80,10 +80,10 @@ int search_explosion(Position* thisThread) { // Reductions lookup tables, initialized at startup static int Reductions[MAX_MOVES]; // [depth or moveNumber] -INLINE Depth reduction(int i, Depth d, int mn, bool rangeReduction) +INLINE Depth reduction(int i, Depth d, int mn) { int r = Reductions[d] * Reductions[mn]; - return (r + 534) / 1024 + (!i && r > 904) + rangeReduction; + return (r + 534) / 1024 + (!i && r > 904); } INLINE int futility_move_count(bool improving, Depth depth) @@ -1140,7 +1140,7 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, moveCountPruning = moveCount >= futility_move_count(improving, depth); // Reduced depth of the next LMR search - int lmrDepth = max(newDepth - reduction(improving, depth, moveCount, rangeReduction > 2), 0); + int lmrDepth = max(newDepth - reduction(improving, depth, moveCount), 0); if ( captureOrPromotion || givesCheck) @@ -1293,7 +1293,7 @@ INLINE Value search_node(Position *pos, Stack *ss, Value alpha, Value beta, || !captureOrPromotion || (cutNode && (ss-1)->moveCount > 1))) { - Depth r = reduction(improving, depth, moveCount, rangeReduction > 2); + Depth r = reduction(improving, depth, moveCount); if ( PvNode && bestMoveCount <= 3