Skip to content
Permalink
Browse files

Pawn penalties and mobility tweak. Bench: 3746434

  • Loading branch information...
SFisGOD committed Mar 7, 2019
1 parent 1aab5b4 commit 3763b5512da2eaa952f78991c69162a4f613daff
Showing with 16 additions and 16 deletions.
  1. +13 −13 src/evaluate.cpp
  2. +3 −3 src/pawns.cpp
@@ -91,19 +91,19 @@ namespace {
// MobilityBonus[PieceType-2][attacked] contains bonuses for middle and end game,
// indexed by piece type and number of attacked squares in the mobility area.
constexpr Score MobilityBonus[][32] = {
{ S(-62,-81), S(-53,-56), S(-12,-30), S( -4,-14), S( 3, 8), S( 13, 15), // Knights
S( 22, 23), S( 28, 27), S( 33, 33) },
{ S(-48,-59), S(-20,-23), S( 16, -3), S( 26, 13), S( 38, 24), S( 51, 42), // Bishops
S( 55, 54), S( 63, 57), S( 63, 65), S( 68, 73), S( 81, 78), S( 81, 86),
S( 91, 88), S( 98, 97) },
{ S(-58,-76), S(-27,-18), S(-15, 28), S(-10, 55), S( -5, 69), S( -2, 82), // Rooks
S( 9,112), S( 16,118), S( 30,132), S( 29,142), S( 32,155), S( 38,165),
S( 46,166), S( 48,169), S( 58,171) },
{ S(-39,-36), S(-21,-15), S( 3, 8), S( 3, 18), S( 14, 34), S( 22, 54), // Queens
S( 28, 61), S( 41, 73), S( 43, 79), S( 48, 92), S( 56, 94), S( 60,104),
S( 60,113), S( 66,120), S( 67,123), S( 70,126), S( 71,133), S( 73,136),
S( 79,140), S( 88,143), S( 88,148), S( 99,166), S(102,170), S(102,175),
S(106,184), S(109,191), S(113,206), S(116,212) }
{ S(-59,-81), S(-53,-57), S( -9,-25), S( -2,-14), S( 10, 10), S( 14, 17), // Knights
S( 25, 15), S( 26, 27), S( 34, 29) },
{ S(-47,-61), S(-22,-24), S( 19, 0), S( 27, 11), S( 38, 28), S( 51, 42), // Bishops
S( 58, 56), S( 65, 57), S( 61, 64), S( 71, 77), S( 77, 77), S( 80, 81),
S( 90, 88), S( 98, 93) },
{ S(-55,-74), S(-28,-20), S(-10, 24), S( -8, 60), S( -5, 70), S( 1, 83), // Rooks
S( 9,112), S( 18,113), S( 31,133), S( 27,144), S( 34,150), S( 37,164),
S( 50,167), S( 47,171), S( 56,173) },
{ S(-38,-36), S(-29,-10), S( 1, 6), S( 1, 21), S( 17, 36), S( 17, 51), // Queens
S( 32, 62), S( 41, 74), S( 39, 79), S( 45, 90), S( 59, 92), S( 60,104),
S( 59,113), S( 66,121), S( 74,120), S( 74,124), S( 66,130), S( 73,140),
S( 80,140), S( 88,146), S( 92,151), S(104,161), S(103,172), S(100,172),
S(110,184), S(105,190), S(113,212), S(114,213) }
};

// RookOnFile[semiopen/open] contains bonuses for each rook when there is
@@ -32,9 +32,9 @@ namespace {
#define S(mg, eg) make_score(mg, eg)

// Pawn penalties
constexpr Score Backward = S( 9, 24);
constexpr Score Doubled = S(11, 56);
constexpr Score Isolated = S( 5, 15);
constexpr Score Backward = S(15, 28);
constexpr Score Doubled = S(14, 59);
constexpr Score Isolated = S( 8, 18);

// Connected pawn bonus by opposed, phalanx, #support and rank
Score Connected[2][2][3][RANK_NB];

0 comments on commit 3763b55

Please sign in to comment.
You can’t perform that action at this time.