From 907f912463693683f785b5171c84740640d4b120 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 11 Oct 2014 09:05:47 +0200 Subject: [PATCH 1/1] Account for Tempo in do_evaluate() This is more correct because we let evaluate() to be a pure dispatcher and also now evaluate and tracing outputs are consistent. No functional change. --- src/evaluate.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 69df7629..acda65fb 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -693,7 +693,7 @@ namespace { // If we have a specialized evaluation function for the current material // configuration, call it and return. if (ei.mi->specialized_eval_exists()) - return ei.mi->evaluate(pos); + return ei.mi->evaluate(pos) + Eval::Tempo; // Probe the pawn hash table ei.pi = Pawns::probe(pos, thisThread->pawnsTable); @@ -793,7 +793,7 @@ namespace { Tracing::sf = sf; } - return pos.side_to_move() == WHITE ? v : -v; + return (pos.side_to_move() == WHITE ? v : -v) + Eval::Tempo; } @@ -872,7 +872,7 @@ namespace Eval { /// of the position always from the point of view of the side to move. Value evaluate(const Position& pos) { - return do_evaluate(pos) + Tempo; + return do_evaluate(pos); } -- 2.39.2