Add functions to check for decisive scores

Thanks to peregrineshahin and robbyrobbyrob for their suggestions.

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

No functional change
This commit is contained in:
Nonlinear2
2024-11-22 11:24:43 +01:00
committed by Disservin
parent 70bb317afe
commit 57e06be71f
5 changed files with 58 additions and 51 deletions
+1 -1
View File
@@ -29,7 +29,7 @@ namespace Stockfish {
Score::Score(Value v, const Position& pos) {
assert(-VALUE_INFINITE < v && v < VALUE_INFINITE);
if (std::abs(v) < VALUE_TB_WIN_IN_MAX_PLY)
if (!is_decisive(v))
{
score = InternalUnits{UCIEngine::to_cp(v, pos)};
}