mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Prune evasions with negative SEE in qsearch
Only pure blocking evasions are candidate for pruning. After 998 games at 1+0 Mod vs Orig +215 =596 -187 +10 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
d844a75d2c
commit
81cfd81366
1 changed files with 10 additions and 3 deletions
|
@ -1643,7 +1643,7 @@ namespace {
|
||||||
StateInfo st;
|
StateInfo st;
|
||||||
Move ttMove, move;
|
Move ttMove, move;
|
||||||
Value staticValue, bestValue, value, futilityBase, futilityValue;
|
Value staticValue, bestValue, value, futilityBase, futilityValue;
|
||||||
bool isCheck, enoughMaterial, moveIsCheck;
|
bool isCheck, enoughMaterial, moveIsCheck, evasionPrunable;
|
||||||
const TTEntry* tte = NULL;
|
const TTEntry* tte = NULL;
|
||||||
int moveCount = 0;
|
int moveCount = 0;
|
||||||
bool pvNode = (beta - alpha != 1);
|
bool pvNode = (beta - alpha != 1);
|
||||||
|
@ -1744,8 +1744,15 @@ namespace {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't search captures and checks with negative SEE values
|
// Detect blocking evasions that are candidate to be pruned
|
||||||
if ( !isCheck
|
evasionPrunable = isCheck
|
||||||
|
&& bestValue != -VALUE_INFINITE
|
||||||
|
&& !pos.move_is_capture(move)
|
||||||
|
&& pos.type_of_piece_on(move_from(move)) != KING
|
||||||
|
&& !pos.can_castle(pos.side_to_move());
|
||||||
|
|
||||||
|
// Don't search moves with negative SEE values
|
||||||
|
if ( (!isCheck || evasionPrunable)
|
||||||
&& move != ttMove
|
&& move != ttMove
|
||||||
&& !move_is_promotion(move)
|
&& !move_is_promotion(move)
|
||||||
&& pos.see_sign(move) < 0)
|
&& pos.see_sign(move) < 0)
|
||||||
|
|
Loading…
Add table
Reference in a new issue