1
0
Fork 0

LMR Simplification

LMR simplification that also gives a slight ELO gain, especially at LTC:

STC (http://tests.stockfishchess.org/tests/view/574ec8e20ebc59029919b147):
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 32402 W: 5967 L: 5866 D: 20569

LTC (http://tests.stockfishchess.org/tests/view/574fbebf0ebc59029919b16d):
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 15103 W: 2103 L: 1975 D: 11025

Bench: 8248133
pull/687/merge
ElbertoOne 2016-06-03 10:01:02 +02:00 committed by Marco Costalba
parent 3549d98d07
commit 20023ac9b8
1 changed files with 8 additions and 9 deletions

View File

@ -1019,19 +1019,18 @@ moves_loop: // When in check search starts from here
if (!PvNode && cutNode)
r += ONE_PLY;
// Decrease/increase reduction for moves with a good/bad history
int rHist = (val - 10000) / 20000;
r = std::max(DEPTH_ZERO, r - rHist * ONE_PLY);
// Decrease reduction for moves that escape a capture. Filter out
// castling moves, because they are coded as "king captures rook" and
// hence break make_move(). Also use see() instead of see_sign(),
// because the destination square is empty.
if ( r
&& type_of(move) == NORMAL
&& type_of(pos.piece_on(to_sq(move))) != PAWN
&& pos.see(make_move(to_sq(move), from_sq(move))) < VALUE_ZERO)
r = std::max(DEPTH_ZERO, r - ONE_PLY);
else if ( type_of(move) == NORMAL
&& type_of(pos.piece_on(to_sq(move))) != PAWN
&& pos.see(make_move(to_sq(move), from_sq(move))) < VALUE_ZERO)
r -= ONE_PLY;
// Decrease/increase reduction for moves with a good/bad history
int rHist = (val - 10000) / 20000;
r = std::max(DEPTH_ZERO, r - rHist * ONE_PLY);
Depth d = std::max(newDepth - r, ONE_PLY);