mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 01:03:09 +00:00
Skip node-level cut-off tests when in check
No functional change.
This commit is contained in:
parent
a55fb76dcc
commit
7e575512ae
1 changed files with 5 additions and 4 deletions
|
@ -581,7 +581,10 @@ namespace {
|
||||||
|
|
||||||
// Step 5. Evaluate the position statically and update parent's gain statistics
|
// Step 5. Evaluate the position statically and update parent's gain statistics
|
||||||
if (inCheck)
|
if (inCheck)
|
||||||
|
{
|
||||||
ss->staticEval = ss->evalMargin = eval = VALUE_NONE;
|
ss->staticEval = ss->evalMargin = eval = VALUE_NONE;
|
||||||
|
goto iid_start;
|
||||||
|
}
|
||||||
|
|
||||||
else if (tte)
|
else if (tte)
|
||||||
{
|
{
|
||||||
|
@ -618,7 +621,6 @@ namespace {
|
||||||
// Step 6. Razoring (is omitted in PV nodes)
|
// Step 6. Razoring (is omitted in PV nodes)
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& depth < 4 * ONE_PLY
|
&& depth < 4 * ONE_PLY
|
||||||
&& !inCheck
|
|
||||||
&& eval + razor_margin(depth) < beta
|
&& eval + razor_margin(depth) < beta
|
||||||
&& ttMove == MOVE_NONE
|
&& ttMove == MOVE_NONE
|
||||||
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
||||||
|
@ -638,7 +640,6 @@ namespace {
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& !ss->skipNullMove
|
&& !ss->skipNullMove
|
||||||
&& depth < 4 * ONE_PLY
|
&& depth < 4 * ONE_PLY
|
||||||
&& !inCheck
|
|
||||||
&& eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
|
&& eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
|
||||||
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
||||||
&& abs(eval) < VALUE_KNOWN_WIN
|
&& abs(eval) < VALUE_KNOWN_WIN
|
||||||
|
@ -649,7 +650,6 @@ namespace {
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& !ss->skipNullMove
|
&& !ss->skipNullMove
|
||||||
&& depth > ONE_PLY
|
&& depth > ONE_PLY
|
||||||
&& !inCheck
|
|
||||||
&& eval >= beta
|
&& eval >= beta
|
||||||
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
|
||||||
&& pos.non_pawn_material(pos.side_to_move()))
|
&& pos.non_pawn_material(pos.side_to_move()))
|
||||||
|
@ -711,7 +711,6 @@ namespace {
|
||||||
// prune the previous move.
|
// prune the previous move.
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& depth >= 5 * ONE_PLY
|
&& depth >= 5 * ONE_PLY
|
||||||
&& !inCheck
|
|
||||||
&& !ss->skipNullMove
|
&& !ss->skipNullMove
|
||||||
&& abs(beta) < VALUE_MATE_IN_MAX_PLY)
|
&& 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
|
// Step 10. Internal iterative deepening
|
||||||
if ( depth >= (PvNode ? 5 * ONE_PLY : 8 * ONE_PLY)
|
if ( depth >= (PvNode ? 5 * ONE_PLY : 8 * ONE_PLY)
|
||||||
&& ttMove == MOVE_NONE
|
&& ttMove == MOVE_NONE
|
||||||
|
|
Loading…
Add table
Reference in a new issue