Skip to content

Commit 899a2c0

Browse files
Ralph Stößermcostalba
Ralph Stößer
authored andcommitted
Loosened trigger condition for king safety
Reduce eval discontinuity becuase now we kick in king safety evaluation in many more cases. Passed both short TC: LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 8708 W: 1742 L: 1613 D: 5353 And long TC: LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 6743 W: 1122 L: 990 D: 4631 bench: 6835416
1 parent 8aa4f3f commit 899a2c0

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/evaluate.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -640,8 +640,7 @@ Value do_evaluate(const Position& pos) {
640640
Score score = ei.pi->king_safety<Us>(pos, ksq);
641641

642642
// Main king safety evaluation
643-
if ( ei.kingAttackersCount[Them] >= 2
644-
&& ei.kingAdjacentZoneAttacksCount[Them])
643+
if (ei.kingAttackersCount[Them])
645644
{
646645
// Find the attacked squares around the king which have no defenders
647646
// apart from the king itself

0 commit comments

Comments
 (0)