1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-12 03:59:15 +00:00

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
This commit is contained in:
Chris Caino 2013-12-23 20:50:28 +01:00 committed by Marco Costalba
parent 26689d8c2a
commit 8aa4f3fde4

View file

@ -434,7 +434,7 @@ Value do_evaluate(const Position& pos) {
{ {
ei.kingRing[Them] = b | shift_bb<Down>(b); ei.kingRing[Them] = b | shift_bb<Down>(b);
b &= ei.attackedBy[Us][PAWN]; b &= ei.attackedBy[Us][PAWN];
ei.kingAttackersCount[Us] = b ? popcount<Max15>(b) / 2 : 0; ei.kingAttackersCount[Us] = b ? popcount<Max15>(b) : 0;
ei.kingAdjacentZoneAttacksCount[Us] = ei.kingAttackersWeight[Us] = 0; ei.kingAdjacentZoneAttacksCount[Us] = ei.kingAttackersWeight[Us] = 0;
} }
else else