int mc; // moveCount
// Init reductions array
- for (hd = 1; hd < 64; hd++) for (mc = 1; mc < 64; mc++)
+ for (hd = 1; hd < 64; ++hd) for (mc = 1; mc < 64; ++mc)
{
double pvRed = log(double(hd)) * log(double(mc)) / 3.0;
double nonPVRed = 0.33 + log(double(hd)) * log(double(mc)) / 2.25;
}
// Init futility margins array
- for (d = 1; d < 16; d++) for (mc = 0; mc < 64; mc++)
+ for (d = 1; d < 16; ++d) for (mc = 0; mc < 64; ++mc)
FutilityMargins[d][mc] = Value(112 * int(log(double(d * d) / 2) / log(2.0) + 1.001) - 8 * mc + 45);
// Init futility move count array
- for (d = 0; d < 32; d++)
+ for (d = 0; d < 32; ++d)
{
FutilityMoveCounts[0][d] = int(3 + 0.3 * pow(double(d ), 1.8)) * 3/4 + (2 < d && d < 5);
FutilityMoveCounts[1][d] = int(3 + 0.3 * pow(double(d + 0.98), 1.8));
RootMoves[i].prevScore = RootMoves[i].score;
// MultiPV loop. We perform a full root search for each PV line
- for (PVIdx = 0; PVIdx < PVSize; PVIdx++)
+ for (PVIdx = 0; PVIdx < PVSize; ++PVIdx)
{
// Reset aspiration window starting size
if (depth >= 5)
splitPoint->mutex.unlock();
}
else
- moveCount++;
+ ++moveCount;
if (RootNode)
{
// Check for legality only before to do the move
if (!RootNode && !SpNode && !pos.legal(move, ci.pinned))
{
- moveCount--;
+ --moveCount;
continue;
}
// iteration. This information is used for time management: When
// the best move changes frequently, we allocate some more time.
if (!pvMove)
- BestMoveChanges++;
+ ++BestMoveChanges;
}
else
// All other moves but the PV are set to the lowest value, this
static RKISS rk;
// PRNG sequence should be not deterministic
- for (int i = Time::now() % 50; i > 0; i--)
+ for (int i = Time::now() % 50; i > 0; --i)
rk.rand<unsigned>();
// RootMoves are already sorted by score in descending order
<< " multipv " << i + 1
<< " pv";
- for (size_t j = 0; RootMoves[i].pv[j] != MOVE_NONE; j++)
+ for (size_t j = 0; RootMoves[i].pv[j] != MOVE_NONE; ++j)
s << " " << move_to_uci(RootMoves[i].pv[j], pos.is_chess960());
}
// Loop across all split points and sum accumulated SplitPoint nodes plus
// all the currently active positions nodes.
for (size_t i = 0; i < Threads.size(); ++i)
- for (int j = 0; j < Threads[i]->splitPointsSize; j++)
+ for (int j = 0; j < Threads[i]->splitPointsSize; ++j)
{
SplitPoint& sp = Threads[i]->splitPoints[j];