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:
parent
438805aee8
commit
95ad2b51b7
1 changed files with 13 additions and 19 deletions
|
@ -560,7 +560,7 @@ namespace {
|
||||||
TTEntry* tte;
|
TTEntry* tte;
|
||||||
Key posKey;
|
Key posKey;
|
||||||
Move ttMove, move, excludedMove, bestMove;
|
Move ttMove, move, excludedMove, bestMove;
|
||||||
Depth extension, newDepth, predictedDepth;
|
Depth extension, newDepth;
|
||||||
Value bestValue, value, ttValue, eval, nullValue;
|
Value bestValue, value, ttValue, eval, nullValue;
|
||||||
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
||||||
bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
|
bool captureOrPromotion, doFullDepthSearch, moveCountPruning;
|
||||||
|
@ -932,35 +932,29 @@ moves_loop: // When in check search starts from here
|
||||||
if (moveCountPruning)
|
if (moveCountPruning)
|
||||||
continue;
|
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
|
if ( lmrDepth < 3
|
||||||
&& (!cmh || (*cmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
|
&& (!cmh || (*cmh )[moved_piece][to_sq(move)] < VALUE_ZERO)
|
||||||
&& (!fmh || (*fmh )[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)))
|
&& (!fmh2 || (*fmh2)[moved_piece][to_sq(move)] < VALUE_ZERO || (cmh && fmh)))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Futility pruning: parent node
|
// Futility pruning: parent node
|
||||||
if ( predictedDepth < 7 * ONE_PLY
|
if ( lmrDepth < 7
|
||||||
&& ss->staticEval + 256 + 200 * predictedDepth / ONE_PLY <= alpha)
|
&& ss->staticEval + 256 + 200 * lmrDepth <= alpha)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// Prune moves with negative SEE at low depths and below a decreasing
|
// Prune moves with negative SEE
|
||||||
// threshold at higher depths.
|
if ( lmrDepth < 8
|
||||||
if (predictedDepth < 8 * ONE_PLY)
|
&& pos.see_sign(move) < Value(-35 * lmrDepth * lmrDepth))
|
||||||
{
|
continue;
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else if ( depth < 3 * ONE_PLY
|
else if ( depth < 7 * ONE_PLY
|
||||||
&& ( mp.see_sign() < 0
|
&& pos.see_sign(move) < Value(-35 * depth / ONE_PLY * depth / ONE_PLY))
|
||||||
|| (!mp.see_sign() && pos.see_sign(move) < VALUE_ZERO)))
|
continue;
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Speculative prefetch as early as possible
|
// Speculative prefetch as early as possible
|
||||||
|
|
Loading…
Add table
Reference in a new issue