mirror of
https://github.com/sockspls/badfish
synced 2025-07-15 05:19:15 +00:00
Do LMR on captures
STC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 5361 W: 1086 L: 936 D: 3339 http://tests.stockfishchess.org/tests/view/57b31b0f0ebc591c761f643d LTC: LLR: 2.96 (-2.94,2.94) [0.00,5.00] Total: 54694 W: 7591 L: 7287 D: 39816 http://tests.stockfishchess.org/tests/view/57b3442b0ebc591c761f6450 bench: 6881120
This commit is contained in:
parent
e3af492142
commit
8493c8c6b8
1 changed files with 27 additions and 21 deletions
|
@ -962,9 +962,14 @@ moves_loop: // When in check search starts from here
|
||||||
// re-searched at full depth.
|
// re-searched at full depth.
|
||||||
if ( depth >= 3 * ONE_PLY
|
if ( depth >= 3 * ONE_PLY
|
||||||
&& moveCount > 1
|
&& moveCount > 1
|
||||||
&& !captureOrPromotion)
|
&& (!captureOrPromotion || moveCountPruning))
|
||||||
{
|
{
|
||||||
Depth r = reduction<PvNode>(improving, depth, moveCount);
|
Depth r = reduction<PvNode>(improving, depth, moveCount);
|
||||||
|
|
||||||
|
if (captureOrPromotion)
|
||||||
|
r -= r ? ONE_PLY : DEPTH_ZERO;
|
||||||
|
else
|
||||||
|
{
|
||||||
Value val = thisThread->history[moved_piece][to_sq(move)]
|
Value val = thisThread->history[moved_piece][to_sq(move)]
|
||||||
+ (cmh ? (*cmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
+ (cmh ? (*cmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
||||||
+ (fmh ? (*fmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
+ (fmh ? (*fmh )[moved_piece][to_sq(move)] : VALUE_ZERO)
|
||||||
|
@ -987,12 +992,13 @@ moves_loop: // When in check search starts from here
|
||||||
// Decrease/increase reduction for moves with a good/bad history
|
// Decrease/increase reduction for moves with a good/bad history
|
||||||
int rHist = (val - 10000) / 20000;
|
int rHist = (val - 10000) / 20000;
|
||||||
r = std::max(DEPTH_ZERO, r - rHist * ONE_PLY);
|
r = std::max(DEPTH_ZERO, r - rHist * ONE_PLY);
|
||||||
|
}
|
||||||
|
|
||||||
Depth d = std::max(newDepth - r, ONE_PLY);
|
Depth d = std::max(newDepth - r, ONE_PLY);
|
||||||
|
|
||||||
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
|
value = -search<NonPV>(pos, ss+1, -(alpha+1), -alpha, d, true);
|
||||||
|
|
||||||
doFullDepthSearch = (value > alpha && r != DEPTH_ZERO);
|
doFullDepthSearch = (value > alpha && d != newDepth);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
doFullDepthSearch = !PvNode || moveCount > 1;
|
doFullDepthSearch = !PvNode || moveCount > 1;
|
||||||
|
|
Loading…
Add table
Reference in a new issue