X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=406d07459df577af3c617b40b91d2257a1774d32;hp=2e1465ff7b8a904966eae06b8623ea73e6bb1482;hb=5a42427cb882f8adcfe65d41f4fabac5d2ac4a5b;hpb=cccf3c815c2f2be884fac4248a2be91b6823df8a diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 2e1465ff..406d0745 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -107,10 +107,10 @@ namespace { // Evaluation weights, indexed by the corresponding evaluation term - enum { Mobility, PawnStructure, PassedPawns, Space, KingSafety }; + enum { Mobility, PawnStructure, PassedPawns, Space, KingSafety, Threats }; const struct Weight { int mg, eg; } Weights[] = { - {289, 344}, {233, 201}, {221, 273}, {46, 0}, {322, 0} + {289, 344}, {233, 201}, {221, 273}, {46, 0}, {322, 0}, {350, 256} }; Score operator*(Score s, const Weight& w) { @@ -566,9 +566,9 @@ namespace { score += popcount(b) * PawnAttackThreat; if (DoTrace) - Trace::add(THREAT, Us, score); + Trace::add(THREAT, Us, score * Weights[Threats]); - return score; + return score * Weights[Threats]; }