Include file attacks in 'major on pawn'
authorRyan Schmitt <ryan.l.schmitt@gmail.com>
Mon, 17 Jun 2013 16:55:00 +0000 (18:55 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Wed, 19 Jun 2013 05:22:10 +0000 (07:22 +0200)
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

index ea37bbeb175e55ce37ae0320634ac641aad7d3a7..945fb4e44299dafab044810ac09ae72d4e6c0142 100644 (file)
@@ -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<Max15>(pawns) * (Piece == ROOK ? RookOnPawn : QueenOnPawn);
         }