Small cleanups

closes https://github.com/official-stockfish/Stockfish/pull/2546

No functional change.
This commit is contained in:
Joost VandeVondele
2020-03-01 09:31:17 +01:00
parent f27339d35b
commit c6839a2615
8 changed files with 37 additions and 41 deletions

View File

@@ -819,14 +819,14 @@ namespace {
ss->staticEval = eval = evaluate(pos) + bonus;
}
else
ss->staticEval = eval = -(ss-1)->staticEval + 2 * Eval::Tempo;
ss->staticEval = eval = -(ss-1)->staticEval + 2 * Tempo;
tte->save(posKey, VALUE_NONE, ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
}
// Step 7. Razoring (~1 Elo)
if ( !rootNode // The required rootNode PV handling is not available in qsearch
&& depth < 2
&& depth == 1
&& eval <= alpha - RazorMargin)
return qsearch<NT>(pos, ss, alpha, beta);
@@ -1434,13 +1434,13 @@ moves_loop: // When in check, search starts from here
else
ss->staticEval = bestValue =
(ss-1)->currentMove != MOVE_NULL ? evaluate(pos)
: -(ss-1)->staticEval + 2 * Eval::Tempo;
: -(ss-1)->staticEval + 2 * Tempo;
// Stand pat. Return immediately if static value is at least beta
if (bestValue >= beta)
{
if (!ttHit)
tte->save(posKey, value_to_tt(bestValue, ss->ply), pvHit, BOUND_LOWER,
tte->save(posKey, value_to_tt(bestValue, ss->ply), false, BOUND_LOWER,
DEPTH_NONE, MOVE_NONE, ss->staticEval);
return bestValue;
@@ -1667,7 +1667,7 @@ moves_loop: // When in check, search starts from here
// update_continuation_histories() updates histories of the move pairs formed
// by moves at ply -1, -2, and -4 with current move.
// by moves at ply -1, -2, -4, and -6 with current move.
void update_continuation_histories(Stack* ss, Piece pc, Square to, int bonus) {