]> git.sesse.net Git - stockfish/blobdiff - src/evaluate.cpp
Add experimental contempt factor
[stockfish] / src / evaluate.cpp
index b5b51d2cdc6ddecd295b0d1474b683436bbe1a82..fdfacc10b910f71d0a7a802afd8f0d8d33efda46 100644 (file)
@@ -268,6 +268,7 @@ namespace {
 namespace Eval {
 
   Color RootColor;
+  Value ValueDrawContempt;
 
   /// evaluate() is the main evaluation function. It always computes two
   /// values, an endgame score and a middle game score, and interpolates
@@ -307,6 +308,8 @@ namespace Eval {
         KingDangerTable[1][i] = apply_weight(make_score(t, 0), Weights[KingDangerUs]);
         KingDangerTable[0][i] = apply_weight(make_score(t, 0), Weights[KingDangerThem]);
     }
+
+    ValueDrawContempt = VALUE_DRAW - Options["Contempt Factor"] * PawnValueMg / 100;
   }