mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-20 09:06:45 +08:00
Don't prune TT move in qsearch even if SEE < 0
Even if SEE is negative there is always a good possibility that TT move is a cut move anyway. For instance a lot of BXN exchanges that have negative SEE can very easily be good exchanges. A nice side effect is a bit reduced frequency of see_sign() calls. After 643 games at 1+0 Mod vs Orig +174 =327 -142 52.49% 337.5/643 +17 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
@@ -1596,6 +1596,7 @@ namespace {
|
|||||||
|
|
||||||
// Don't search captures and checks with negative SEE values
|
// Don't search captures and checks with negative SEE values
|
||||||
if ( !isCheck
|
if ( !isCheck
|
||||||
|
&& move != ttMove
|
||||||
&& !move_is_promotion(move)
|
&& !move_is_promotion(move)
|
||||||
&& pos.see_sign(move) < 0)
|
&& pos.see_sign(move) < 0)
|
||||||
continue;
|
continue;
|
||||||
@@ -1622,7 +1623,7 @@ namespace {
|
|||||||
|
|
||||||
// All legal moves have been searched. A special case: If we're in check
|
// All legal moves have been searched. A special case: If we're in check
|
||||||
// and no legal moves were found, it is checkmate.
|
// and no legal moves were found, it is checkmate.
|
||||||
if (pos.is_check() && moveCount == 0) // Mate!
|
if (!moveCount && pos.is_check()) // Mate!
|
||||||
return value_mated_in(ply);
|
return value_mated_in(ply);
|
||||||
|
|
||||||
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
|
assert(bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE);
|
||||||
|
|||||||
Reference in New Issue
Block a user