Slight tweak to king safety. Bench: 5534531
authorGary Linscott <glinscott@gmail.com>
Fri, 8 Feb 2013 13:53:13 +0000 (08:53 -0500)
committerGary Linscott <glinscott@gmail.com>
Fri, 8 Feb 2013 13:53:13 +0000 (08:53 -0500)
src/evaluate.cpp

index 49dc07f..8192536 100644 (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
     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));
         b &= ei.attackedBy[Us][PAWN];