Reintroduce depth reduction if the position is not in TT.
STC https://tests.stockfishchess.org/tests/view/
5f4652e85089a564a10d868c
LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 40240 W: 4535 L: 4331 D: 31374
Ptnml(0-2): 215, 3276, 12969, 3410, 250
LTC https://tests.stockfishchess.org/tests/view/
5f46ca5e5089a564a10d86f3
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 63096 W: 3426 L: 3188 D: 56482
Ptnml(0-2): 51, 2798, 25645, 2970, 84
closes https://github.com/official-stockfish/Stockfish/pull/3072
bench:
3611906
+
+ // Step 11. If the position is not in TT, decrease depth by 2
+ if ( PvNode
+ && depth >= 6
+ && !ttMove)
+ depth -= 2;
moves_loop: // When in check, search starts from here
moves_loop: // When in check, search starts from here
// Mark this node as being searched
ThreadHolding th(thisThread, posKey, ss->ply);
// Mark this node as being searched
ThreadHolding th(thisThread, posKey, ss->ply);
- // Step 11. Loop through all pseudo-legal moves until no moves remain
+ // Step 12. Loop through all pseudo-legal moves until no moves remain
// or a beta cutoff occurs.
while ((move = mp.next_move(moveCountPruning)) != MOVE_NONE)
{
// or a beta cutoff occurs.
while ((move = mp.next_move(moveCountPruning)) != MOVE_NONE)
{
// Calculate new depth for this move
newDepth = depth - 1;
// Calculate new depth for this move
newDepth = depth - 1;
- // Step 12. Pruning at shallow depth (~200 Elo)
+ // Step 13. Pruning at shallow depth (~200 Elo)
if ( !rootNode
&& pos.non_pawn_material(us)
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
if ( !rootNode
&& pos.non_pawn_material(us)
&& bestValue > VALUE_TB_LOSS_IN_MAX_PLY)
- // Step 13. Extensions (~75 Elo)
+ // Step 14. Extensions (~75 Elo)
// Singular extension search (~70 Elo). If all moves but one fail low on a
// search of (alpha-s, beta-s), and just one fails high on (alpha, beta),
// Singular extension search (~70 Elo). If all moves but one fail low on a
// search of (alpha-s, beta-s), and just one fails high on (alpha, beta),
[movedPiece]
[to_sq(move)];
[movedPiece]
[to_sq(move)];
- // Step 14. Make the move
+ // Step 15. Make the move
pos.do_move(move, st, givesCheck);
pos.do_move(move, st, givesCheck);
- // Step 15. Reduced depth search (LMR, ~200 Elo). If the move fails high it will be
+ // Step 16. Reduced depth search (LMR, ~200 Elo). If the move fails high it will be
// re-searched at full depth.
if ( depth >= 3
&& moveCount > 1 + 2 * rootNode + 2 * (PvNode && abs(bestValue) < 2)
// re-searched at full depth.
if ( depth >= 3
&& moveCount > 1 + 2 * rootNode + 2 * (PvNode && abs(bestValue) < 2)
- // Step 16. Full depth search when LMR is skipped or fails high
+ // Step 17. Full depth search when LMR is skipped or fails high
if (doFullDepthSearch)
{
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth, !cutNode);
if (doFullDepthSearch)
{
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, newDepth, !cutNode);
value = -search<PV>(pos, ss+1, -beta, -alpha, newDepth, false);
}
value = -search<PV>(pos, ss+1, -beta, -alpha, newDepth, false);
}
pos.undo_move(move);
assert(value > -VALUE_INFINITE && value < VALUE_INFINITE);
pos.undo_move(move);
assert(value > -VALUE_INFINITE && value < VALUE_INFINITE);
- // Step 18. Check for a new best move
+ // Step 19. Check for a new best move
// Finished searching the move. If a stop occurred, the return value of
// the search cannot be trusted, and we return immediately without
// updating best move, PV and TT.
// Finished searching the move. If a stop occurred, the return value of
// the search cannot be trusted, and we return immediately without
// updating best move, PV and TT.
- // Step 19. Check for mate and stalemate
+ // Step 20. Check for mate and stalemate
// All legal moves have been searched and if there are no legal moves, it
// must be a mate or a stalemate. If we are in a singular extension search then
// return a fail low score.
// All legal moves have been searched and if there are no legal moves, it
// must be a mate or a stalemate. If we are in a singular extension search then
// return a fail low score.