Skip to content

Commit 6514500

Browse files
mstemberamcostalba
authored andcommitted
Less king danger if we have a knight near by to defend it. (#1987)
bench: 3653942
1 parent 9050eac commit 6514500

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/evaluate.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,12 +482,13 @@ namespace {
482482
kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
483483
+ 69 * kingAttacksCount[Them]
484484
+ 185 * popcount(kingRing[Us] & weak)
485+
- 100 * bool(attackedBy[Us][KNIGHT] & attackedBy[Us][KING])
485486
+ 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
486487
+ 5 * tropism * tropism / 16
487488
- 873 * !pos.count<QUEEN>(Them)
488489
- 6 * mg_value(score) / 8
489490
+ mg_value(mobility[Them] - mobility[Us])
490-
- 30;
491+
- 25;
491492

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

0 commit comments

Comments
 (0)