Skip to content

Commit

Permalink
Passed pawn bonus simplification
Browse files Browse the repository at this point in the history
STC: (yellow)

LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 86114 W: 16063 L: 15921 D: 54130

LTC:

LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 14347 W: 2025 L: 1896 D: 10426

Bench: 8576437

Resolves #595
  • Loading branch information
mbootsector authored and zamar committed Mar 2, 2016
1 parent c1be0c6 commit e1a7d13
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/evaluate.cpp
Expand Up @@ -168,7 +168,7 @@ namespace {
// Passed[mg/eg][Rank] contains midgame and endgame bonuses for passed pawns.
// We don't use a Score because we process the two components independently.
const Value Passed[][RANK_NB] = {
{ V(0), V( 1), V(26), V(68), V(161), V(247) },
{ V(5), V( 5), V(31), V(73), V(166), V(252) },
{ V(7), V(14), V(38), V(64), V(137), V(193) }
};

Expand Down Expand Up @@ -615,10 +615,10 @@ namespace {
else if (defendedSquares & blockSq)
k += 4;

mbonus += k * rr * 3 / 4, ebonus += k * rr;
mbonus += k * rr, ebonus += k * rr;
}
else if (pos.pieces(Us) & blockSq)
mbonus += (rr * 3 + r * 2 + 3) * 3 / 4, ebonus += rr + r * 2;
mbonus += rr + r * 2, ebonus += rr + r * 2;
} // rr != 0

if (pos.count<PAWN>(Us) < pos.count<PAWN>(Them))
Expand Down

0 comments on commit e1a7d13

Please sign in to comment.