Skip to content
Permalink
Browse files

Less king danger if we have a knight near by to defend it. (official-…

…stockfish#1987)

bench: 3653942
  • Loading branch information...
mstembera authored and mcostalba committed Feb 3, 2019
1 parent 9050eac commit 651450023619ddea590f301f040286151004df66
Showing with 2 additions and 1 deletion.
  1. +2 −1 src/evaluate.cpp
@@ -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)

0 comments on commit 6514500

Please sign in to comment.
You can’t perform that action at this time.