Remove pureStaticEval variable and keep only one
static evaluation (ss->staticEval).
STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 64617 W: 14348 L: 14312 D: 35957 Elo -0.24
http://tests.stockfishchess.org/tests/view/
5c9e1ad70ebc5925cfffc106
LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 82200 W: 13703 L: 13680 D: 54817 Elo -0.24
http://tests.stockfishchess.org/tests/view/
5c9e4efd0ebc5925cfffc68b
Bench :
3506898
Key posKey;
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
Key posKey;
Move ttMove, move, excludedMove, bestMove;
Depth extension, newDepth;
- Value bestValue, value, ttValue, eval, maxValue, pureStaticEval;
+ Value bestValue, value, ttValue, eval, maxValue;
bool ttHit, ttPv, inCheck, givesCheck, improving;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
Piece movedPiece;
bool ttHit, ttPv, inCheck, givesCheck, improving;
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
Piece movedPiece;
// Step 6. Static evaluation of the position
if (inCheck)
{
// Step 6. Static evaluation of the position
if (inCheck)
{
- ss->staticEval = eval = pureStaticEval = VALUE_NONE;
+ ss->staticEval = eval = VALUE_NONE;
improving = false;
goto moves_loop; // Skip early pruning when in check
}
else if (ttHit)
{
// Never assume anything on values stored in TT
improving = false;
goto moves_loop; // Skip early pruning when in check
}
else if (ttHit)
{
// Never assume anything on values stored in TT
- ss->staticEval = eval = pureStaticEval = tte->eval();
+ ss->staticEval = eval = tte->eval();
- ss->staticEval = eval = pureStaticEval = evaluate(pos);
+ ss->staticEval = eval = evaluate(pos);
// Can ttValue be used as a better position evaluation?
if ( ttValue != VALUE_NONE
// Can ttValue be used as a better position evaluation?
if ( ttValue != VALUE_NONE
{
int bonus = -(ss-1)->statScore / 512;
{
int bonus = -(ss-1)->statScore / 512;
- pureStaticEval = evaluate(pos);
- ss->staticEval = eval = pureStaticEval + bonus;
+ ss->staticEval = eval = evaluate(pos) + bonus;
- ss->staticEval = eval = pureStaticEval = -(ss-1)->staticEval + 2 * Eval::Tempo;
+ ss->staticEval = eval = -(ss-1)->staticEval + 2 * Eval::Tempo;
- tte->save(posKey, VALUE_NONE, ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, pureStaticEval);
+ tte->save(posKey, VALUE_NONE, ttPv, BOUND_NONE, DEPTH_NONE, MOVE_NONE, eval);
}
// Step 7. Razoring (~2 Elo)
}
// Step 7. Razoring (~2 Elo)
&& (ss-1)->currentMove != MOVE_NULL
&& (ss-1)->statScore < 23200
&& eval >= beta
&& (ss-1)->currentMove != MOVE_NULL
&& (ss-1)->statScore < 23200
&& eval >= beta
- && pureStaticEval >= beta - 36 * depth / ONE_PLY + 225
+ && ss->staticEval >= beta - 36 * depth / ONE_PLY + 225
&& !excludedMove
&& pos.non_pawn_material(us)
&& (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor))
&& !excludedMove
&& pos.non_pawn_material(us)
&& (ss->ply >= thisThread->nmpMinPly || us != thisThread->nmpColor))
tte->save(posKey, value_to_tt(bestValue, ss->ply), ttPv,
bestValue >= beta ? BOUND_LOWER :
PvNode && bestMove ? BOUND_EXACT : BOUND_UPPER,
tte->save(posKey, value_to_tt(bestValue, ss->ply), ttPv,
bestValue >= beta ? BOUND_LOWER :
PvNode && bestMove ? BOUND_EXACT : BOUND_UPPER,
- depth, bestMove, pureStaticEval);
+ depth, bestMove, ss->staticEval);
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);