X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=c7549ce29237d41f8586cf9dab8a03fccbdb435e;hp=69f0e4c27fa75e4caff8b23db06d911e23819de6;hb=6b909b2343190f2989d21c8f69f40e9f09c530c0;hpb=cedbd3332a4a1574e701bda098a9df1153e299c6 diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 69f0e4c2..c7549ce2 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -267,10 +267,6 @@ namespace { namespace Eval { - Color RootColor; - Value ContemptFactor; - Value ValueDraw[2]; - /// evaluate() is the main evaluation function. It always computes two /// values, an endgame score and a middle game score, and interpolates /// between them based on the remaining material. @@ -309,11 +305,6 @@ namespace Eval { KingDangerTable[1][i] = apply_weight(make_score(t, 0), Weights[KingDangerUs]); KingDangerTable[0][i] = apply_weight(make_score(t, 0), Weights[KingDangerThem]); } - - if (Options["UCI_AnalyseMode"]) - ContemptFactor = VALUE_ZERO; - else - ContemptFactor = Options["Contempt Factor"] * PawnValueMg / 100; } @@ -326,7 +317,7 @@ namespace Eval { Value margin; std::string totals; - RootColor = pos.side_to_move(); + Search::RootColor = pos.side_to_move(); TraceStream.str(""); TraceStream << std::showpoint << std::showpos << std::fixed << std::setprecision(2); @@ -860,8 +851,8 @@ Value do_evaluate(const Position& pos, Value& margin) { // value that will be used for pruning because this value can sometimes // be very big, and so capturing a single attacking piece can therefore // result in a score change far bigger than the value of the captured piece. - score -= KingDangerTable[Us == Eval::RootColor][attackUnits]; - margins[Us] += mg_value(KingDangerTable[Us == Eval::RootColor][attackUnits]); + score -= KingDangerTable[Us == Search::RootColor][attackUnits]; + margins[Us] += mg_value(KingDangerTable[Us == Search::RootColor][attackUnits]); } if (Trace)