- /// King safety constants and variables. The king safety scores are taken
- /// from the array SafetyTable[]. Various little "meta-bonuses" measuring
- /// the strength of the attack are added up into an integer, which is used
- /// as an index to SafetyTable[].
-
- // Attack weights for each piece type
- const int QueenAttackWeight = 5;
- const int RookAttackWeight = 3;
- const int BishopAttackWeight = 2;
- const int KnightAttackWeight = 2;
-
- // Bonuses for safe checks, initialized from UCI options
- int QueenContactCheckBonus, DiscoveredCheckBonus;
- int QueenCheckBonus, RookCheckBonus, BishopCheckBonus, KnightCheckBonus;
-
- // Scan for queen contact mates?
- const bool QueenContactMates = true;
-
- // Bonus for having a mate threat, initialized from UCI options
- int MateThreatBonus;
-
- // ThreatBonus[][] contains bonus according to which piece type
- // attacks which one.
- const Value MidgameThreatBonus[8][8] = {
- { V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) }, // not used
- { V(0),V(18), V(0),V(37), V(55), V(55), V(0), V(0) }, // KNIGHT attacks
- { V(0),V(18),V(37), V(0), V(55), V(55), V(0), V(0) }, // BISHOP attacks
- { V(0), V(9),V(27),V(27), V(0), V(37), V(0), V(0) }, // ROOK attacks
- { V(0),V(27),V(27),V(27), V(27), V(0), V(0), V(0) }, // QUEEN attacks
- { V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) }, // not used
- { V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) }, // not used
- { V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) } // not used
- };