mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +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());
|
depth, bestMove, unadjustedStaticEval, tt.generation());
|
||||||
|
|
||||||
// Adjust correction history
|
// Adjust correction history
|
||||||
if (!ss->inCheck && (!bestMove || !pos.capture(bestMove))
|
if (!ss->inCheck && !(bestMove && pos.capture(bestMove))
|
||||||
&& !(bestValue >= beta && bestValue <= ss->staticEval)
|
&& ((bestValue < ss->staticEval && bestValue < beta) // negative correction & no fail high
|
||||||
&& !(!bestMove && bestValue >= ss->staticEval))
|
|| (bestValue > ss->staticEval && bestMove))) // positive correction & no fail low
|
||||||
{
|
{
|
||||||
const auto m = (ss - 1)->currentMove;
|
const auto m = (ss - 1)->currentMove;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue