mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 11:39:15 +00:00
Fix white space breakage
No functional change with faked split. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
c6ba14b7c9
commit
2572055c87
2 changed files with 4 additions and 4 deletions
|
@ -1668,7 +1668,7 @@ bool Position::is_draw() const {
|
||||||
|
|
||||||
assert(st->ply >= st->rule50);
|
assert(st->ply >= st->rule50);
|
||||||
|
|
||||||
// Draw by repetition?
|
// Draw by repetition?
|
||||||
for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
|
for (int i = 4, e = Min(st->rule50, st->pliesFromNull); i <= e; i += 2)
|
||||||
if (history[st->ply - i] == st->key)
|
if (history[st->ply - i] == st->key)
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -1675,7 +1675,7 @@ namespace {
|
||||||
if ( !PvNode
|
if ( !PvNode
|
||||||
&& !captureOrPromotion
|
&& !captureOrPromotion
|
||||||
&& !isCheck
|
&& !isCheck
|
||||||
&& !dangerous
|
&& !dangerous
|
||||||
&& !move_is_castle(move))
|
&& !move_is_castle(move))
|
||||||
{
|
{
|
||||||
// Move count based pruning
|
// Move count based pruning
|
||||||
|
@ -1717,7 +1717,7 @@ namespace {
|
||||||
ss->reduction = reduction<PvNode>(sp->depth, moveCount);
|
ss->reduction = reduction<PvNode>(sp->depth, moveCount);
|
||||||
if (ss->reduction)
|
if (ss->reduction)
|
||||||
{
|
{
|
||||||
Value localAlpha = sp->alpha;
|
Value localAlpha = sp->alpha;
|
||||||
Depth d = newDepth - ss->reduction;
|
Depth d = newDepth - ss->reduction;
|
||||||
value = d < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
|
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);
|
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, d, true, threadID);
|
||||||
|
@ -1736,12 +1736,12 @@ namespace {
|
||||||
value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
|
value = -search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth-ss->reduction, true, threadID);
|
||||||
doFullDepthSearch = (value > localAlpha);
|
doFullDepthSearch = (value > localAlpha);
|
||||||
}
|
}
|
||||||
|
ss->reduction = Depth(0); // Restore original reduction
|
||||||
}
|
}
|
||||||
|
|
||||||
// Step 15. Full depth search
|
// Step 15. Full depth search
|
||||||
if (doFullDepthSearch)
|
if (doFullDepthSearch)
|
||||||
{
|
{
|
||||||
ss->reduction = Depth(0);
|
|
||||||
Value localAlpha = sp->alpha;
|
Value localAlpha = sp->alpha;
|
||||||
value = newDepth < OnePly ? -qsearch<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, Depth(0), threadID)
|
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);
|
: - search<NonPV>(pos, ss+1, -(localAlpha+1), -localAlpha, newDepth, true, threadID);
|
||||||
|
|
Loading…
Add table
Reference in a new issue