mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Elo Worth in King Danger
Adding the EloWorth for each term in King Danger. Should be useful for simplifications, tuning patches, and new ideas. closes https://github.com/official-stockfish/Stockfish/pull/3204 non-functional change
This commit is contained in:
parent
75e06a1c89
commit
931070b65a
1 changed files with 12 additions and 12 deletions
|
@ -582,18 +582,18 @@ namespace {
|
||||||
int kingFlankAttack = popcount(b1) + popcount(b2);
|
int kingFlankAttack = popcount(b1) + popcount(b2);
|
||||||
int kingFlankDefense = popcount(b3);
|
int kingFlankDefense = popcount(b3);
|
||||||
|
|
||||||
kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
|
kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them] // (~10 Elo)
|
||||||
+ 185 * popcount(kingRing[Us] & weak)
|
+ 185 * popcount(kingRing[Us] & weak) // (~15 Elo)
|
||||||
+ 148 * popcount(unsafeChecks)
|
+ 148 * popcount(unsafeChecks) // (~4 Elo)
|
||||||
+ 98 * popcount(pos.blockers_for_king(Us))
|
+ 98 * popcount(pos.blockers_for_king(Us)) // (~2 Elo)
|
||||||
+ 69 * kingAttacksCount[Them]
|
+ 69 * kingAttacksCount[Them] // (~0.5 Elo)
|
||||||
+ 3 * kingFlankAttack * kingFlankAttack / 8
|
+ 3 * kingFlankAttack * kingFlankAttack / 8 // (~0.5 Elo)
|
||||||
+ mg_value(mobility[Them] - mobility[Us])
|
+ mg_value(mobility[Them] - mobility[Us]) // (~0.5 Elo)
|
||||||
- 873 * !pos.count<QUEEN>(Them)
|
- 873 * !pos.count<QUEEN>(Them) // (~24 Elo)
|
||||||
- 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING])
|
- 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING]) // (~5 Elo)
|
||||||
- 6 * mg_value(score) / 8
|
- 6 * mg_value(score) / 8 // (~8 Elo)
|
||||||
- 4 * kingFlankDefense
|
- 4 * kingFlankDefense // (~5 Elo)
|
||||||
+ 37;
|
+ 37; // (~0.5 Elo)
|
||||||
|
|
||||||
// Transform the kingDanger units into a Score, and subtract it from the evaluation
|
// Transform the kingDanger units into a Score, and subtract it from the evaluation
|
||||||
if (kingDanger > 100)
|
if (kingDanger > 100)
|
||||||
|
|
Loading…
Add table
Reference in a new issue