This could be interesting. Thanks Eelco, I will test itEelco de Groot wrote: I'm trying my idea of only storing the verification search results

Moderator: Ras
This could be interesting. Thanks Eelco, I will test itEelco de Groot wrote: I'm trying my idea of only storing the verification search results
Well, thinking a bit better it could be not....if you do something like:mcostalba wrote:This could be interesting. Thanks Eelco, I will test itEelco de Groot wrote: I'm trying my idea of only storing the verification search results
Code: Select all
// Do zugzwang verification search
Value v = search(pos, ss, beta, depth-5*OnePly, ply, false, threadID);
if (v >= beta)
{
TT.store(posKey, value_to_tt(v, ply), VALUE_TYPE_LOWER, depth-5*OnePly, MOVE_NONE);
return nullValue;
}
Hi Marco,mcostalba wrote:Well, thinking a bit better it could be not....if you do something like:mcostalba wrote:This could be interesting. Thanks Eelco, I will test itEelco de Groot wrote: I'm trying my idea of only storing the verification search results
I would think it is redundant because the TT score has been already saved inside search() call.Code: Select all
// Do zugzwang verification search Value v = search(pos, ss, beta, depth-5*OnePly, ply, false, threadID); if (v >= beta) { TT.store(posKey, value_to_tt(v, ply), VALUE_TYPE_LOWER, depth-5*OnePly, MOVE_NONE); return nullValue; }
Code: Select all
// Null move dynamic reduction based on depth
int R = 3 + (depth >= 5 * OnePly ? depth / 8 : 0);
if (refinedValue - beta > PawnValueMidgame)
R++;
pos.do_null_move(st);
nullValue = -search(pos, ss, -(beta-1), depth-R*OnePly, ply+1, false, threadID);
pos.undo_null_move();
if (nullValue >= beta)
{
// Do not return unproven mate scores
if (nullValue >= value_mate_in(PLY_MAX))
nullValue = beta;
// Do zugzwang verification search for high depths, don't store in TT
// if search was stopped.
if (depth >= 6 * OnePly)
{
Depth verificationDepth = depth - (ttMove == MOVE_NONE ? 3*OnePly : 5*OnePly);
Value verificationValue = search(pos, ss, beta, verificationDepth, ply, false, threadID);
if (verificationValue >= beta)
{
nullValue = verificationValue;
if (!AbortSearch && !TM.thread_should_stop(threadID))
{
assert(value_to_tt(nullValue, ply) == nullValue);
TT.store(posKey, nullValue, VALUE_TYPE_NS_LO, verificationDepth, ss[ply].pv[ply]);
}
return nullValue;
}
if (ttMove == MOVE_NONE)
{
ttMove = ss[ply].pv[ply];
tte = TT.retrieve(pos.get_key());
ss[ply].eval = value_from_tt(tte->value(), ply);
refinedValue = refine_eval(tte, ss[ply].eval, ply); // Enhance accuracy with TT value if possible
update_gains(pos, ss[ply - 1].currentMove, ss[ply - 1].eval, ss[ply].eval);
}
}
else
{
return nullValue;
}
} else {
// The null move failed low, which means that we may be faced with
// some kind of threat.