]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
A better contempt implementation for Stockfish (#1325)
[stockfish] / src / evaluate.cpp
index 8df586094baa8789b9888d1c6e4ec9e0776ccc3d..9f50ded6c2455b0b359d92e4f1740ada923b9fe1 100644 (file)
@@ -840,7 +840,7 @@ namespace {
     // Initialize score by reading the incrementally updated scores included in
     // the position object (material + piece square tables) and the material
     // imbalance. Score is computed internally from the white point of view.
-    Score score = pos.psq_score() + me->imbalance();
+    Score score = pos.psq_score() + me->imbalance() + Eval::Contempt;
 
     // Probe the pawn hash table
     pe = Pawns::probe(pos);
@@ -903,6 +903,7 @@ namespace {
 
 } // namespace
 
+Score Eval::Contempt = SCORE_ZERO;
 
 /// evaluate() is the evaluator for the outer world. It returns a static evaluation
 /// of the position from the point of view of the side to move.