for (int imp = 0; imp <= 1; ++imp)
for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
for (int imp = 0; imp <= 1; ++imp)
for (int d = 1; d < 64; ++d)
for (int mc = 1; mc < 64; ++mc)
- Reductions[!PV][imp][d][mc] = int(std::round(r)) * ONE_PLY;
- Reductions[PV][imp][d][mc] = std::max(Reductions[!PV][imp][d][mc] - ONE_PLY, DEPTH_ZERO);
-
+ Reductions[NonPV][imp][d][mc] = int(std::round(r)) * ONE_PLY;
+ Reductions[PV][imp][d][mc] = std::max(Reductions[NonPV][imp][d][mc] - ONE_PLY, DEPTH_ZERO);
+
- if (!imp && Reductions[!PV][imp][d][mc] >= 2 * ONE_PLY)
- Reductions[!PV][imp][d][mc] += ONE_PLY;
+ if (!imp && Reductions[NonPV][imp][d][mc] >= 2 * ONE_PLY)
+ Reductions[NonPV][imp][d][mc] += ONE_PLY;
Thread* bestThread = this;
if ( !this->easyMovePlayed
&& Options["MultiPV"] == 1
Thread* bestThread = this;
if ( !this->easyMovePlayed
&& Options["MultiPV"] == 1
- // update_stats() updates killers, history, countermove and countermove
- // history when a new quiet best move is found.
+ // update_stats() updates killers, history, countermove and countermove plus
+ // follow-up move history when a new quiet best move is found.
void update_stats(const Position& pos, Stack* ss, Move move,
Depth depth, Move* quiets, int quietsCnt) {
void update_stats(const Position& pos, Stack* ss, Move move,
Depth depth, Move* quiets, int quietsCnt) {
static PRNG rng(now()); // PRNG sequence should be non-deterministic
// RootMoves are already sorted by score in descending order
static PRNG rng(now()); // PRNG sequence should be non-deterministic
// RootMoves are already sorted by score in descending order
size_t PVIdx = pos.this_thread()->PVIdx;
size_t multiPV = std::min((size_t)Options["MultiPV"], rootMoves.size());
uint64_t nodes_searched = Threads.nodes_searched();
size_t PVIdx = pos.this_thread()->PVIdx;
size_t multiPV = std::min((size_t)Options["MultiPV"], rootMoves.size());
uint64_t nodes_searched = Threads.nodes_searched();