Skip to content

Commit d21e421

Browse files
FauziAkramvondele
authored andcommitted
WeakUnopposed penalty for backwards on file A or H
Do not give the WeakUnopposed penalty for backwards on file A or H The original idea comes from Lolligerhans, and a series of tunings and tests done by Fauzi. Passed STC: LLR: 2.96 (-2.94,2.94) {-0.25,1.25} Total: 140864 W: 28127 L: 27660 D: 85077 Ptnml(0-2): 2529, 16660, 31735, 16831, 2677 https://tests.stockfishchess.org/tests/view/5fe39dec3932f79192d39673 Passed LTC: LLR: 2.95 (-2.94,2.94) {0.25,1.25} Total: 67568 W: 8993 L: 8590 D: 49985 Ptnml(0-2): 523, 6176, 19983, 6579, 523 https://tests.stockfishchess.org/tests/view/5fe3dd1b3932f79192d39693 closes #3275 Bench: 4109336
1 parent 8ec97d1 commit d21e421

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

src/pawns.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,11 @@ namespace {
3030
#define S(mg, eg) make_score(mg, eg)
3131

3232
// Pawn penalties
33-
constexpr Score Backward = S( 8, 25);
34-
constexpr Score Doubled = S(10, 55);
35-
constexpr Score Isolated = S( 3, 15);
36-
constexpr Score WeakLever = S( 3, 55);
37-
constexpr Score WeakUnopposed = S(13, 25);
33+
constexpr Score Backward = S( 6, 23);
34+
constexpr Score Doubled = S(13, 53);
35+
constexpr Score Isolated = S( 2, 15);
36+
constexpr Score WeakLever = S( 5, 57);
37+
constexpr Score WeakUnopposed = S(16, 22);
3838

3939
// Bonus for blocked pawns at 5th or 6th rank
4040
constexpr Score BlockedPawn[2] = { S(-15, -3), S(-6, 3) };
@@ -69,8 +69,8 @@ namespace {
6969

7070
// KingOnFile[semi-open Us][semi-open Them] contains bonuses/penalties
7171
// for king when the king is on a semi-open or open file.
72-
constexpr Score KingOnFile[2][2] = {{ S(-19,12), S(-6, 7) },
73-
{ S( 0, 2), S( 6,-5) }};
72+
constexpr Score KingOnFile[2][2] = {{ S(-21,10), S(-7, 1) },
73+
{ S( 0,-3), S( 9,-4) }};
7474

7575
#undef S
7676
#undef V
@@ -172,7 +172,7 @@ namespace {
172172

173173
else if (backward)
174174
score -= Backward
175-
+ WeakUnopposed * !opposed;
175+
+ WeakUnopposed * !opposed * bool(~(FileABB | FileHBB) & s);
176176

177177
if (!support)
178178
score -= Doubled * doubled

0 commit comments

Comments
 (0)