mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 00:56:39 +08:00
Singular extension and check extension tweak
If singular extension fails to trigger extension then don't consider check extension. STC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 69428 W: 12663 L: 12271 D: 44494 LTC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 44023 W: 5875 L: 5612 D: 32536 Bench: 6170444 Closes #1043
This commit is contained in:
@@ -868,12 +868,7 @@ moves_loop: // When in check search starts from here
|
|||||||
moveCountPruning = depth < 16 * ONE_PLY
|
moveCountPruning = depth < 16 * ONE_PLY
|
||||||
&& moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY];
|
&& moveCount >= FutilityMoveCounts[improving][depth / ONE_PLY];
|
||||||
|
|
||||||
// Step 12. Extensions
|
// Step 12. Singular and Gives Check Extensions
|
||||||
// Extend checks
|
|
||||||
if ( givesCheck
|
|
||||||
&& !moveCountPruning
|
|
||||||
&& pos.see_ge(move, VALUE_ZERO))
|
|
||||||
extension = ONE_PLY;
|
|
||||||
|
|
||||||
// Singular extension search. If all moves but one fail low on a search of
|
// Singular extension search. If all moves but one fail low on a search of
|
||||||
// (alpha-s, beta-s), and just one fails high on (alpha, beta), then that move
|
// (alpha-s, beta-s), and just one fails high on (alpha, beta), then that move
|
||||||
@@ -882,7 +877,6 @@ moves_loop: // When in check search starts from here
|
|||||||
// ttValue minus a margin then we extend the ttMove.
|
// ttValue minus a margin then we extend the ttMove.
|
||||||
if ( singularExtensionNode
|
if ( singularExtensionNode
|
||||||
&& move == ttMove
|
&& move == ttMove
|
||||||
&& !extension
|
|
||||||
&& pos.legal(move))
|
&& pos.legal(move))
|
||||||
{
|
{
|
||||||
Value rBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
|
Value rBeta = std::max(ttValue - 2 * depth / ONE_PLY, -VALUE_MATE);
|
||||||
@@ -894,6 +888,10 @@ moves_loop: // When in check search starts from here
|
|||||||
if (value < rBeta)
|
if (value < rBeta)
|
||||||
extension = ONE_PLY;
|
extension = ONE_PLY;
|
||||||
}
|
}
|
||||||
|
else if ( givesCheck
|
||||||
|
&& !moveCountPruning
|
||||||
|
&& pos.see_ge(move, VALUE_ZERO))
|
||||||
|
extension = ONE_PLY;
|
||||||
|
|
||||||
// Calculate new depth for this move
|
// Calculate new depth for this move
|
||||||
newDepth = depth - ONE_PLY + extension;
|
newDepth = depth - ONE_PLY + extension;
|
||||||
|
|||||||
Reference in New Issue
Block a user