Skip to content

Commit

Permalink
First try, increase reduction for shuffling moves
Browse files Browse the repository at this point in the history
  • Loading branch information
MJZ1977 committed Feb 26, 2019
1 parent 7c5f5fb commit c3ef1ab
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,7 @@ namespace {
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval, maxValue, pureStaticEval;
bool ttHit, ttPv, inCheck, givesCheck, improving;
bool ttHit, ttPv, inCheck, givesCheck, improving, shuffling;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture;
Piece movedPiece;
int moveCount, captureCount, quietCount;
Expand Down Expand Up @@ -1014,6 +1014,8 @@ namespace {
// Update the current move (this must be done after singular extension search)
ss->currentMove = move;
ss->continuationHistory = &thisThread->continuationHistory[movedPiece][to_sq(move)];

shuffling = pos.rule50_count() > 16;

// Step 15. Make the move
pos.do_move(move, st, givesCheck);
Expand All @@ -1029,6 +1031,9 @@ namespace {
// Decrease reduction if position is or has been on the PV
if (ttPv)
r -= ONE_PLY;

if (shuffling && pos.rule50_count() > 1)
r += ONE_PLY;

// Decrease reduction if opponent's move count is high (~10 Elo)
if ((ss-1)->moveCount > 15)
Expand Down

0 comments on commit c3ef1ab

Please sign in to comment.