mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Introduced the UCI_AnalyseMode option, and made the evaluation function
symmetrical in analyse mode. No functional change when playing games.
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user