1
0
Fork 0

Skip node-level cut-off tests when in check

No functional change.
sf_4_base
Marco Costalba 2013-07-07 13:27:31 +02:00
parent a55fb76dcc
commit 7e575512ae
1 changed files with 5 additions and 4 deletions

View File

@ -581,7 +581,10 @@ namespace {
// Step 5. Evaluate the position statically and update parent's gain statistics
if (inCheck)
{
ss->staticEval = ss->evalMargin = eval = VALUE_NONE;
goto iid_start;
}
else if (tte)
{
@ -618,7 +621,6 @@ namespace {
// Step 6. Razoring (is omitted in PV nodes)
if ( !PvNode
&& depth < 4 * ONE_PLY
&& !inCheck
&& eval + razor_margin(depth) < beta
&& ttMove == MOVE_NONE
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
@ -638,7 +640,6 @@ namespace {
if ( !PvNode
&& !ss->skipNullMove
&& depth < 4 * ONE_PLY
&& !inCheck
&& eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
&& abs(eval) < VALUE_KNOWN_WIN
@ -649,7 +650,6 @@ namespace {
if ( !PvNode
&& !ss->skipNullMove
&& depth > ONE_PLY
&& !inCheck
&& eval >= beta
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
&& pos.non_pawn_material(pos.side_to_move()))
@ -711,7 +711,6 @@ namespace {
// prune the previous move.
if ( !PvNode
&& depth >= 5 * ONE_PLY
&& !inCheck
&& !ss->skipNullMove
&& abs(beta) < VALUE_MATE_IN_MAX_PLY)
{
@ -737,6 +736,8 @@ namespace {
}
}
iid_start: // When in check we skip early cut tests
// Step 10. Internal iterative deepening
if ( depth >= (PvNode ? 5 * ONE_PLY : 8 * ONE_PLY)
&& ttMove == MOVE_NONE