1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Slight tweak to king safety. Bench: 5534531

This commit is contained in:
Gary Linscott 2013-02-08 08:53:13 -05:00
parent bf706c4a4f
commit 0c06b4509d

View file

@ -496,7 +496,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
// Init king safety tables only if we are going to use them // Init king safety tables only if we are going to use them
if ( pos.piece_count(Us, QUEEN) if ( pos.piece_count(Us, QUEEN)
&& pos.non_pawn_material(Us) >= QueenValueMg + RookValueMg) && pos.non_pawn_material(Us) > QueenValueMg + PawnValueMg)
{ {
ei.kingRing[Them] = (b | (Us == WHITE ? b >> 8 : b << 8)); ei.kingRing[Them] = (b | (Us == WHITE ? b >> 8 : b << 8));
b &= ei.attackedBy[Us][PAWN]; b &= ei.attackedBy[Us][PAWN];