Skip to content

Commit

Permalink
Less king danger if we have a knight near by to defend it. (official-…
Browse files Browse the repository at this point in the history
…stockfish#1987)

bench: 3653942
  • Loading branch information
mstembera authored and mcostalba committed Feb 3, 2019
1 parent 9050eac commit 6514500
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/evaluate.cpp
Expand Up @@ -482,12 +482,13 @@ namespace {
kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
+ 69 * kingAttacksCount[Them]
+ 185 * popcount(kingRing[Us] & weak)
- 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING])
+ 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
+ 5 * tropism * tropism / 16
- 873 * !pos.count<QUEEN>(Them)
- 6 * mg_value(score) / 8
+ mg_value(mobility[Them] - mobility[Us])
- 30;
- 25;

// Transform the kingDanger units into a Score, and subtract it from the evaluation
if (kingDanger > 0)
Expand Down

0 comments on commit 6514500

Please sign in to comment.