mirror of
https://github.com/opelly27/Stockfish.git
synced 2026-05-20 01:37:46 +00:00
Refactor prior reduction
Make index of reduction consistent with rest of Stack closes https://github.com/official-stockfish/Stockfish/pull/5832 No functional change
This commit is contained in:
+5
-5
@@ -600,8 +600,8 @@ Value Search::Worker::search(
|
|||||||
Value bestValue, value, eval, maxValue, probCutBeta;
|
Value bestValue, value, eval, maxValue, probCutBeta;
|
||||||
bool givesCheck, improving, priorCapture, opponentWorsening;
|
bool givesCheck, improving, priorCapture, opponentWorsening;
|
||||||
bool capture, ttCapture;
|
bool capture, ttCapture;
|
||||||
int priorReduction = ss->reduction;
|
int priorReduction = (ss - 1)->reduction;
|
||||||
ss->reduction = 0;
|
(ss - 1)->reduction = 0;
|
||||||
Piece movedPiece;
|
Piece movedPiece;
|
||||||
|
|
||||||
ValueList<Move, 32> capturesSearched;
|
ValueList<Move, 32> capturesSearched;
|
||||||
@@ -1215,10 +1215,10 @@ moves_loop: // When in check, search starts here
|
|||||||
Depth d = std::max(
|
Depth d = std::max(
|
||||||
1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove)));
|
1, std::min(newDepth - r / 1024, newDepth + !allNode + (PvNode && !bestMove)));
|
||||||
|
|
||||||
(ss + 1)->reduction = newDepth - d;
|
ss->reduction = newDepth - d;
|
||||||
|
|
||||||
value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, d, true);
|
value = -search<NonPV>(pos, ss + 1, -(alpha + 1), -alpha, d, true);
|
||||||
(ss + 1)->reduction = 0;
|
ss->reduction = 0;
|
||||||
|
|
||||||
|
|
||||||
// Do a full-depth search when reduced LMR search fails high
|
// Do a full-depth search when reduced LMR search fails high
|
||||||
|
|||||||
Reference in New Issue
Block a user