mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 06:17:49 +00:00
Refactor bestvalue adjustment in qsearch
closes https://github.com/official-stockfish/Stockfish/pull/4935 No functional change
This commit is contained in:
@@ -72,7 +72,7 @@ Fabian Beuke (madnight)
|
|||||||
Fabian Fichter (ianfab)
|
Fabian Fichter (ianfab)
|
||||||
Fanael Linithien (Fanael)
|
Fanael Linithien (Fanael)
|
||||||
fanon
|
fanon
|
||||||
Fauzi Akram Dabat (FauziAkram)
|
Fauzi Akram Dabat (fauzi2)
|
||||||
Felix Wittmann
|
Felix Wittmann
|
||||||
gamander
|
gamander
|
||||||
Gabriele Lombardo (gabe)
|
Gabriele Lombardo (gabe)
|
||||||
|
|||||||
+2
-2
@@ -1616,8 +1616,8 @@ Value qsearch(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth) {
|
|||||||
return mated_in(ss->ply); // Plies to mate from the root
|
return mated_in(ss->ply); // Plies to mate from the root
|
||||||
}
|
}
|
||||||
|
|
||||||
if (std::abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY)
|
if (std::abs(bestValue) < VALUE_TB_WIN_IN_MAX_PLY && bestValue >= beta)
|
||||||
bestValue = bestValue >= beta ? (3 * bestValue + beta) / 4 : bestValue;
|
bestValue = (3 * bestValue + beta) / 4;
|
||||||
|
|
||||||
// Save gathered info in transposition table
|
// Save gathered info in transposition table
|
||||||
tte->save(posKey, value_to_tt(bestValue, ss->ply), pvHit,
|
tte->save(posKey, value_to_tt(bestValue, ss->ply), pvHit,
|
||||||
|
|||||||
Reference in New Issue
Block a user