From: 31m059 <37052095+31m059@users.noreply.github.com> Date: Sun, 11 Nov 2018 21:14:28 +0000 (-0500) Subject: Simplify tropism. (#1807) X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=30a905c95d0b77874244c8b68ae77daba41ac545;ds=sidebyside Simplify tropism. (#1807) We calculate tropism as a sum of two factors. The first is the number of squares in our kingFlank and Camp that are attacked by the enemy; the second is number of these squares that are attacked twice. Prior to this commit, we excluded squares we defended with pawns from this second value, but this appears unnecessary. (Doubly-attacked squares near our king are still dangerous.) The removal of this exclusion is a possible small Elo gain at STC (estimated +1.59) and almost exactly neutral at LTC (estimated +0.04). STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 20942 W: 4550 L: 4427 D: 11965 http://tests.stockfishchess.org/tests/view/5be4e0ae0ebc595e0ae308a0 LTC: LLR: 2.94 (-2.94,2.94) [-3.00,1.00] Total: 56941 W: 9172 L: 9108 D: 38661 http://tests.stockfishchess.org/tests/view/5be4ec340ebc595e0ae30938 Bench: 3813986 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index e6938e18..97218baa 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -421,7 +421,7 @@ namespace { // which are attacked twice in that flank but not defended by our pawns. kingFlank = KingFlank[file_of(ksq)]; b1 = attackedBy[Them][ALL_PIECES] & kingFlank & Camp; - b2 = b1 & attackedBy2[Them] & ~attackedBy[Us][PAWN]; + b2 = b1 & attackedBy2[Them]; int tropism = popcount(b1) + popcount(b2);