diff options
Diffstat (limited to 'src/split.c')
| -rwxr-xr-x | src/split.c | 30 |
1 files changed, 17 insertions, 13 deletions
diff --git a/src/split.c b/src/split.c index b30cdb6..703f6a8 100755 --- a/src/split.c +++ b/src/split.c @@ -1046,6 +1046,7 @@ Return value: INT iOrigExtend; INT iExtend; MOVE mv; + SCORE iCheckSee; #ifdef DEBUG POSITION board; @@ -1080,22 +1081,30 @@ Return value: ASSERT(iExtend >= -ONE_PLY); ASSERT(iExtend <= +ONE_PLY); + // SEE on the PRE-move position -- see search.c's identical comment. + iCheckSee = 0; + if (IS_CHECKING_MOVE(mv)) + { + iCheckSee = SEE(&ctx->sPosition, mv); + } + if (MakeMove(ctx, mv)) { - ASSERT((IS_CHECKING_MOVE(mv) && + ASSERT((IS_CHECKING_MOVE(mv) && InCheck(&ctx->sPosition, ctx->sPosition.uToMove)) || - (!IS_CHECKING_MOVE(mv) && + (!IS_CHECKING_MOVE(mv) && !InCheck(&ctx->sPosition, ctx->sPosition.uToMove))); iRoughEval = GetRoughEvalScore(ctx, iAlpha, iBeta, TRUE); - + // Compute extension - ComputeMoveExtension(ctx, + ComputeMoveExtension(ctx, iAlpha, iBeta, - (ctx->sMoveStack.uBegin[ctx->uPly - 1] + + (ctx->sMoveStack.uBegin[ctx->uPly - 1] + uMoveNum), iRoughEval, uDepth, + iCheckSee, &iExtend); // @@ -1125,12 +1134,8 @@ Return value: iExtend)) { ASSERT(iExtend == 0); - iExtend = -(ONE_PLY + ExtraReduction(uDepth, - (g_SplitInfo[u].uAlreadyDone + - uMoveNum + 1), - GetMoveFailHighPercentage(mv))); - ctx->sPlyInfo[ctx->uPly].iExtensionAmount = iExtend; - INC(ctx->sCounters.tree.u64HistoryPrunes); + iExtend = -ONE_PLY; + ctx->sPlyInfo[ctx->uPly].iExtensionAmount = -ONE_PLY; } // @@ -1151,9 +1156,8 @@ Return value: // if ((iExtend < 0) && (iScore >= iBeta)) { - uDepth -= iExtend; // undo the full reduction, whatever its magnitude + uDepth += ONE_PLY; ctx->sPlyInfo[ctx->uPly].iExtensionAmount = 0; - INC(ctx->sCounters.tree.u64HistoryPruneReSearches); iScore = -Search(ctx, -iBeta, -iAlpha, uDepth); } UnmakeMove(ctx, mv); |
