Skip to content
Permalink
Browse files

SingRedux12AllCaptures

Simplified Singular. Extends captures and active positions more.
Bench:4050758
  • Loading branch information...
Chess13234 committed Jan 1, 2019
1 parent 21e9d7f commit db42da82982f7a1f298ce89ef335cafb6ca9276c
Showing with 8 additions and 20 deletions.
  1. +8 −20 src/search.cpp
@@ -934,30 +934,18 @@ namespace {
// then that move is singular and should be extended. To verify this we do
// a reduced search on all the other moves but the ttMove and if the
// result is lower than ttValue minus a margin then we will extend the ttMove.
if ( depth >= 8 * ONE_PLY
&& move == ttMove

extension = ONE_PLY*(( givesCheck // Check extension (~2 Elo)
&& pos.see_ge(move))
|| (type_of(move) == CASTLING) // Extension if castling
|| ( (captureOrPromotion||depth>= pos.rule50_count()*8)
&& move == ttMove
&& !rootNode
&& !excludedMove // Avoid recursive singular search
&& ttValue != VALUE_NONE
&& (tte->bound() & BOUND_LOWER)
&& tte->depth() >= depth - 3 * ONE_PLY
&& pos.legal(move))
{
Value reducedBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
ss->excludedMove = move;
value = search<NonPV>(pos, ss, reducedBeta - 1, reducedBeta, depth / 2, cutNode);
ss->excludedMove = MOVE_NONE;

if (value < reducedBeta)
extension = ONE_PLY;
}
else if ( givesCheck // Check extension (~2 Elo)
&& pos.see_ge(move))
extension = ONE_PLY;

// Extension if castling
else if (type_of(move) == CASTLING)
extension = ONE_PLY;
)
);

// Calculate new depth for this move
newDepth = depth - ONE_PLY + extension;

0 comments on commit db42da8

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