1
0
Fork 0

Store score in TT when null search fails high

Use full depth, not reduced one. This allows
to avoid to do a null search when in the same
position and at the same or bigger depth the
null search failed high.

A very small increase, if any.

After 963 games at 1+0
Mod vs Orig: +158 =657 -147  +4 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
sf_2.3.1_base
Marco Costalba 2010-04-03 08:54:21 +01:00
parent 2ed3358faf
commit 84451191f3
2 changed files with 11 additions and 5 deletions

View File

@ -1379,13 +1379,18 @@ namespace {
if (nullValue >= value_mate_in(PLY_MAX))
nullValue = beta;
if (depth < 6 * OnePly)
return nullValue;
// Do zugzwang verification search for high depths, don't store in TT
// if search was stopped.
if ( ( depth < 6 * OnePly
|| search(pos, ss, beta, depth-5*OnePly, ply, false, threadID) >= beta)
&& !AbortSearch
&& !TM.thread_should_stop(threadID))
{
assert(value_to_tt(nullValue, ply) == nullValue);
// Do zugzwang verification search
Value v = search(pos, ss, beta, depth-5*OnePly, ply, false, threadID);
if (v >= beta)
TT.store(posKey, nullValue, VALUE_TYPE_LOWER, depth, MOVE_NONE);
return nullValue;
}
} else {
// The null move failed low, which means that we may be faced with
// some kind of threat. If the previous move was reduced, check if

View File

@ -125,6 +125,7 @@ void TranspositionTable::store(const Key posKey, Value v, ValueType t, Depth d,
if (tte->key() && t == VALUE_TYPE_EV_LO)
return;
// Preserve any exsisting ttMove
if (m == MOVE_NONE)
m = tte->move();