mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00: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:
parent
86347100a5
commit
b96079f86b
1 changed files with 6 additions and 3 deletions
|
@ -573,10 +573,13 @@ namespace {
|
||||||
if ( ttValue >= beta
|
if ( ttValue >= beta
|
||||||
&& ttMove
|
&& ttMove
|
||||||
&& !pos.capture_or_promotion(ttMove)
|
&& !pos.capture_or_promotion(ttMove)
|
||||||
&& ttMove != ss->killers[0])
|
&& !inCheck)
|
||||||
|
{
|
||||||
|
if (ss->killers[0] != ttMove)
|
||||||
{
|
{
|
||||||
ss->killers[1] = ss->killers[0];
|
ss->killers[1] = ss->killers[0];
|
||||||
ss->killers[0] = ttMove;
|
ss->killers[0] = ttMove;
|
||||||
|
}
|
||||||
|
|
||||||
Value bonus = Value(int(depth) * int(depth));
|
Value bonus = Value(int(depth) * int(depth));
|
||||||
History.update(pos.moved_piece(ttMove), to_sq(ttMove), bonus);
|
History.update(pos.moved_piece(ttMove), to_sq(ttMove), bonus);
|
||||||
|
|
Loading…
Add table
Reference in a new issue