From: Marco Costalba Date: Sat, 11 Oct 2014 07:05:47 +0000 (+0200) Subject: Account for Tempo in do_evaluate() X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=907f912463693683f785b5171c84740640d4b120;hp=c97b702f4d501a9b3f025cd7f02d84c4638b7c2a;ds=sidebyside 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. --- 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); }