1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03:09 +00:00

Tweak SEE margin in pruning conditions

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
This commit is contained in:
VoyagerOne 2016-09-14 09:09:41 -04:00 committed by Marco Costalba
parent 438805aee8
commit 95ad2b51b7

View file

@ -560,7 +560,7 @@ namespace {
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;
@ -932,35 +932,29 @@ moves_loop: // When in check search starts from here
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
if ( predictedDepth < 3 * ONE_PLY
if ( lmrDepth < 3
&& (!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)
continue;
// 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