Skip to content

Commit

Permalink
Revert "Enhanced verify search (official-stockfish#1338)"
Browse files Browse the repository at this point in the history
This reverts commit b53239d.
  • Loading branch information
NiTeFiSe committed Mar 31, 2018
1 parent 2198cd0 commit 63ba8d4
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 14 deletions.
12 changes: 1 addition & 11 deletions src/search.cpp
Expand Up @@ -681,8 +681,7 @@ namespace {
// Step 8. Null move search with verification search (is omitted in PV nodes)
if ( !PvNode
&& eval >= beta
&& ss->staticEval >= beta - 36 * depth / ONE_PLY + 225
&& (ss->ply >= thisThread->nmp_ply || ss->ply % 2 == thisThread->pair))
&& ss->staticEval >= beta - 36 * depth / ONE_PLY + 225)
{

assert(eval - beta >= 0);
Expand All @@ -708,17 +707,8 @@ namespace {
return nullValue;

// Do verification search at high depths
R += ONE_PLY;
// disable null move pruning for side to move for the first part of the remaining search tree
int nmp_ply = thisThread->nmp_ply;
int pair = thisThread->pair;
thisThread->nmp_ply = ss->ply + 3 * (depth-R) / 4;
thisThread->pair = (ss->ply % 2) == 0;

Value v = depth-R < ONE_PLY ? qsearch<NonPV, false>(pos, ss, beta-1, beta)
: search<NonPV>(pos, ss, beta-1, beta, depth-R, false, true);
thisThread->pair = pair;
thisThread->nmp_ply = nmp_ply;

if (v >= beta)
return nullValue;
Expand Down
2 changes: 0 additions & 2 deletions src/thread.cpp
Expand Up @@ -187,8 +187,6 @@ void ThreadPool::start_thinking(Position& pos, StateListPtr& states,
th->rootDepth = th->completedDepth = DEPTH_ZERO;
th->rootMoves = rootMoves;
th->rootPos.set(pos.fen(), pos.is_chess960(), &setupStates->back(), th);
th->nmp_ply = 0;
th->pair = -1;
}

setupStates->back() = tmp;
Expand Down
2 changes: 1 addition & 1 deletion src/thread.h
Expand Up @@ -61,7 +61,7 @@ class Thread {
Material::Table materialTable;
Endgames endgames;
size_t PVIdx;
int selDepth, nmp_ply, pair;
int selDepth;
std::atomic<uint64_t> nodes, tbHits;

Position rootPos;
Expand Down

0 comments on commit 63ba8d4

Please sign in to comment.