mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Less king danger if we have a knight near by to defend it. (#1987)
bench: 3653942
This commit is contained in:
parent
9050eac595
commit
6514500236
1 changed files with 2 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Add table
Reference in a new issue