1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-12 03:59:15 +00:00

King safety parameters improved

STC:
LLR: 2.97 (-2.94,2.94) [0.00,4.00]
Total: 58648 W: 10883 L: 10524 D: 37241

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 52546 W: 7131 L: 6844 D: 38571

Bench 6121479

Closes #1078
This commit is contained in:
IIvec 2017-04-23 08:02:52 -07:00 committed by Joona Kiiski
parent 9da3b44ddc
commit 0868de705d

View file

@ -211,10 +211,10 @@ namespace {
const int KingAttackWeights[PIECE_TYPE_NB] = { 0, 0, 78, 56, 45, 11 }; const int KingAttackWeights[PIECE_TYPE_NB] = { 0, 0, 78, 56, 45, 11 };
// Penalties for enemy's safe checks // Penalties for enemy's safe checks
const int QueenCheck = 745; const int QueenCheck = 810;
const int RookCheck = 688; const int RookCheck = 888;
const int BishopCheck = 588; const int BishopCheck = 400;
const int KnightCheck = 924; const int KnightCheck = 790;
// Threshold for lazy evaluation // Threshold for lazy evaluation
const Value LazyThreshold = Value(1500); const Value LazyThreshold = Value(1500);
@ -423,12 +423,12 @@ namespace {
// 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 and the quality of // attacked and undefended squares around our king and the quality of
// the pawn shelter (current 'score' value). // the pawn shelter (current 'score' value).
kingDanger = std::min(807, ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them]) kingDanger = std::min(820, ei.kingAttackersCount[Them] * ei.kingAttackersWeight[Them])
+ 101 * ei.kingAdjacentZoneAttacksCount[Them] + 103 * ei.kingAdjacentZoneAttacksCount[Them]
+ 235 * popcount(undefended) + 190 * popcount(undefended)
+ 134 * (popcount(b) + !!pos.pinned_pieces(Us)) + 142 * (popcount(b) + !!pos.pinned_pieces(Us))
- 717 * !pos.count<QUEEN>(Them) - 810 * !pos.count<QUEEN>(Them)
- 7 * mg_value(score) / 5 - 5; - 6 * mg_value(score) / 5 - 5;
// Analyse the safe enemy's checks which are possible on next move // Analyse the safe enemy's checks which are possible on next move
safe = ~pos.pieces(Them); safe = ~pos.pieces(Them);