Skip to content

Commit

Permalink
dsa
Browse files Browse the repository at this point in the history
  • Loading branch information
Sopel97 committed Jan 13, 2022
1 parent 9212c5e commit 04dd59f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/search.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 04dd59f

Please sign in to comment.