Skip to content

Commit 5aeb907

Browse files
Ralph Stößermcostalba
authored andcommitted
Double king safety weights
Good both at short TC: LLR: 2.95 (-2.94,2.94) [-1.50,4.50] Total: 5448 W: 1133 L: 1012 D: 3303 And at long TC: LLR: 2.95 (-2.94,2.94) [0.00,6.00] Total: 40509 W: 6836 L: 6541 D: 27132 bench: 7700683
1 parent 0c68971 commit 5aeb907

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/evaluate.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -200,12 +200,12 @@ namespace {
200200
const int KingAttackWeights[] = { 0, 0, 2, 2, 3, 5 };
201201

202202
// Bonuses for enemy's safe checks
203-
const int QueenContactCheck = 6;
204-
const int RookContactCheck = 4;
205-
const int QueenCheck = 3;
206-
const int RookCheck = 2;
203+
const int QueenContactCheck = 12;
204+
const int RookContactCheck = 8;
205+
const int QueenCheck = 6;
206+
const int RookCheck = 4;
207207
const int BishopCheck = 1;
208-
const int KnightCheck = 1;
208+
const int KnightCheck = 2;
209209

210210
// KingExposed[Square] contains penalties based on the position of the
211211
// defending king, indexed by king's square (from white's point of view).
@@ -699,7 +699,7 @@ Value do_evaluate(const Position& pos, Value& margin) {
699699
// number and types of the enemy's attacking pieces, the number of
700700
// attacked and undefended squares around our king, the square of the
701701
// king, and the quality of the pawn shelter.
702-
attackUnits = std::min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
702+
attackUnits = std::min(20, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
703703
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount<Max15>(undefended))
704704
+ KingExposed[relative_square(Us, ksq)]
705705
- mg_value(score) / 32;

0 commit comments

Comments
 (0)