Skip to content

Commit

Permalink
Simplify passed pawns. (#2159)
Browse files Browse the repository at this point in the history
This is a functional simplification.

If all of the stoppers are levers, a simple pawn push passes.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 41768 W: 9360 L: 9278 D: 23130
http://tests.stockfishchess.org/tests/view/5ce82ed60ebc5925cf073a79

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 40463 W: 6964 L: 6875 D: 26624
http://tests.stockfishchess.org/tests/view/5ce87d0b0ebc5925cf07472b
  • Loading branch information
protonspring authored and mcostalba committed Jun 9, 2019
1 parent 14e23d5 commit 53d197b
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/pawns.cpp
Expand Up @@ -110,9 +110,8 @@ namespace {
// full attack info to evaluate them. Include also not passed pawns
// which could become passed after one or two pawn pushes when are
// not attacked more times than defended.
if ( !(stoppers ^ lever ^ leverPush)
&& (support || !more_than_one(lever))
&& popcount(phalanx) >= popcount(leverPush))
if ( !(stoppers ^ lever) ||
(!(stoppers ^ leverPush) && popcount(phalanx) >= popcount(leverPush)))
e->passedPawns[Us] |= s;

else if (stoppers == square_bb(s + Up) && r >= RANK_5)
Expand Down

0 comments on commit 53d197b

Please sign in to comment.