Skip to content

Commit

Permalink
Exclude this case entirely.
Browse files Browse the repository at this point in the history
  • Loading branch information
31m059 committed May 16, 2018
1 parent 7ba6594 commit 30f1b6e
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions src/evaluate.cpp
Expand Up @@ -379,16 +379,12 @@ namespace {

if (Pt == ROOK)
{
// Bonus for aligning rook with enemy pawns on the same rank/file
// Half bonus for passed pawns attacked along a rank
// Bonus for aligning rook with enemy pawns on the same rank/file, except passed pawns on the same rank
if (relative_rank(Us, s) >= RANK_5)
{
b = pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s];
while (b)
{
Square s2 = pop_lsb(&b);
score += RookOnPawn / (1 + bool(rank_bb(s) & pe->passedPawns[Them] & s2));
}
b = pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]
& ~(rank_bb(s) & pe->passed_pawns(Them));
score += RookOnPawn * popcount(b);
}

// Bonus for rook on an open or semi-open file
Expand Down

0 comments on commit 30f1b6e

Please sign in to comment.