I also don't expect an Elo increase, only maybe at very fast tc. But better test a useless tweak here and there than endlessly talk about Rybka cloning...
A remark regarding the update_gains() call in search()
Code: Select all
// Step 5. Evaluate the position statically and
// update gain statistics of parent move.
if (isCheck)
ss->eval = ss->evalMargin = VALUE_NONE;
else if (tte)
{
assert(tte->static_value() != VALUE_NONE);
ss->eval = tte->static_value();
ss->evalMargin = tte->static_value_margin();
refinedValue = refine_eval(tte, ss->eval, ply);
}
else
{
refinedValue = ss->eval = evaluate(pos, ss->evalMargin);
TT.store(posKey, VALUE_NONE, VALUE_TYPE_NONE, DEPTH_NONE, MOVE_NONE, ss->eval, ss->evalMargin);
}
// Save gain for the parent non-capture move
update_gains(pos, (ss-1)->currentMove, (ss-1)->eval, ss->eval);
Similar to the code in qsearch() the update_gains() function could be called only if not in check
Code: Select all
// Step 5. Evaluate the position statically and
// update gain statistics of parent move.
if (isCheck)
ss->eval = ss->evalMargin = VALUE_NONE;
else
{
if (tte)
{
assert(tte->static_value() != VALUE_NONE);
ss->eval = tte->static_value();
ss->evalMargin = tte->static_value_margin();
refinedValue = refine_eval(tte, ss->eval, ply);
}
else
{
refinedValue = ss->eval = evaluate(pos, ss->evalMargin);
TT.store(posKey, VALUE_NONE, VALUE_TYPE_NONE, DEPTH_NONE, MOVE_NONE, ss->eval, ss->evalMargin);
}
// Save gain for the parent non-capture move
update_gains(pos, (ss-1)->currentMove, (ss-1)->eval, ss->eval);
}
Saves a few unneccesary function calls.