mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Simplify reductions on singular extension
Current master employs a scheme to adjust reductions on singular nodes that is somewhat controversial, see https://github.com/official-stockfish/Stockfish/pull/2167 This patch removes this use of a search result outside of [a,b], by observing that the main effect of this code is to adjust the reduction by an average of ~2 (1.7) rather than 1. Claims the first blue at STC and LTC: STC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 30142 W: 6547 L: 6442 D: 17153 http://tests.stockfishchess.org/tests/view/5daf16c40ebc5902c06da566 LTC: LLR: 2.96 (-2.94,2.94) [-3.00,1.00] Total: 45715 W: 7380 L: 7298 D: 31037 http://tests.stockfishchess.org/tests/view/5daf2f3c0ebc5902c06da6c7 Closes https://github.com/official-stockfish/Stockfish/pull/2367 Bench: 5115841
This commit is contained in:
parent
215cd19108
commit
7e89a71624
1 changed files with 7 additions and 9 deletions
|
@ -595,16 +595,16 @@ namespace {
|
|||
Depth extension, newDepth;
|
||||
Value bestValue, value, ttValue, eval, maxValue;
|
||||
bool ttHit, ttPv, inCheck, givesCheck, improving, doLMR, priorCapture;
|
||||
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture;
|
||||
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, ttCapture, singularLMR;
|
||||
Piece movedPiece;
|
||||
int moveCount, captureCount, quietCount, singularLMR;
|
||||
int moveCount, captureCount, quietCount;
|
||||
|
||||
// Step 1. Initialize node
|
||||
Thread* thisThread = pos.this_thread();
|
||||
inCheck = pos.checkers();
|
||||
priorCapture = pos.captured_piece();
|
||||
Color us = pos.side_to_move();
|
||||
moveCount = captureCount = quietCount = singularLMR = ss->moveCount = 0;
|
||||
moveCount = captureCount = quietCount = ss->moveCount = 0;
|
||||
bestValue = -VALUE_INFINITE;
|
||||
maxValue = VALUE_INFINITE;
|
||||
|
||||
|
@ -917,7 +917,7 @@ moves_loop: // When in check, search starts from here
|
|||
ss->killers);
|
||||
|
||||
value = bestValue;
|
||||
moveCountPruning = false;
|
||||
singularLMR = moveCountPruning = false;
|
||||
ttCapture = ttMove && pos.capture_or_promotion(ttMove);
|
||||
|
||||
// Mark this node as being searched
|
||||
|
@ -980,10 +980,7 @@ moves_loop: // When in check, search starts from here
|
|||
if (value < singularBeta)
|
||||
{
|
||||
extension = 1;
|
||||
singularLMR++;
|
||||
|
||||
if (value < singularBeta - std::min(4 * depth, 36))
|
||||
singularLMR++;
|
||||
singularLMR = true;
|
||||
}
|
||||
|
||||
// Multi-cut pruning
|
||||
|
@ -1106,7 +1103,8 @@ moves_loop: // When in check, search starts from here
|
|||
r--;
|
||||
|
||||
// Decrease reduction if ttMove has been singularly extended
|
||||
r -= singularLMR;
|
||||
if (singularLMR)
|
||||
r -= 2;
|
||||
|
||||
if (!captureOrPromotion)
|
||||
{
|
||||
|
|
Loading…
Add table
Reference in a new issue