1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

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
This commit is contained in:
Ryan Schmitt 2013-06-17 18:55:00 +02:00 committed by Marco Costalba
parent e05c80a088
commit e95e69515a

View 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);
}