From 2feeb206ff3dfa2a8419c4541383afd7eee2e5ed Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sun, 10 Oct 2010 09:04:09 +0100 Subject: [PATCH] Use VALUE_DRAW instead of VALUE_ZERO where better No functional change. Signed-off-by: Marco Costalba --- src/endgame.cpp | 4 ++-- src/evaluate.cpp | 2 +- src/search.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/endgame.cpp b/src/endgame.cpp index abf27d52..f9feb00e 100644 --- a/src/endgame.cpp +++ b/src/endgame.cpp @@ -367,12 +367,12 @@ Value EvaluationFunction::apply(const Position& pos) const { /// king alone are always draw. template<> Value EvaluationFunction::apply(const Position&) const { - return VALUE_ZERO; + return VALUE_DRAW; } template<> Value EvaluationFunction::apply(const Position&) const { - return VALUE_ZERO; + return VALUE_DRAW; } /// KBPKScalingFunction scales endgames where the stronger side has king, diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 132b8c1b..0f0034b2 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -334,7 +334,7 @@ Value do_evaluate(const Position& pos, Value& margin) { } // Scale winning side if position is more drawish that what it appears - ScaleFactor sf = eg_value(bonus) > VALUE_ZERO ? mi->scale_factor(pos, WHITE) + ScaleFactor sf = eg_value(bonus) > VALUE_DRAW ? mi->scale_factor(pos, WHITE) : mi->scale_factor(pos, BLACK); Phase phase = mi->game_phase(); diff --git a/src/search.cpp b/src/search.cpp index d54794bb..fca542e0 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -994,7 +994,7 @@ namespace { // Step 2. Check for aborted search and immediate draw if (AbortSearch || ThreadsMgr.thread_should_stop(threadID)) - return VALUE_ZERO; + return VALUE_DRAW; if (pos.is_draw() || ply >= PLY_MAX - 1) return VALUE_DRAW; -- 2.39.2