Skip to content
Permalink
Browse files

tweack.

bench 3416858
  • Loading branch information...
Vizvezdenec committed Apr 16, 2019
1 parent 4691d4f commit 93c0681832052d03f192540beefa25464cd4ce33
Showing with 7 additions and 11 deletions.
  1. +7 −11 src/evaluate.cpp
@@ -334,6 +334,13 @@ namespace {
// Bonus for bishop on a long diagonal which can "see" both center squares
if (more_than_one(attacks_bb<BISHOP>(s, pos.pieces(PAWN)) & Center))
score += LongDiagonalBishop;
else
{
constexpr Bitboard boardSide (Us == WHITE? Rank1BB | FileABB | FileHBB :
Rank8BB | FileABB | FileHBB);
if (!(b & mobilityArea[Us] & ~boardSide))
score -= make_score(30, 30);
}
}

// An important Chess960 pattern: A cornered bishop blocked by a friendly
@@ -594,17 +601,6 @@ namespace {
score += SliderOnQueen * popcount(b & safe & attackedBy2[Us]);
}

if (pos.castling_rights(Them))
{
if ((type_of(pos.piece_on(relative_square(Us, SQ_A8))) == ROOK)
&& ((attackedBy[Us][ALL_PIECES] & relative_square(Us, SQ_C8))
|| (attackedBy[Us][ALL_PIECES] & relative_square(Us, SQ_D8))))
score += make_score(20, 0);
if ((type_of(pos.piece_on(relative_square(Us, SQ_H8))) == ROOK)
&& ((attackedBy[Us][ALL_PIECES] & relative_square(Us, SQ_F8))
|| (attackedBy[Us][ALL_PIECES] & relative_square(Us, SQ_G8))))
score += make_score(20, 0);
}
if (T)
Trace::add(THREAT, Us, score);

0 comments on commit 93c0681

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