1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00: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:
Tord Romstad 2009-07-17 22:26:01 +02:00
parent 20e8738901
commit b8326edea3
3 changed files with 11 additions and 2 deletions

View file

@ -44,7 +44,7 @@ clean:
### Compiler:
###
CXX = g++
CXX = g++-4.2
# CXX = icpc
@ -67,7 +67,7 @@ include .depend
# Enable/disable debugging, disabled by default
CXXFLAGS += -DNDEBUG
# CXXFLAGS += -DNDEBUG
# Compile with full warnings, and symbol names stripped, you can use

View file

@ -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();

View file

@ -130,6 +130,7 @@ namespace {
o["MultiPV"] = Option(1, 1, 500);
o["UCI_ShowCurrLine"] = Option(false);
o["UCI_Chess960"] = Option(false);
o["UCI_AnalyseMode"] = Option(false);
// Any option should know its name so to be easily printed
for (Options::iterator it = o.begin(); it != o.end(); ++it)