mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-19 16:46:30 +08:00
Slight tweak to king safety. Bench: 5534531
This commit is contained in:
@@ -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];
|
||||||
|
|||||||
Reference in New Issue
Block a user