summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
2ed3358)
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>
if (nullValue >= value_mate_in(PLY_MAX))
nullValue = beta;
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);
} 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
} 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
if (tte->key() && t == VALUE_TYPE_EV_LO)
return;
if (tte->key() && t == VALUE_TYPE_EV_LO)
return;
+ // Preserve any exsisting ttMove
if (m == MOVE_NONE)
m = tte->move();
if (m == MOVE_NONE)
m = tte->move();