Skip to content

Commit

Permalink
Sync history and counter moves updating
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mcostalba committed Dec 10, 2013
1 parent 8634710 commit b96079f
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/search.cpp
Expand Up @@ -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);
Expand Down

0 comments on commit b96079f

Please sign in to comment.