1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-05-01 01:03:09 +00:00

Better document what we skip when in check

No functional change.
This commit is contained in:
Marco Costalba 2013-07-19 09:37:31 +02:00
parent 4b3a0fdab0
commit 110644d918

View file

@ -623,7 +623,7 @@ namespace {
Gains.update(pos.piece_on(to), to, -(ss-1)->staticEval - ss->staticEval); Gains.update(pos.piece_on(to), to, -(ss-1)->staticEval - ss->staticEval);
} }
// Step 6. Razoring (is omitted in PV nodes) // Step 6. Razoring (skipped when in check)
if ( !PvNode if ( !PvNode
&& depth < 4 * ONE_PLY && depth < 4 * ONE_PLY
&& eval + razor_margin(depth) < beta && eval + razor_margin(depth) < beta
@ -639,7 +639,7 @@ namespace {
return v; return v;
} }
// Step 7. Static null move pruning (is omitted in PV nodes) // Step 7. Static null move pruning (skipped when in check)
// We're betting that the opponent doesn't have a move that will reduce // We're betting that the opponent doesn't have a move that will reduce
// the score by more than futility_margin(depth) if we do a null move. // the score by more than futility_margin(depth) if we do a null move.
if ( !PvNode if ( !PvNode
@ -710,7 +710,7 @@ namespace {
} }
} }
// Step 9. ProbCut (is omitted in PV nodes) // Step 9. ProbCut (skipped when in check)
// If we have a very good capture (i.e. SEE > seeValues[captured_piece_type]) // If we have a very good capture (i.e. SEE > seeValues[captured_piece_type])
// and a reduced search returns a value much above beta, we can (almost) safely // and a reduced search returns a value much above beta, we can (almost) safely
// prune the previous move. // prune the previous move.
@ -741,7 +741,7 @@ namespace {
} }
} }
// Step 10. Internal iterative deepening // Step 10. Internal iterative deepening (skipped when in check)
if ( depth >= (PvNode ? 5 * ONE_PLY : 8 * ONE_PLY) if ( depth >= (PvNode ? 5 * ONE_PLY : 8 * ONE_PLY)
&& ttMove == MOVE_NONE && ttMove == MOVE_NONE
&& (PvNode || ss->staticEval + Value(256) >= beta)) && (PvNode || ss->staticEval + Value(256) >= beta))