mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 02:47:45 +00:00
Rewrite of 'Adjust correction history' condition
Current condition is convoluted and hard to understand because of several negations. Also added 2 comments to make the concept behind the condition better understandable. closes https://github.com/official-stockfish/Stockfish/pull/5685 No functional change
This commit is contained in:
committed by
Disservin
parent
0282edc0b0
commit
d29c8bd5d4
+3
-3
@@ -1425,9 +1425,9 @@ moves_loop: // When in check, search starts here
|
||||
depth, bestMove, unadjustedStaticEval, tt.generation());
|
||||
|
||||
// Adjust correction history
|
||||
if (!ss->inCheck && (!bestMove || !pos.capture(bestMove))
|
||||
&& !(bestValue >= beta && bestValue <= ss->staticEval)
|
||||
&& !(!bestMove && bestValue >= ss->staticEval))
|
||||
if (!ss->inCheck && !(bestMove && pos.capture(bestMove))
|
||||
&& ((bestValue < ss->staticEval && bestValue < beta) // negative correction & no fail high
|
||||
|| (bestValue > ss->staticEval && bestMove))) // positive correction & no fail low
|
||||
{
|
||||
const auto m = (ss - 1)->currentMove;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user