Permalink
Browse files

Bench: 3526058

  • Loading branch information...
ElbertoOne committed Feb 11, 2019
1 parent 302cdd7 commit 4e3eb53684f6a57e86004f6e4537eedf2e7b2cf1
Showing with 5 additions and 4 deletions.
  1. +5 −4 src/search.cpp
@@ -1045,12 +1045,13 @@ namespace {
if (cutNode)
r += 2 * ONE_PLY;

// Less reduction for pawn moves near the king
// Less reduction for safe pawn moves near the king
else if ( type_of(movedPiece) == PAWN
&& pos.non_pawn_material(us) > RookValueMg + 2 * KnightValueMg
&& std::abs(file_of(to_sq(move)) - file_of(pos.square<KING>(~us))) <= 1
&& std::abs(rank_of(to_sq(move)) - rank_of(pos.square<KING>(~us))) <= 3)
r -= 2 * ONE_PLY;
&& std::abs(file_of(to_sq(move)) - file_of(pos.square<KING>(~us))) < 2
&& std::abs(rank_of(to_sq(move)) - rank_of(pos.square<KING>(~us))) < 3
&& !(pos.attackers_to(to_sq(move)) & pos.pieces(~us)))
r -= ONE_PLY;

// Decrease reduction for moves that escape a capture. Filter out
// castling moves, because they are coded as "king captures rook" and

0 comments on commit 4e3eb53

Please sign in to comment.