]> git.sesse.net Git - stockfish/commitdiff
Simplify pawns King Safety calculation
authorfanon <felix.bolanos@gmail.com>
Sun, 20 Mar 2016 16:50:32 +0000 (10:50 -0600)
committerJoona Kiiski <joona@zoox.com>
Sun, 27 Mar 2016 19:08:56 +0000 (20:08 +0100)
STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 130209 W: 23516 L: 23581 D: 83112

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 33541 W: 4563 L: 4460 D: 24518

Bench: 8644370

Resolves #604

src/pawns.cpp

index 0642c6799041632263aad067557b2f010df019e6..9239bface2e06c163b6daa521e9ba8fe3f6a9bd5 100644 (file)
@@ -288,9 +288,6 @@ Score Entry::do_king_safety(const Position& pos, Square ksq) {
   if (pawns)
       while (!(DistanceRingBB[ksq][minKingPawnDistance++] & pawns)) {}
 
-  if (relative_rank(Us, ksq) > RANK_4)
-      return make_score(0, -16 * minKingPawnDistance);
-
   Value bonus = shelter_storm<Us>(pos, ksq);
 
   // If we can castle use the bonus after the castling if it is bigger