mirror of
https://github.com/sockspls/badfish
synced 2025-04-29 16:23:09 +00:00
Use cut-off checks in qsearch as killer moves
Killers should not be captures, but checks are not and are produced also in qsearch. Use this information, will be useful for move ordering. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
e7bad2687a
commit
e86468cc63
1 changed files with 12 additions and 0 deletions
|
@ -1469,6 +1469,18 @@ namespace {
|
|||
// Update transposition table
|
||||
TT.store(pos, value_to_tt(bestValue, ply), depth, MOVE_NONE, VALUE_TYPE_EXACT);
|
||||
|
||||
// Update killers only for good check moves
|
||||
Move m = ss[ply].currentMove;
|
||||
if (alpha >= beta && ok_to_history(pos, m)) // Only non capture moves are considered
|
||||
{
|
||||
// Wrong to update history when depth is <= 0
|
||||
|
||||
if (m != ss[ply].killer1)
|
||||
{
|
||||
ss[ply].killer2 = ss[ply].killer1;
|
||||
ss[ply].killer1 = m;
|
||||
}
|
||||
}
|
||||
return bestValue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue