mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49:14 +00:00
Increase reduction if tt-move is a capture
The idea is that chances are the tt-move is best and will be difficult to raise alpha when playing a quiet move. STC: LLR: 2.95 (-2.94,2.94) [0.00,5.00] Total: 7582 W: 1415 L: 1259 D: 4908 LTC: LLR: 2.97 (-2.94,2.94) [0.00,5.00] Total: 59553 W: 7885 L: 7573 D: 44095 Bench: 5725676 Closes #1147
This commit is contained in:
parent
612d93234b
commit
77342126d8
1 changed files with 10 additions and 1 deletions
|
@ -554,7 +554,7 @@ namespace {
|
||||||
Depth extension, newDepth;
|
Depth extension, newDepth;
|
||||||
Value bestValue, value, ttValue, eval;
|
Value bestValue, value, ttValue, eval;
|
||||||
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
|
||||||
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets;
|
bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture;
|
||||||
Piece moved_piece;
|
Piece moved_piece;
|
||||||
int moveCount, quietCount;
|
int moveCount, quietCount;
|
||||||
|
|
||||||
|
@ -842,6 +842,7 @@ moves_loop: // When in check search starts from here
|
||||||
&& (tte->bound() & BOUND_LOWER)
|
&& (tte->bound() & BOUND_LOWER)
|
||||||
&& tte->depth() >= depth - 3 * ONE_PLY;
|
&& tte->depth() >= depth - 3 * ONE_PLY;
|
||||||
skipQuiets = false;
|
skipQuiets = false;
|
||||||
|
ttCapture = false;
|
||||||
|
|
||||||
// Step 11. Loop through moves
|
// Step 11. Loop through moves
|
||||||
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
|
// Loop through all pseudo-legal moves until no moves remain or a beta cutoff occurs
|
||||||
|
@ -959,6 +960,9 @@ moves_loop: // When in check search starts from here
|
||||||
ss->moveCount = --moveCount;
|
ss->moveCount = --moveCount;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (move == ttMove && captureOrPromotion)
|
||||||
|
ttCapture = true;
|
||||||
|
|
||||||
// Update the current move (this must be done after singular extension search)
|
// Update the current move (this must be done after singular extension search)
|
||||||
ss->currentMove = move;
|
ss->currentMove = move;
|
||||||
|
@ -979,6 +983,11 @@ moves_loop: // When in check search starts from here
|
||||||
r -= r ? ONE_PLY : DEPTH_ZERO;
|
r -= r ? ONE_PLY : DEPTH_ZERO;
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
||||||
|
// Increase reduction if ttMove is a capture
|
||||||
|
if (ttCapture)
|
||||||
|
r += ONE_PLY;
|
||||||
|
|
||||||
// Increase reduction for cut nodes
|
// Increase reduction for cut nodes
|
||||||
if (cutNode)
|
if (cutNode)
|
||||||
r += 2 * ONE_PLY;
|
r += 2 * ONE_PLY;
|
||||||
|
|
Loading…
Add table
Reference in a new issue