From: protonspring Date: Sat, 14 Jul 2018 06:26:57 +0000 (+0200) Subject: Remove rank limitation for MinorBehindPawn X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=a6fa6a9e92a19c85bc00c96617f338279243baeb;ds=sidebyside Remove rank limitation for MinorBehindPawn 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 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 9d98a63b..f4186686 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -337,9 +337,8 @@ namespace { 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(pos.pieces(PAWN)) & s) score += MinorBehindPawn; // Penalty if the piece is far from the king