This functional simplification removes the PvNode reduction and adjusts
the ttPv lmr condition accordingly. Their definitions only differ by the
inclusions of ttPv. Aside from this, shallow move pruning definition
will be the only other functional difference, but this does not seem to
matter too much.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 58908 W: 12980 L: 12932 D: 32996
http://tests.stockfishchess.org/tests/view/
5cd1aaaa0ebc5925cf046c6a
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 20351 W: 3521 L: 3399 D: 13431
http://tests.stockfishchess.org/tests/view/
5cd23fa70ebc5925cf047cd2
Bench:
3687854
// Reductions lookup table, initialized at startup
int Reductions[MAX_MOVES]; // [depth or moveNumber]
// Reductions lookup table, initialized at startup
int Reductions[MAX_MOVES]; // [depth or moveNumber]
- template <bool PvNode> Depth reduction(bool i, Depth d, int mn) {
+ Depth reduction(bool i, Depth d, int mn) {
int r = Reductions[d / ONE_PLY] * Reductions[mn] / 1024;
int r = Reductions[d / ONE_PLY] * Reductions[mn] / 1024;
- return ((r + 512) / 1024 + (!i && r > 1024) - PvNode) * ONE_PLY;
+ return ((r + 512) / 1024 + (!i && r > 1024)) * ONE_PLY;
}
constexpr int futility_move_count(bool improving, int depth) {
}
constexpr int futility_move_count(bool improving, int depth) {
continue;
// Reduced depth of the next LMR search
continue;
// Reduced depth of the next LMR search
- int lmrDepth = std::max(newDepth - reduction<PvNode>(improving, depth, moveCount), DEPTH_ZERO);
+ int lmrDepth = std::max(newDepth - reduction(improving, depth, moveCount), DEPTH_ZERO);
lmrDepth /= ONE_PLY;
// Countermoves based pruning (~20 Elo)
lmrDepth /= ONE_PLY;
// Countermoves based pruning (~20 Elo)
|| moveCountPruning
|| ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha))
{
|| moveCountPruning
|| ss->staticEval + PieceValue[EG][pos.captured_piece()] <= alpha))
{
- Depth r = reduction<PvNode>(improving, depth, moveCount);
+ Depth r = reduction(improving, depth, moveCount);
// Decrease reduction if position is or has been on the PV
if (ttPv)
// Decrease reduction if position is or has been on the PV
if (ttPv)
// Decrease reduction if opponent's move count is high (~10 Elo)
if ((ss-1)->moveCount > 15)
// Decrease reduction if opponent's move count is high (~10 Elo)
if ((ss-1)->moveCount > 15)