Skip to content

Commit

Permalink
k += 5 if the RQ is anywhere on the file. Bench: 4804769
Browse files Browse the repository at this point in the history
  • Loading branch information
31m059 committed Nov 8, 2019
1 parent 9f312c8 commit 383a01b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evaluate.cpp
Expand Up @@ -626,7 +626,7 @@ namespace {
0 ;

// Assign a larger bonus if the block square is defended
if ((pos.pieces(Us) & bb) || (attackedBy[Us][ALL_PIECES] & blockSq))
if ((pos.pieces(Us, ROOK, QUEEN) & file_bb(s)) || (attackedBy[Us][ALL_PIECES] & blockSq))
k += 5;

bonus += make_score(k * w, k * w);
Expand Down

2 comments on commit 383a01b

@Rocky640
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If the rook queen is in front, we already have attackedBy[Us][ALL_PIECES] & blockSq
So you are only adding the case where rook/queen is in front of blocksq but does not see it.

@31m059
Copy link
Owner Author

@31m059 31m059 commented on 383a01b Nov 8, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rocky640 Very good point, I'm sorry for overlooking that. Thank you!

I do think it's possible we should have some bonus in that case though... The intervening piece, which prevents our rook/queen from seeing the blockSq, may be vulnerable to pressure: we may be able to x-ray defense of the passed pawn.

Please sign in to comment.