mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 08:13:08 +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:
parent
0282edc0b0
commit
d29c8bd5d4
1 changed files with 3 additions and 3 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue