Skip to content

Commit

Permalink
Connected / blocked pawns simplification
Browse files Browse the repository at this point in the history
There is no need to score blocked pawns at many places.
The idea originated from: Rocky
Tuning and testing by: Fauzi

Passed STC:
https://tests.stockfishchess.org/tests/view/5f04f8fd59f6f035328945d4
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 6352 W: 1299 L: 1118 D: 3935
Ptnml(0-2): 89, 695, 1469, 792, 131

Passed LTC:
https://tests.stockfishchess.org/tests/view/5f0527bd59f6f035328945e3
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 27648 W: 3517 L: 3433 D: 20698
Ptnml(0-2): 177, 2561, 8301, 2571, 214

closes #2799

Bench: 4734746
  • Loading branch information
FauziAkram authored and vondele committed Jul 9, 2020
1 parent 76a0390 commit 804a29c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pawns.cpp
Expand Up @@ -39,7 +39,7 @@ namespace {
constexpr Score WeakUnopposed = S(13, 27);

// Bonus for blocked pawns at 5th or 6th rank
constexpr Score BlockedPawn[2] = { S(-10, -3), S(-3, 3) };
constexpr Score BlockedPawn[2] = { S(-11, -4), S(-3, 4) };

constexpr Score BlockedStorm[RANK_NB] = {
S(0, 0), S(0, 0), S(76, 78), S(-10, 15), S(-7, 10), S(-4, 6), S(-1, 2)
Expand Down Expand Up @@ -148,7 +148,7 @@ namespace {
// Score this pawn
if (support | phalanx)
{
int v = Connected[r] * (4 + 2 * bool(phalanx) - 2 * bool(opposed) - bool(blocked)) / 2
int v = Connected[r] * (2 + bool(phalanx) - bool(opposed))
+ 21 * popcount(support);

score += make_score(v, v * (r - 2) / 4);
Expand Down

0 comments on commit 804a29c

Please sign in to comment.