1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

Remove hardcode default values of UCI variables from evaluation

This is the same change we have already done in search.cpp,
this time for evaluation.cpp

If a variable will be populated reading an UCI option
then do not hard code its default values.

This avoids misleadings when reading the sources.

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-05-19 15:35:12 +01:00
parent f83b899f39
commit da579e46b7

View file

@ -44,14 +44,11 @@ namespace {
// Evaluation grain size, must be a power of 2. // Evaluation grain size, must be a power of 2.
const int GrainSize = 4; const int GrainSize = 4;
// Evaluation weights // Evaluation weights, initialized from UCI options
int WeightMobilityMidgame = 0x100; int WeightMobilityMidgame, WeightMobilityEndgame;
int WeightMobilityEndgame = 0x100; int WeightPawnStructureMidgame, WeightPawnStructureEndgame;
int WeightPawnStructureMidgame = 0x100; int WeightPassedPawnsMidgame, WeightPassedPawnsEndgame;
int WeightPawnStructureEndgame = 0x100; int WeightKingSafety[2];
int WeightPassedPawnsMidgame = 0x100;
int WeightPassedPawnsEndgame = 0x100;
int WeightKingSafety[2] = { 0x100, 0x100 };
int WeightSpace; int WeightSpace;
// Internal evaluation weights. These are applied on top of the evaluation // Internal evaluation weights. These are applied on top of the evaluation
@ -232,19 +229,15 @@ namespace {
const int BishopAttackWeight = 2; const int BishopAttackWeight = 2;
const int KnightAttackWeight = 2; const int KnightAttackWeight = 2;
// Bonuses for safe checks for each piece type. // Bonuses for safe checks, initialized from UCI options
int QueenContactCheckBonus = 3; int QueenContactCheckBonus, DiscoveredCheckBonus;
int QueenCheckBonus = 2; int QueenCheckBonus, RookCheckBonus, BishopCheckBonus, KnightCheckBonus;
int RookCheckBonus = 1;
int BishopCheckBonus = 1;
int KnightCheckBonus = 1;
int DiscoveredCheckBonus = 3;
// Scan for queen contact mates? // Scan for queen contact mates?
const bool QueenContactMates = true; const bool QueenContactMates = true;
// Bonus for having a mate threat. // Bonus for having a mate threat, initialized from UCI options
int MateThreatBonus = 3; int MateThreatBonus;
// InitKingDanger[] contains bonuses based on the position of the defending // InitKingDanger[] contains bonuses based on the position of the defending
// king. // king.