Skip to content

Commit

Permalink
Merge pull request official-stockfish#1325 from IIvec/master
Browse files Browse the repository at this point in the history
nm
  • Loading branch information
IIvec authored Oct 8, 2020
2 parents dd2552b + 767b4f4 commit 89cc86b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 18 deletions.
16 changes: 8 additions & 8 deletions src/pawns.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,21 @@ namespace {
#define S(mg, eg) make_score(mg, eg)

// Pawn penalties
constexpr Score Backward = S( 8, 27);
constexpr Score Doubled = S(11, 55);
constexpr Score Isolated = S( 5, 17);
constexpr Score WeakLever = S( 2, 54);
constexpr Score WeakUnopposed = S(15, 25);
constexpr Score Backward = S( 8, 25);
constexpr Score Doubled = S(10, 55);
constexpr Score Isolated = S( 3, 15);
constexpr Score WeakLever = S( 3, 55);
constexpr Score WeakUnopposed = S(13, 25);

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

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)
};

// Connected pawn bonus
constexpr int Connected[RANK_NB] = { 0, 7, 8, 11, 24, 45, 85 };
constexpr int Connected[RANK_NB] = { 0, 5, 7, 11, 24, 48, 86 };

// Strength of pawn shelter for our king by [distance from edge][rank].
// RANK_1 = 0 is used for files where we have no pawn, or pawn is behind our king.
Expand Down Expand Up @@ -147,7 +147,7 @@ namespace {
if (support | phalanx)
{
int v = Connected[r] * (2 + bool(phalanx) - bool(opposed))
+ 21 * popcount(support);
+ 22 * popcount(support);

score += make_score(v, v * (r - 2) / 4);
}
Expand Down
9 changes: 0 additions & 9 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1057,15 +1057,6 @@ namespace {
&& captureHistory[movedPiece][to_sq(move)][type_of(pos.piece_on(to_sq(move)))] < 0)
continue;

// Futility pruning for captures
if ( !givesCheck
&& lmrDepth < 6
&& !(PvNode && abs(bestValue) < 2)
&& !ss->inCheck
&& ss->staticEval + 169 + 244 * lmrDepth
+ PieceValue[MG][type_of(pos.piece_on(to_sq(move)))] <= alpha)
continue;

// See based pruning
if (!pos.see_ge(move, Value(-221) * depth)) // (~25 Elo)
continue;
Expand Down
2 changes: 1 addition & 1 deletion tests/instrumented.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ case $1 in
--valgrind-thread)
echo "valgrind-thread testing started"
prefix=''
exeprefix='valgrind --error-exitcode=42'
exeprefix='valgrind --fair-sched=try --error-exitcode=42'
postfix='1>/dev/null'
threads="2"
;;
Expand Down

0 comments on commit 89cc86b

Please sign in to comment.