1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Consider wider range of moves near leaves.

try to avoid missing good moves for opponent or engine, by updating bestMove
also when value == bestValue (i.e. value == alpha) under certain conditions.
In particular require this is at higher depth in the tree, leaving the logic
near the root unchanged, and only apply randomly. Avoid doing this near mate
scores, leaving mate PVs intact.

Passed SMP STC 6+0.06 th7 :
LLR: 2.94 (-2.94,2.94) <0.00,2.00>
Total: 42040 W: 10930 L: 10624 D: 20486
Ptnml(0-2): 28, 4682, 11289, 4998, 23
https://tests.stockfishchess.org/tests/view/66608b00c340c8eed7757d1d

Passed SMP LTC 24+0.24 th7 :
LLR: 2.94 (-2.94,2.94) <0.50,2.50>
Total: 73692 W: 18978 L: 18600 D: 36114
Ptnml(0-2): 9, 7421, 21614, 7787, 15
https://tests.stockfishchess.org/tests/view/666095e8c340c8eed7757d49

closes https://github.com/official-stockfish/Stockfish/pull/5367

Bench 1205168
This commit is contained in:
xoto10 2024-06-14 17:27:09 +01:00 committed by Joost VandeVondele
parent 2046c92ad4
commit 2678606e8d

View file

@ -1283,11 +1283,17 @@ moves_loop: // When in check, search starts here
rm.score = -VALUE_INFINITE;
}
if (value > bestValue)
// In case we have an alternative move equal in eval to the current bestmove,
// promote it to bestmove by pretending it just exceeds alpha (but not beta).
int inc = (value == bestValue && (int(nodes) & 15) == 0
&& ss->ply + 2 + ss->ply / 32 >= thisThread->rootDepth
&& std::abs(value) + 1 < VALUE_TB_WIN_IN_MAX_PLY);
if (value + inc > bestValue)
{
bestValue = value;
if (value > alpha)
if (value + inc > alpha)
{
bestMove = move;