From: Chris Caino Date: Mon, 23 Dec 2013 19:50:28 +0000 (+0100) Subject: Increase pawn king attack weight X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=8aa4f3fde46acc1d5a02d2b16aae5098606cfcb2 Increase pawn king attack weight Tighter lower bound for pawn attacks so to activate king safety in some cases like here: 6k1/2B3p1/2Pp1p2/2nPp3/2Q1P2K/P2n1qP1/R6P/1R6 w Original patch by Chris, further simplified by Jörg Oster. Passed both short TC LLR: 2.96 (-2.94,2.94) [-1.50,4.50] Total: 30171 W: 5887 L: 5700 D: 18584 And long TC LLR: 2.97 (-2.94,2.94) [0.00,6.00] Total: 20706 W: 3402 L: 3204 D: 14100 bench: 7607562 --- diff --git a/src/evaluate.cpp b/src/evaluate.cpp index 1ee727da..72c23f19 100644 --- a/src/evaluate.cpp +++ b/src/evaluate.cpp @@ -434,7 +434,7 @@ Value do_evaluate(const Position& pos) { { ei.kingRing[Them] = b | shift_bb(b); b &= ei.attackedBy[Us][PAWN]; - ei.kingAttackersCount[Us] = b ? popcount(b) / 2 : 0; + ei.kingAttackersCount[Us] = b ? popcount(b) : 0; ei.kingAdjacentZoneAttacksCount[Us] = ei.kingAttackersWeight[Us] = 0; } else