Skip to content
Permalink
Browse files

Only use increased range upwards for danger

bench 3401397
  • Loading branch information...
Lolligerhans committed Jun 13, 2019
1 parent 7e5b6df commit 29c35a50791d3f9f72bc9c3735a6ed2af6a88201
Showing with 3 additions and 6 deletions.
  1. +3 −6 src/evaluate.cpp
@@ -458,16 +458,13 @@ namespace {

int kingFlankAttacks = popcount(b1) + popcount(b2);

Bitboard kingProx = attackedBy[Us][KING];
kingProx |= shift< Up>(kingProx);
kingProx |= shift<EAST>(kingProx);
kingProx |= shift<WEST>(kingProx);
const Bitboard kingUp = attackedBy[Us][KING] | shift<Up>(attackedBy[Us][KING]);

kingDanger += kingAttackersCount[Them] * kingAttackersWeight[Them]
+ 69 * kingAttacksCount[Them]
+ 185 * popcount(kingRing[Us] & weak)
- 100 * bool(attackedBy[Us][KNIGHT] & kingProx)
- 35 * bool(attackedBy[Us][BISHOP] & kingProx)
- 100 * bool(attackedBy[Us][KNIGHT] & kingUp)
- 35 * bool(attackedBy[Us][BISHOP] & kingUp)
+ 150 * popcount(pos.blockers_for_king(Us) | unsafeChecks)
- 873 * !pos.count<QUEEN>(Them)
- 6 * mg_value(score) / 8

3 comments on commit 29c35a5

@anshulongithub

This comment has been minimized.

Copy link

replied Jun 13, 2019

LTC was configured for this with [0.50,4.50], shudn't it be [0.00,3.50]?

@Lolligerhans

This comment has been minimized.

Copy link
Owner Author

replied Jun 13, 2019

MB I'll fix.

@31m059

This comment has been minimized.

Copy link

replied Jun 13, 2019

Good catch @anshulongithub, and I'm sorry I overlooked that, @Lolligerhans.

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