1
0
Fork 0

Expand outposts to minors shielded by pawns

Allow any pawn in front of a minor piece to replace the pawn protection
requirement for outposts.

  +-------+  +-------+
  | . . o |  | o . . |    o  Their pawns
  | . o x |  | o . . |    x  Our pawns
  | o N . |  | x o B |  N,B  New (reachable) outpost
  | . . . |  | . _ . |    _  Reachable square behind a pawn
  +-------+  +-------+
  N outpost  B reaches
               outpost

  We want outposts to be secured by pawns against major pieces. If
a minor is shielded by any pawn from above, it is rarely at the same
time protected by our pawn attacks from below. However, the pawn shield
in itself offers some degree of protection.
  A pawn shield will now suffice to replace the pawn protection for the
outpost (and reachable outpost) bonus.

This effect stacks with the existing "minor behind pawn" bonus.

STC
https://tests.stockfishchess.org/tests/view/5f2bcd14b3ebe5cbfee85b2c
LLR: 2.94 (-2.94,2.94) {-0.50,1.50}
Total: 27248 W: 5353 L: 5119 D: 16776
Ptnml(0-2): 462, 3174, 6185, 3274, 529

LTC
https://tests.stockfishchess.org/tests/view/5f2bfef5b3ebe5cbfee85b5a
LLR: 2.96 (-2.94,2.94) {0.25,1.75}
Total: 99432 W: 12580 L: 12130 D: 74722
Ptnml(0-2): 696, 8903, 30049, 9391, 677

Closes #2935

Bench: 4143673
pull/2941/head
Lolligerhans 2020-08-07 11:24:37 +02:00 committed by Joost VandeVondele
parent dc5af66ead
commit 5ccff25df2
1 changed files with 2 additions and 1 deletions

View File

@ -345,7 +345,8 @@ namespace {
{
// Bonus if the piece is on an outpost square or can reach one
// Reduced bonus for knights (BadOutpost) if few relevant targets
bb = OutpostRanks & attackedBy[Us][PAWN] & ~pe->pawn_attacks_span(Them);
bb = OutpostRanks & (attackedBy[Us][PAWN] | shift<Down>(pos.pieces(PAWN)))
& ~pe->pawn_attacks_span(Them);
Bitboard targets = pos.pieces(Them) & ~pos.pieces(PAWN);
if ( Pt == KNIGHT