Use 35 * depth^2 to calculate see_margin.
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 22636 W: 4212 L: 3990 D: 14434
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 47241 W: 6314 L: 6041 D: 34886
The Movepick SEE is now dead code, retire it.
Bench:
5341477
TTEntry* tte;
Key posKey;
Move ttMove, move, excludedMove, bestMove;
TTEntry* tte;
Key posKey;
Move ttMove, move, excludedMove, bestMove;
- Depth extension, newDepth, predictedDepth;
+ Depth extension, newDepth;
Value bestValue, value, ttValue, eval, nullValue;
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
Value bestValue, value, ttValue, eval, nullValue;
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
if (moveCountPruning)
continue;
if (moveCountPruning)
continue;
- predictedDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO);
+ // Reduced depth of the next LMR search
+ int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO) / ONE_PLY;
// Countermoves based pruning
// Countermoves based pruning
- if ( predictedDepth < 3 * ONE_PLY
&& (!cmh || (*cmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
&& (!fmh || (*fmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
&& (!fmh2 || (*fmh2)[moved_piece][to_sq(move)] < VALUE_ZERO || (cmh && fmh)))
continue;
// Futility pruning: parent node
&& (!cmh || (*cmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
&& (!fmh || (*fmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
&& (!fmh2 || (*fmh2)[moved_piece][to_sq(move)] < VALUE_ZERO || (cmh && fmh)))
continue;
// Futility pruning: parent node
- if ( predictedDepth < 7 * ONE_PLY
- && ss->staticEval + 256 + 200 * predictedDepth / ONE_PLY <= alpha)
+ if ( lmrDepth < 7
+ && ss->staticEval + 256 + 200 * lmrDepth <= alpha)
- // Prune moves with negative SEE at low depths and below a decreasing
- // threshold at higher depths.
- if (predictedDepth < 8 * ONE_PLY)
- {
- Value see_v = predictedDepth < 4 * ONE_PLY ? VALUE_ZERO
- : -PawnValueMg * 2 * int(predictedDepth - 3 * ONE_PLY) / ONE_PLY;
-
- if (pos.see_sign(move) < see_v)
- continue;
- }
+ // Prune moves with negative SEE
+ if ( lmrDepth < 8
+ && pos.see_sign(move) < Value(-35 * lmrDepth * lmrDepth))
+ continue;
- else if ( depth < 3 * ONE_PLY
- && ( mp.see_sign() < 0
- || (!mp.see_sign() && pos.see_sign(move) < VALUE_ZERO)))
- continue;
+ else if ( depth < 7 * ONE_PLY
+ && pos.see_sign(move) < Value(-35 * depth / ONE_PLY * depth / ONE_PLY))
+ continue;
}
// Speculative prefetch as early as possible
}
// Speculative prefetch as early as possible