]> git.sesse.net Git - stockfish/commitdiff
Use VALUE_DRAW instead of VALUE_ZERO where better
authorMarco Costalba <mcostalba@gmail.com>
Sun, 10 Oct 2010 08:04:09 +0000 (09:04 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 10 Oct 2010 08:05:46 +0000 (09:05 +0100)
No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/endgame.cpp
src/evaluate.cpp
src/search.cpp

index abf27d52b66860eb39be3f6ce4d9137a2fe842ee..f9feb00e067b5dd8bd2aa18af4e9ac1f2e28fcbd 100644 (file)
@@ -367,12 +367,12 @@ Value EvaluationFunction<KBBKN>::apply(const Position& pos) const {
 /// king alone are always draw.
 template<>
 Value EvaluationFunction<KmmKm>::apply(const Position&) const {
-  return VALUE_ZERO;
+  return VALUE_DRAW;
 }
 
 template<>
 Value EvaluationFunction<KNNK>::apply(const Position&) const {
-  return VALUE_ZERO;
+  return VALUE_DRAW;
 }
 
 /// KBPKScalingFunction scales endgames where the stronger side has king,
index 132b8c1b4b7a5e6c3f081c94acef00b814f3a82a..0f0034b2101eedd36a546dbb01d7a99be64c745e 100644 (file)
@@ -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();
 
index d54794bbc8712205a066cf977da4f692b3cb4c02..fca542e09278d94cb4ffe08169513075cb78e778 100644 (file)
@@ -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;