- // to kingAdjacentZoneAttacksCount[WHITE].
- int kingAdjacentZoneAttacksCount[COLOR_NB];
-
- Bitboard pinnedPieces[COLOR_NB];
- Material::Entry* me;
- Pawns::Entry* pi;
- };
-
- #define V(v) Value(v)
- #define S(mg, eg) make_score(mg, eg)
-
- // MobilityBonus[PieceType][attacked] contains bonuses for middle and end
- // game, indexed by piece type and number of attacked squares in the MobilityArea.
- const Score MobilityBonus[][32] = {
- {}, {},
- { S(-75,-76), S(-56,-54), S( -9,-26), S( -2,-10), S( 6, 5), S( 15, 11), // Knights
- S( 22, 26), S( 30, 28), S( 36, 29) },
- { S(-48,-58), S(-21,-19), S( 16, -2), S( 26, 12), S( 37, 22), S( 51, 42), // Bishops
- S( 54, 54), S( 63, 58), S( 65, 63), S( 71, 70), S( 79, 74), S( 81, 86),
- S( 92, 90), S( 97, 94) },
- { S(-56,-78), S(-25,-18), S(-11, 26), S( -5, 55), S( -4, 70), S( -1, 81), // Rooks
- S( 8,109), S( 14,120), S( 21,128), S( 23,143), S( 31,154), S( 32,160),
- S( 43,165), S( 49,168), S( 59,169) },
- { S(-40,-35), S(-25,-12), S( 2, 7), S( 4, 19), S( 14, 37), S( 24, 55), // Queens
- S( 25, 62), S( 40, 76), S( 43, 79), S( 47, 87), S( 54, 94), S( 56,102),
- S( 60,111), S( 70,116), S( 72,118), S( 73,122), S( 75,128), S( 77,130),
- S( 85,133), S( 94,136), S( 99,140), S(108,157), S(112,158), S(113,161),
- S(118,174), S(119,177), S(123,191), S(128,199) }
- };
-
- // Outpost[knight/bishop][supported by pawn] contains bonuses for knights and
- // bishops outposts, bigger if outpost piece is supported by a pawn.
- const Score Outpost[][2] = {
- { S(43,11), S(65,20) }, // Knights
- { S(20, 3), S(29, 8) } // Bishops
- };
-
- // ReachableOutpost[knight/bishop][supported by pawn] contains bonuses for
- // knights and bishops which can reach an outpost square in one move, bigger
- // if outpost square is supported by a pawn.
- const Score ReachableOutpost[][2] = {
- { S(21, 5), S(35, 8) }, // Knights
- { S( 8, 0), S(14, 4) } // Bishops
- };
-
- // RookOnFile[semiopen/open] contains bonuses for each rook when there is no
- // friendly pawn on the rook file.
- const Score RookOnFile[2] = { S(20, 7), S(45, 20) };
-
- // ThreatBySafePawn[PieceType] contains bonuses according to which piece
- // type is attacked by a pawn which is protected or is not attacked.
- const Score ThreatBySafePawn[PIECE_TYPE_NB] = {
- S(0, 0), S(0, 0), S(176, 139), S(131, 127), S(217, 218), S(203, 215) };
-
- // Threat[by minor/by rook][attacked PieceType] contains
- // bonuses according to which piece type attacks which one.
- // Attacks on lesser pieces which are pawn-defended are not considered.
- const Score Threat[][PIECE_TYPE_NB] = {
- { S(0, 0), S(0, 33), S(45, 43), S(46, 47), S(72,107), S(48,118) }, // by Minor
- { S(0, 0), S(0, 25), S(40, 62), S(40, 59), S( 0, 34), S(35, 48) } // by Rook