X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fevaluate.cpp;h=ecc73b3543d4963d17a1fa630231a1d4729b195d;hp=486bb810cb995b6f0a356f95f85ca2a0a09a1abd;hb=044ad593b3c9fa8ab70f9b2ebfc2c36ce398eb5f;hpb=7eefc1f6cc1ceda0a75b0dfef8c7b268e33f052b diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 486bb810..ecc73b35 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -326,8 +326,8 @@ Value do_evaluate(const Position& pos, EvalInfo& ei, int threadID) { // Probe the material hash table ei.mi = MaterialTable[threadID]->get_material_info(pos); - ei.mgValue += ei.mi->mg_value(); - ei.egValue += ei.mi->eg_value(); + ei.mgValue += ei.mi->material_value(); + ei.egValue += ei.mi->material_value(); // If we have a specialized evaluation function for the current material // configuration, call it and return @@ -532,6 +532,14 @@ void read_weights(Color us) { WeightKingSafety[us] = weight_option("Cowardice", WeightKingSafetyInternal); WeightKingSafety[them] = weight_option("Aggressiveness", WeightKingOppSafetyInternal); + // If running in analysis mode, make sure we use symmetrical king safety. + // We do this by replacing both WeightKingSafety[us] and + // WeightKingSafety[them] by their average. + if (get_option_value_bool("UCI_AnalyseMode")) { + WeightKingSafety[us] = (WeightKingSafety[us] + WeightKingSafety[them]) / 2; + WeightKingSafety[them] = WeightKingSafety[us]; + } + WeightSpace = weight_option("Space", WeightSpaceInternal); init_safety();