Skip to content

Commit

Permalink
Move IID up. Bench: 3053895
Browse files Browse the repository at this point in the history
  • Loading branch information
vondele committed Apr 15, 2019
1 parent 1594d15 commit 693a9dc
Showing 1 changed file with 7 additions and 10 deletions.
17 changes: 7 additions & 10 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,13 @@ namespace {
excludedMove = ss->excludedMove;
posKey = pos.key() ^ Key(excludedMove << 16); // Isn't a very good hash
tte = TT.probe(posKey, ttHit);

if (depth >= 8 * ONE_PLY && (!ttHit || (ttHit && !tte->move())))
{
search<NT>(pos, ss, alpha, beta, depth - 7 * ONE_PLY, cutNode);
tte = TT.probe(posKey, ttHit);
}

ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
ttMove = rootNode ? thisThread->rootMoves[thisThread->pvIdx].pv[0]
: ttHit ? tte->move() : MOVE_NONE;
Expand Down Expand Up @@ -825,16 +832,6 @@ namespace {
}
}

// Step 11. Internal iterative deepening (~2 Elo)
if (depth >= 8 * ONE_PLY && !ttMove)
{
search<NT>(pos, ss, alpha, beta, depth - 7 * ONE_PLY, cutNode);

tte = TT.probe(posKey, ttHit);
ttValue = ttHit ? value_from_tt(tte->value(), ss->ply) : VALUE_NONE;
ttMove = ttHit ? tte->move() : MOVE_NONE;
}

moves_loop: // When in check, search starts from here

const PieceToHistory* contHist[] = { (ss-1)->continuationHistory, (ss-2)->continuationHistory,
Expand Down

0 comments on commit 693a9dc

Please sign in to comment.