- // Bishop mobility bonus in middle game and endgame, indexed by the number
- // of attacked squares not occupied by friendly pieces. X-ray attacks through
- // queens are also included.
- const Value MidgameBishopMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-25), V(-11), V(3), V(17), V(31), V(45), V(57), V(65),
- // 8 9 10 11 12 13 14 15
- V( 71), V( 74), V(76), V(78), V(79), V(80), V(81), V(81)
- };
-
- const Value EndgameBishopMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-30), V(-16), V(-2), V(12), V(26), V(40), V(52), V(60),
- // 8 9 10 11 12 13 14 15
- V( 65), V( 69), V(71), V(73), V(74), V(75), V(76), V(76)
- };
-
- // Rook mobility bonus in middle game and endgame, indexed by the number
- // of attacked squares not occupied by friendly pieces. X-ray attacks through
- // queens and rooks are also included.
- const Value MidgameRookMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-20), V(-14), V(-8), V(-2), V(4), V(10), V(14), V(19),
- // 8 9 10 11 12 13 14 15
- V( 23), V( 26), V(27), V(28), V(29), V(30), V(31), V(32)
- };
-
- const Value EndgameRookMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-36), V(-19), V(-3), V(13), V(29), V(46), V(62), V(79),
- // 8 9 10 11 12 13 14 15
- V( 95), V(106),V(111),V(114),V(116),V(117),V(118),V(118)
- };
-
- // Queen mobility bonus in middle game and endgame, indexed by the number
- // of attacked squares not occupied by friendly pieces.
- const Value MidgameQueenMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-10), V(-8), V(-6), V(-3), V(-1), V( 1), V( 3), V( 5),
- // 8 9 10 11 12 13 14 15
- V( 8), V(10), V(12), V(15), V(16), V(17), V(18), V(20),
- // 16 17 18 19 20 21 22 23
- V( 20), V(20), V(20), V(20), V(20), V(20), V(20), V(20),
- // 24 25 26 27 28 29 30 31
- V( 20), V(20), V(20), V(20), V(20), V(20), V(20), V(20)
- };
-
- const Value EndgameQueenMobilityBonus[] = {
- // 0 1 2 3 4 5 6 7
- V(-18),V(-13), V(-7), V(-2), V( 3), V (8), V(13), V(19),
- // 8 9 10 11 12 13 14 15
- V( 23), V(27), V(32), V(34), V(35), V(35), V(35), V(35),
- // 16 17 18 19 20 21 22 23
- V( 35), V(35), V(35), V(35), V(35), V(35), V(35), V(35),
- // 24 25 26 27 28 29 30 31
- V( 35), V(35), V(35), V(35), V(35), V(35), V(35), V(35)
+ // OutpostBonus[PieceType][Square] contains outpost bonuses of knights and
+ // bishops, indexed by piece type and square (from white's point of view).
+ const Value OutpostBonus[][64] = {
+ {
+ // A B C D E F G H
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0), // Knights
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0),
+ V(0), V(0), V(4), V(8), V(8), V(4), V(0), V(0),
+ V(0), V(4),V(17),V(26),V(26),V(17), V(4), V(0),
+ V(0), V(8),V(26),V(35),V(35),V(26), V(8), V(0),
+ V(0), V(4),V(17),V(17),V(17),V(17), V(4), V(0),
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0),
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) },
+ {
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0), // Bishops
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0),
+ V(0), V(0), V(5), V(5), V(5), V(5), V(0), V(0),
+ V(0), V(5),V(10),V(10),V(10),V(10), V(5), V(0),
+ V(0),V(10),V(21),V(21),V(21),V(21),V(10), V(0),
+ V(0), V(5), V(8), V(8), V(8), V(8), V(5), V(0),
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0),
+ V(0), V(0), V(0), V(0), V(0), V(0), V(0), V(0) }