mirror of
https://github.com/official-stockfish/Stockfish.git
synced 2026-07-22 12:47:08 +00:00
Merge commit 'f00d91f8ac72de8d201f8b50968bb66b1235dc9a' into cluster
This commit is contained in:
+7
-6
@@ -910,7 +910,7 @@ Value Search::Worker::search(
|
||||
// If we have a good enough capture (or queen promotion) and a reduced search
|
||||
// returns a value much above beta, we can (almost) safely prune the previous move.
|
||||
probCutBeta = beta + 174 - 56 * improving;
|
||||
if (depth > 3
|
||||
if (depth >= 3
|
||||
&& !is_decisive(beta)
|
||||
// If value from transposition table is lower than probCutBeta, don't attempt
|
||||
// probCut there and in further interactions with transposition table cutoff
|
||||
@@ -921,6 +921,7 @@ Value Search::Worker::search(
|
||||
assert(probCutBeta < VALUE_INFINITE && probCutBeta > beta);
|
||||
|
||||
MovePicker mp(pos, ttData.move, probCutBeta - ss->staticEval, &thisThread->captureHistory);
|
||||
Depth probCutDepth = std::max(depth - 4, 0);
|
||||
|
||||
while ((move = mp.next_move()) != Move::none())
|
||||
{
|
||||
@@ -949,9 +950,9 @@ Value Search::Worker::search(
|
||||
value = -qsearch<NonPV>(pos, ss + 1, -probCutBeta, -probCutBeta + 1);
|
||||
|
||||
// If the qsearch held, perform the regular search
|
||||
if (value >= probCutBeta)
|
||||
value =
|
||||
-search<NonPV>(pos, ss + 1, -probCutBeta, -probCutBeta + 1, depth - 4, !cutNode);
|
||||
if (value >= probCutBeta && probCutDepth > 0)
|
||||
value = -search<NonPV>(pos, ss + 1, -probCutBeta, -probCutBeta + 1, probCutDepth,
|
||||
!cutNode);
|
||||
|
||||
pos.undo_move(move);
|
||||
|
||||
@@ -959,8 +960,8 @@ Value Search::Worker::search(
|
||||
{
|
||||
// Save ProbCut data into transposition table
|
||||
Distributed::save(tt, threads, thisThread, ttWriter, posKey,
|
||||
value_to_tt(value, ss->ply), ss->ttPv, BOUND_LOWER, depth - 3,
|
||||
move, unadjustedStaticEval, tt.generation());
|
||||
value_to_tt(value, ss->ply), ss->ttPv, BOUND_LOWER,
|
||||
probCutDepth + 1, move, unadjustedStaticEval, tt.generation());
|
||||
|
||||
if (!is_decisive(value))
|
||||
return value - (probCutBeta - beta);
|
||||
|
||||
Reference in New Issue
Block a user