mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 00:33:09 +00:00
Evaluate king safety when no queen is present.
LLR: 2.97 (-2.94,2.94) [-1.50,4.50] Total: 16657 W: 3547 L: 3391 D: 9719 LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 31258 W: 5664 L: 5403 D: 20191 Bench: 8331165 Resolves #51
This commit is contained in:
parent
766fb9c67d
commit
fed3e752ae
1 changed files with 3 additions and 2 deletions
|
@ -221,7 +221,7 @@ namespace {
|
|||
ei.attackedBy[Us][ALL_PIECES] = ei.attackedBy[Us][PAWN] = ei.pi->pawn_attacks(Us);
|
||||
|
||||
// Init king safety tables only if we are going to use them
|
||||
if (pos.count<QUEEN>(Us) && pos.non_pawn_material(Us) > QueenValueMg + PawnValueMg)
|
||||
if (pos.non_pawn_material(Us) > QueenValueMg + PawnValueMg)
|
||||
{
|
||||
ei.kingRing[Them] = b | shift_bb<Down>(b);
|
||||
b &= ei.attackedBy[Us][PAWN];
|
||||
|
@ -414,7 +414,8 @@ namespace {
|
|||
attackUnits = std::min(20, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
||||
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount<Max15>(undefended))
|
||||
+ 2 * (ei.pinnedPieces[Us] != 0)
|
||||
- mg_value(score) / 32;
|
||||
- mg_value(score) / 32
|
||||
- !pos.count<QUEEN>(Them) * 15;
|
||||
|
||||
// Analyse the enemy's safe queen contact checks. Firstly, find the
|
||||
// undefended squares around the king that are attacked by the enemy's
|
||||
|
|
Loading…
Add table
Reference in a new issue