summaryrefslogtreecommitdiff
path: root/src/search.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/search.c')
-rwxr-xr-xsrc/search.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/search.c b/src/search.c
index b0bcafd..33cd09d 100755
--- a/src/search.c
+++ b/src/search.c
@@ -490,8 +490,8 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
// mattering in practice.
ASSERT(!uFutilityMargin);
if ((FALSE == pi->fPvNode) &&
- (ctx->uPly >= 2) &&
(iOrigExtend == 0) &&
+ (ctx->uPly >= 2) &&
(ctx->sPlyInfo[ctx->uPly - 2].iExtensionAmount <= 0))
{
if ((uDepth > THREE_QUARTERS_PLY) &&
@@ -732,16 +732,16 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
// this is the one thing that must never be true of a move
// we skip outright.
fThisMoveEFPPruned = FALSE;
- if ((x != 0) &&
- (uLegalMoves > 1) &&
+ if ((x != 0) &&
+ (uLegalMoves > 1) &&
(uFutilityMargin) &&
(TRUE == fInLeftovers) &&
- (ComputeMoveScore(ctx, mv, (x - 1)) < uFutilityMargin) &&
(iExtend <= 0) &&
- (!IS_ESCAPING_CHECK(mv)) &&
+ (!IS_ESCAPING_CHECK(mv)) &&
(!IS_CAPTURE_OR_PROMOTION(mv)) &&
- (!IS_CHECKING_MOVE(mv)) &&
- (!fThreat))
+ (!IS_CHECKING_MOVE(mv)) &&
+ (!fThreat) &&
+ (ComputeMoveScore(ctx, mv, (x - 1)) < uFutilityMargin))
{
ULONG uFHAttempts = 0;
ULONG uFHPct = GetMoveFailHighPercentage(mv, &uFHAttempts);
@@ -757,7 +757,6 @@ Search(IN SEARCHER_THREAD_CONTEXT *ctx,
}
if (TRUE == fThisMoveEFPPruned)
{
- ASSERT(!IS_CHECKING_MOVE(mv));
fAnyMoveEFPPruned = TRUE;
UnmakeMove(ctx, mv);
ASSERT(PositionsAreEquivalent(pos, &pi->sPosition));