This is a functional simplification. It seems like the rank restriction
for MinorBehindPawn can be removed.
STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 61195 W: 13404 L: 13360 D: 34431
http://tests.stockfishchess.org/tests/view/
5b47e6f00ebc5978f4be3fc0
LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 31701 W: 5367 L: 5264 D: 21070
http://tests.stockfishchess.org/tests/view/
5b48a2cb0ebc5978f4be4769
Bench:
4938702
else if (bb &= b & ~pos.pieces(Us))
score += Outpost[Pt == BISHOP][bool(attackedBy[Us][PAWN] & bb)];
- // Bonus when behind a pawn
- if ( relative_rank(Us, s) < RANK_5
- && (pos.pieces(PAWN) & (s + pawn_push(Us))))
+ // Knight and Bishop bonus for being right behind a pawn
+ if (shift<Down>(pos.pieces(PAWN)) & s)
score += MinorBehindPawn;
// Penalty if the piece is far from the king