Skip to content

Commit

Permalink
twick.
Browse files Browse the repository at this point in the history
bench 3341967
  • Loading branch information
Vizvezdenec committed Nov 22, 2018
1 parent 222bbe0 commit 996d852
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions src/evaluate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,21 +593,18 @@ namespace {
{
Square s = pos.square<QUEEN>(Them);
safe = mobilityArea[Us] & ~stronglyProtected;
Square s1 = pos.square<KING>(Them);

b = attackedBy[Us][KNIGHT] & pos.attacks_from<KNIGHT>(s);
bb = b & pos.attacks_from<KNIGHT>(s1);
score += KnightOnQueen * popcount(b & safe);

b = (attackedBy[Us][BISHOP] & pos.attacks_from<BISHOP>(s))
| (attackedBy[Us][ROOK ] & pos.attacks_from<ROOK >(s));

bb |= (attackedBy[Us][BISHOP] & pos.attacks_from<BISHOP>(s) & pos.attacks_from<BISHOP>(s1));
bb |= (attackedBy[Us][ROOK] & pos.attacks_from<ROOK>(s) & pos.attacks_from<ROOK>(s1));

score += SliderOnQueen * popcount(b & safe & attackedBy2[Us]);

score += Fork * popcount(bb);
bb = pos.attacks_from<QUEEN>(s) & pos.pieces(Us, ALL_PIECES) & ~attackedBy[Us][ALL_PIECES];
if (!(attackedBy[Us][ALL_PIECES] & s) && more_than_one(bb))
score -= Fork * popcount(bb);
}

if (T)
Expand Down

0 comments on commit 996d852

Please sign in to comment.