mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
New History Bonus Formula
bonus = d^2 + d - 1 Bench: 8639247 Resolves #484
This commit is contained in:
parent
8d858783e1
commit
aa242d2f84
1 changed files with 3 additions and 3 deletions
|
@ -1095,7 +1095,7 @@ moves_loop: // When in check search starts from here
|
||||||
&& is_ok((ss - 1)->currentMove)
|
&& is_ok((ss - 1)->currentMove)
|
||||||
&& is_ok((ss - 2)->currentMove))
|
&& is_ok((ss - 2)->currentMove))
|
||||||
{
|
{
|
||||||
Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY));
|
Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY -1);
|
||||||
Square prevPrevSq = to_sq((ss - 2)->currentMove);
|
Square prevPrevSq = to_sq((ss - 2)->currentMove);
|
||||||
CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq];
|
CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq];
|
||||||
prevCmh.update(pos.piece_on(prevSq), prevSq, bonus);
|
prevCmh.update(pos.piece_on(prevSq), prevSq, bonus);
|
||||||
|
@ -1371,7 +1371,7 @@ moves_loop: // When in check search starts from here
|
||||||
ss->killers[0] = move;
|
ss->killers[0] = move;
|
||||||
}
|
}
|
||||||
|
|
||||||
Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY));
|
Value bonus = Value((depth / ONE_PLY) * (depth / ONE_PLY) + depth / ONE_PLY -1);
|
||||||
|
|
||||||
Square prevSq = to_sq((ss-1)->currentMove);
|
Square prevSq = to_sq((ss-1)->currentMove);
|
||||||
CounterMovesStats& cmh = CounterMovesHistory[pos.piece_on(prevSq)][prevSq];
|
CounterMovesStats& cmh = CounterMovesHistory[pos.piece_on(prevSq)][prevSq];
|
||||||
|
@ -1401,7 +1401,7 @@ moves_loop: // When in check search starts from here
|
||||||
{
|
{
|
||||||
Square prevPrevSq = to_sq((ss-2)->currentMove);
|
Square prevPrevSq = to_sq((ss-2)->currentMove);
|
||||||
CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq];
|
CounterMovesStats& prevCmh = CounterMovesHistory[pos.piece_on(prevPrevSq)][prevPrevSq];
|
||||||
prevCmh.update(pos.piece_on(prevSq), prevSq, -bonus - 2 * depth / ONE_PLY - 1);
|
prevCmh.update(pos.piece_on(prevSq), prevSq, -bonus - 2 * ((depth + 1) / ONE_PLY));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue