mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Introduce Multi-Cut
This was inspired after reading about [Multi-Cut](https://www.chessprogramming.org/Multi-Cut). We now do non-singular cut node pruning. The idea is to prune when we have a "backup plan" in case our expected fail high node does not fail high on the ttMove. For singular extensions, we do a search on all other moves but the ttMove. If this fails high on our original beta, this means that both the ttMove, as well as at least one other move was proven to fail high on a lower depth search. We then assume that one of these moves will work on a higher depth and prune. STC: LLR: 2.96 (-2.94,2.94) [0.50,4.50] Total: 72952 W: 16104 L: 15583 D: 41265 http://tests.stockfishchess.org/tests/view/5c3119640ebc596a450c0be5 LTC: LLR: 2.95 (-2.94,2.94) [0.00,3.50] Total: 27103 W: 4564 L: 4314 D: 18225 http://tests.stockfishchess.org/tests/view/5c3184c00ebc596a450c1662 Bench: 3145487
This commit is contained in:
parent
bb843a00c1
commit
f69106f7bb
1 changed files with 11 additions and 3 deletions
|
@ -943,13 +943,21 @@ moves_loop: // When in check, search starts from here
|
|||
&& tte->depth() >= depth - 3 * ONE_PLY
|
||||
&& pos.legal(move))
|
||||
{
|
||||
Value reducedBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
|
||||
Value singularBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
|
||||
ss->excludedMove = move;
|
||||
value = search<NonPV>(pos, ss, reducedBeta - 1, reducedBeta, depth / 2, cutNode);
|
||||
value = search<NonPV>(pos, ss, singularBeta - 1, singularBeta, depth / 2, cutNode);
|
||||
ss->excludedMove = MOVE_NONE;
|
||||
|
||||
if (value < reducedBeta)
|
||||
if (value < singularBeta)
|
||||
extension = ONE_PLY;
|
||||
|
||||
// Multi-cut pruning
|
||||
// Our ttMove is assumed to fail high, and now we failed high also on a reduced
|
||||
// search without the ttMove. So we assume this expected Cut-node is not singular,
|
||||
// that is multiple moves fail high, and we can prune the whole subtree by returning
|
||||
// the hard beta bound.
|
||||
else if (cutNode && singularBeta > beta)
|
||||
return beta;
|
||||
}
|
||||
else if ( givesCheck // Check extension (~2 Elo)
|
||||
&& pos.see_ge(move))
|
||||
|
|
Loading…
Add table
Reference in a new issue