mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-24 11:06:58 +08:00
Sync history and counter moves updating
Change updating rule after a TT hit to match the same one at the end of the search. Small change in functionality, but we want to have uniform rules in the code. bench: 7767864
This commit is contained in:
@@ -573,10 +573,13 @@ namespace {
|
||||
if ( ttValue >= beta
|
||||
&& ttMove
|
||||
&& !pos.capture_or_promotion(ttMove)
|
||||
&& ttMove != ss->killers[0])
|
||||
&& !inCheck)
|
||||
{
|
||||
ss->killers[1] = ss->killers[0];
|
||||
ss->killers[0] = ttMove;
|
||||
if (ss->killers[0] != ttMove)
|
||||
{
|
||||
ss->killers[1] = ss->killers[0];
|
||||
ss->killers[0] = ttMove;
|
||||
}
|
||||
|
||||
Value bonus = Value(int(depth) * int(depth));
|
||||
History.update(pos.moved_piece(ttMove), to_sq(ttMove), bonus);
|
||||
|
||||
Reference in New Issue
Block a user