summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
c6ba14b)
No functional change with faked split.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
assert(st->ply >= st->rule50);
assert(st->ply >= st->rule50);
for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
if (history[st->ply - i] == st->key)
return true;
for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
if (history[st->ply - i] == st->key)
return true;
if ( !PvNode
&& !captureOrPromotion
&& !isCheck
if ( !PvNode
&& !captureOrPromotion
&& !isCheck
&& !move_is_castle(move))
{
// Move count based pruning
&& !move_is_castle(move))
{
// Move count based pruning
ss->reduction = reduction<PvNode>(sp->depth, moveCount);
if (ss->reduction)
{
ss->reduction = reduction<PvNode>(sp->depth, moveCount);
if (ss->reduction)
{
- Value localAlpha = sp->alpha;
+ Value localAlpha = sp->alpha;
Depth d = newDepth - ss->reduction;
value = d < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, d, true, threadID);
Depth d = newDepth - ss->reduction;
value = d < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, d, true, threadID);
value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
doFullDepthSearch = (value > localAlpha);
}
value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
doFullDepthSearch = (value > localAlpha);
}
+ ss->reduction = Depth(0); // Restore original reduction
}
// Step 15. Full depth search
if (doFullDepthSearch)
{
}
// Step 15. Full depth search
if (doFullDepthSearch)
{
- ss->reduction = Depth(0);
Value localAlpha = sp->alpha;
value = newDepth < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth, true, threadID);
Value localAlpha = sp->alpha;
value = newDepth < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth, true, threadID);