Fix long-standing incorrect definition of improving (bench 5552934)
This commit is contained in:
@@ -1022,7 +1022,7 @@ proc search(self: var SearchManager, depth, ply: int, alpha, beta: Score, isPV,
|
||||
# If the static eval from this position is greater than that from 2 plies
|
||||
# ago (our previous turn), then we are improving our position
|
||||
var improving = false
|
||||
if ply > 2 and not self.stack[ply].inCheck and not self.stack[ply - 2].inCheck:
|
||||
if ply > 1 and not self.stack[ply].inCheck and not self.stack[ply - 2].inCheck:
|
||||
improving = staticEval > self.stack[ply - 2].staticEval
|
||||
if not ttHit and not isSingularSearch and not self.stack[ply].inCheck:
|
||||
# Cache static eval immediately
|
||||
|
||||
Reference in New Issue
Block a user