Ensure valid score range for seekMate
With MultiPV, score is set to -VALUE_INFINITE on fail low.
These lines are then incorrectly searched with seekMate
starting at depth 3 (seekMate threshold 25194).
If score is just checked against -VALUE_INFINITE,
seekMate would barely be used in MultiPV lines anymore.
With this patch, we use previousScore for MultiPV to use the
best available scores and check for -VALUE_INFINITE.
In addition, it includes a patch by @HappyNoah-1 that only calculates
seekMateThreshold once when rootDepth is increased.
No Fishtest test, as it is non-functional with MultiPV 1.
The issue came up during a Codex review in another repository.
STC for the @HappyNoah-1 patch
https://tests.stockfishchess.org/tests/view/6ad67dc7733e627f7058c938
closes https://github.com/official-stockfish/Stockfish/pull/7239
No functional change
Co-authored-by: Robert Nurnberg <28635489+robertnurnberg@users.noreply.github.com>
Co-authored-by: Noah Lee <noahjlee314@gmail.com>