X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fpawns.cpp;h=65bb3dbaa38d1dcc9224639f6d0c5bf4ae860313;hp=b381b5c4abc3f567cec33c1b7a68964c70e65adf;hb=97f5d19bdc0439f297ad11dd59997aba9342ce93;hpb=6b7efa0cd14b73416c9030462f79a02bbfc7ad2c diff --git a/src/pawns.cpp b/src/pawns.cpp index b381b5c4..65bb3dba 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -72,10 +72,10 @@ namespace { // UnpairedPawnsTable[] gives a score according to the number // of panws that do not have an enemy pawn in front of them. - const int UnpairedPawnsTable[8] = { - SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL, - SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL, SCALE_FACTOR_NORMAL - }; + const int UnpairedPawnsTable[16] = { 32, 48, 64, 80, 96, 112, 128, 128, 128 }; + + // PawnsQtyTable[] gives a score according to the number of panws + const int PawnsQtyTable[16] = { 16, 16, 16, 16, 16, 16, 16, 16, 16 }; // Pawn storm tables for positions with opposite castling const int QStormTable[64] = { @@ -350,7 +350,7 @@ Score PawnInfoTable::evaluate_pawns(const Position& pos, Bitboard ourPawns, } // Calculate a scale factor to be used to evaluate if position is drawish - pi->factor[Us] = UnpairedPawnsTable[unpairedPawnsNum]; + pi->factor[Us] = UnpairedPawnsTable[unpairedPawnsNum] * PawnsQtyTable[pos.piece_count(Us, PAWN)] / 16; return value; }