Skip to content

Commit

Permalink
Only positive SEE
Browse files Browse the repository at this point in the history
  • Loading branch information
MJZ1977 committed Apr 8, 2019
1 parent f2f38e5 commit 03b3f35
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/search.cpp
Expand Up @@ -539,7 +539,7 @@ namespace {
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Value bestValue, value, ttValue, eval, maxValue;
bool ttHit, ttPv, inCheck, givesCheck, improving, EvalExtension;
bool ttHit, ttPv, inCheck, givesCheck, improving, EvalExtension, positiveSEE;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
Piece movedPiece;
int moveCount, captureCount, quietCount;
Expand Down Expand Up @@ -898,6 +898,7 @@ namespace {
captureOrPromotion = pos.capture_or_promotion(move);
movedPiece = pos.moved_piece(move);
givesCheck = pos.gives_check(move);
positiveSEE = pos.see_ge(move);

// Step 13. Extensions (~70 Elo)

Expand Down Expand Up @@ -936,7 +937,7 @@ namespace {

// Check extension (~2 Elo)
else if ( givesCheck
&& (pos.blockers_for_king(~us) & from_sq(move) || pos.see_ge(move)))
&& (pos.blockers_for_king(~us) & from_sq(move) || positiveSEE))
extension = ONE_PLY;

// Shuffle extension
Expand Down Expand Up @@ -964,9 +965,9 @@ namespace {
{
// Skip quiet moves if movecount exceeds our FutilityMoveCount threshold
moveCountPruning = moveCount >= futility_move_count(improving, depth / ONE_PLY);
//if (moveCountPruning && EvalExtension && type_of(movedPiece) == PAWN)
//if (moveCountPruning && EvalExtension && type_of(movedPiece) == PAWN && positiveSEE)
// sync_cout << "Position : " << pos.fen() << " - Move = " << UCI::move(move, pos.is_chess960()) << sync_endl;
moveCountPruning &= !(EvalExtension && type_of(movedPiece) == PAWN);
moveCountPruning &= !(EvalExtension && type_of(movedPiece) == PAWN && positiveSEE);

if ( !captureOrPromotion
&& !givesCheck
Expand Down

0 comments on commit 03b3f35

Please sign in to comment.