1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03:09 +00:00

Remove extraReduction

Since bestValue becomes value and beta - alpha is always non-negative,
extraReduction is always false, hence it has no effect.

This patch includes small changes to improve readability.

closes https://github.com/official-stockfish/Stockfish/pull/4505

No functional change
This commit is contained in:
MinetaS 2023-04-07 14:30:59 +00:00 committed by Joost VandeVondele
parent 6e63dd63a4
commit a5643b89fd

View file

@ -1335,15 +1335,14 @@ moves_loop: // When in check, search starts here
if (PvNode && value < beta) // Update alpha! Always alpha < beta
{
// Reduce other moves if we have found at least one score improvement (~1 Elo)
if ( depth > 1
&& ((improving && complexity > 971) || (value < (5 * alpha + 75 * beta) / 87) || depth < 6)
&& ( (improving && complexity > 971)
|| value < (5 * alpha + 75 * beta) / 87
|| depth < 6)
&& beta < 12535
&& value > -12535) {
bool extraReduction = depth > 2 && alpha > -12535 && bestValue != -VALUE_INFINITE && (value - bestValue) > (7 * (beta - alpha)) / 8;
depth -= 1 + extraReduction;
}
&& value > -12535)
depth -= 1;
assert(depth > 0);
alpha = value;