Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1177,27 +1177,27 @@ Value Search::Worker::search(

// These reduction adjustments have no proven non-linear scaling

r += 700 - 6 * msb(depth); // Base reduction offset to compensate for other tweaks
r -= moveCount * (64 - 2 * msb(depth));
r += 671; // Base reduction offset to compensate for other tweaks
r -= moveCount * 66;
r -= std::abs(correctionValue) / 30450;

// Increase reduction for cut nodes
if (cutNode)
r += 3092 + 2 * msb(depth) + (980 + 15 * msb(depth)) * !ttData.move;
r += 3094 + 1056 * !ttData.move;

// Increase reduction if ttMove is a capture
if (ttCapture)
r += 1467 - 40 * msb(depth);
r += 1415;

// Increase reduction if next ply has a lot of fail high
if ((ss + 1)->cutoffCnt > 2)
r += 1041 + 34 * msb(depth) + allNode * (752 + 226 * msb(depth));
r += 1051 + allNode * 814;

r += (ss + 1)->quietMoveStreak * 50;

// For first picked move (ttMove) reduce reduction
if (move == ttData.move)
r -= 2096 + 27 * msb(depth);
r -= 2018;

if (capture)
ss->statScore = 803 * int(PieceValue[pos.captured_piece()]) / 128
Expand All @@ -1208,7 +1208,7 @@ Value Search::Worker::search(
+ (*contHist[1])[movedPiece][move.to_sq()];

// Decrease/increase reduction for moves with a good/bad history
r -= ss->statScore * (734 - 12 * msb(depth)) / 8192;
r -= ss->statScore * 794 / 8192;

// Step 17. Late moves reduction / extension (LMR)
if (depth >= 2 && moveCount > 1)
Expand Down Expand Up @@ -1250,7 +1250,7 @@ Value Search::Worker::search(
{
// Increase reduction if ttMove is not present
if (!ttData.move)
r += 1178 + 35 * msb(depth);
r += 1118;

if (depth < 5)
r += 1080;
Expand Down