From e95e69515a8e30bcdcef84bd37656c3ea3099cd5 Mon Sep 17 00:00:00 2001 From: Ryan Schmitt Date: Mon, 17 Jun 2013 18:55:00 +0200 Subject: [PATCH] Include file attacks in 'major on pawn' Passed both short TC: LLR: 2.97 (-2.94,2.94) Total: 57846 W: 12248 L: 11974 D: 33624 And long one: LLR: 2.95 (-2.94,2.94) Total: 9181 W: 1732 L: 1581 D: 5868 bench: 4609948 --- src/evaluate.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/evaluate.cpp b/src/evaluate.cpp index ea37bbeb..945fb4e4 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -541,8 +541,8 @@ Value do_evaluate(const Position& pos, Value& margin) { && relative_rank(Us, pos.king_square(Them)) == RANK_8) score += Piece == ROOK ? RookOn7th : QueenOn7th; - // Major piece attacking enemy pawns on the same rank - Bitboard pawns = pos.pieces(Them, PAWN) & rank_bb(s); + // Major piece attacking enemy pawns on the same rank/file + Bitboard pawns = pos.pieces(Them, PAWN) & PseudoAttacks[ROOK][s]; if (pawns) score += popcount(pawns) * (Piece == ROOK ? RookOnPawn : QueenOnPawn); } -- 2.39.2