mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
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
This commit is contained in:
parent
0c68971c13
commit
5aeb907fa1
1 changed files with 6 additions and 6 deletions
|
@ -200,12 +200,12 @@ namespace {
|
||||||
const int KingAttackWeights[] = { 0, 0, 2, 2, 3, 5 };
|
const int KingAttackWeights[] = { 0, 0, 2, 2, 3, 5 };
|
||||||
|
|
||||||
// Bonuses for enemy's safe checks
|
// Bonuses for enemy's safe checks
|
||||||
const int QueenContactCheck = 6;
|
const int QueenContactCheck = 12;
|
||||||
const int RookContactCheck = 4;
|
const int RookContactCheck = 8;
|
||||||
const int QueenCheck = 3;
|
const int QueenCheck = 6;
|
||||||
const int RookCheck = 2;
|
const int RookCheck = 4;
|
||||||
const int BishopCheck = 1;
|
const int BishopCheck = 1;
|
||||||
const int KnightCheck = 1;
|
const int KnightCheck = 2;
|
||||||
|
|
||||||
// KingExposed[Square] contains penalties based on the position of the
|
// KingExposed[Square] contains penalties based on the position of the
|
||||||
// defending king, indexed by king's square (from white's point of view).
|
// 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) {
|
||||||
// number and types of the enemy's attacking pieces, the number of
|
// number and types of the enemy's attacking pieces, the number of
|
||||||
// attacked and undefended squares around our king, the square of the
|
// attacked and undefended squares around our king, the square of the
|
||||||
// king, and the quality of the pawn shelter.
|
// king, and the quality of the pawn shelter.
|
||||||
attackUnits = std::min(25, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
attackUnits = std::min(20, (ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) / 2)
|
||||||
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount<Max15>(undefended))
|
+ 3 * (ei.kingAdjacentZoneAttacksCount[Them] + popcount<Max15>(undefended))
|
||||||
+ KingExposed[relative_square(Us, ksq)]
|
+ KingExposed[relative_square(Us, ksq)]
|
||||||
- mg_value(score) / 32;
|
- mg_value(score) / 32;
|
||||||
|
|
Loading…
Add table
Reference in a new issue