Skip to content

Commit

Permalink
Tweak initiative and Pawn PSQT (#1957)
Browse files Browse the repository at this point in the history
Small changes in initiative(). For Pawn PSQT, endgame values for d6-e6 and d7-e7 are now symmetric. The MG value of d2 is now smaller than e2 (d2=13, e2=21 now compared to d2=19, e2=16 before). The MG values of h5-h6-h7 also increased so this might encourage stockfish for more h-pawn pushes.

STC
LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 81141 W: 17933 L: 17777 D: 45431
http://tests.stockfishchess.org/tests/view/5c4017350ebc5902bb5cf237

LTC
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 83078 W: 13883 L: 13466 D: 55729
http://tests.stockfishchess.org/tests/view/5c40763f0ebc5902bb5cff09

Bench: 3266398
  • Loading branch information
SFisGOD authored and mcostalba committed Jan 20, 2019
1 parent 3300517 commit 3acacf8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/evaluate.cpp
Expand Up @@ -743,12 +743,12 @@ namespace {
&& (pos.pieces(PAWN) & KingSide);

// Compute the initiative bonus for the attacking side
int complexity = 8 * pe->pawn_asymmetry()
+ 12 * pos.count<PAWN>()
+ 12 * outflanking
+ 16 * pawnsOnBothFlanks
+ 48 * !pos.non_pawn_material()
-118 ;
int complexity = 9 * pe->pawn_asymmetry()
+ 11 * pos.count<PAWN>()
+ 9 * outflanking
+ 18 * pawnsOnBothFlanks
+ 49 * !pos.non_pawn_material()
-121 ;

// Now apply the bonus: note that we find the attacking side by extracting
// the sign of the endgame value, and that we carefully cap the bonus so
Expand Down
12 changes: 6 additions & 6 deletions src/psqt.cpp
Expand Up @@ -93,12 +93,12 @@ constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
constexpr Score PBonus[RANK_NB][FILE_NB] =
{ // Pawn (asymmetric distribution)
{ },
{ S( 0,-11), S( -3,-4), S(13, -1), S( 19, -4), S(16, 17), S(13, 7), S( 4, 4), S( -4,-13) },
{ S(-16, -8), S(-12,-6), S(20, -3), S( 21, 0), S(25,-11), S(29, 3), S( 0, 0), S(-27, -1) },
{ S(-11, 3), S(-17, 6), S(11,-10), S( 21, 1), S(32, -6), S(19,-11), S( -5, 0), S(-14, -2) },
{ S( 4, 13), S( 6, 7), S(-8, 3), S( 3, -5), S( 8,-15), S(-2, -1), S(-19, 9), S( -5, 13) },
{ S( -5, 25), S(-19,20), S( 7, 16), S( 8, 12), S(-7, 21), S(-2, 3), S(-10, -4), S(-16, 15) },
{ S(-10, 6), S( 9,-5), S(-7, 16), S(-12, 27), S(-7, 15), S(-8, 11), S( 16, -7), S( -8, 4) }
{ S( 0,-10), S( -5,-3), S( 10, 7), S( 13, -1), S( 21, 7), S( 17, 6), S( 6, 1), S( -3,-20) },
{ S(-11, -6), S(-10,-6), S( 15, -1), S( 22, -1), S( 26, -1), S( 28, 2), S( 4, -2), S(-24, -5) },
{ S( -9, 4), S(-18,-5), S( 8, -4), S( 22, -5), S( 33, -6), S( 25,-13), S( -4, -3), S(-16, -7) },
{ S( 6, 18), S( -3, 2), S(-10, 2), S( 1, -9), S( 12,-13), S( 6, -8), S(-12, 11), S( 1, 9) },
{ S( -6, 25), S( -8,17), S( 5, 19), S( 11, 29), S(-14, 29), S( 0, 8), S(-12, 4), S(-14, 12) },
{ S(-10, -1), S( 6,-6), S( -5, 18), S(-11, 22), S( -2, 22), S(-14, 17), S( 12, 2), S( -1, 9) }
};

#undef S
Expand Down

0 comments on commit 3acacf8

Please sign in to comment.