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

Extend all moves at low depth if ttMove is doubly extended

If ttMove is doubly extended, we allow a depth growth of the remaining moves.
The idea is to get a more realistic score comparison, because of the depth
difference. We take some care to avoid this extension for high depths,
in order to avoid the cost, since the search result is supposed
to be more accurate in this case.

This pull request includes some small cleanups.

STC:
LLR: 2.95 (-2.94,2.94) <0.00,2.00>
Total: 60256 W: 16189 L: 15848 D: 28219
Ptnml(0-2): 182, 6546, 16330, 6889, 181
https://tests.stockfishchess.org/tests/view/639109a1792a529ae8f27777

LTC:
LLR: 2.95 (-2.94,2.94) <0.50,2.50>
Total: 106232 W: 28487 L: 28053 D: 49692
Ptnml(0-2): 46, 10224, 32145, 10652, 49
https://tests.stockfishchess.org/tests/view/63914cba792a529ae8f282ee

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

Bench: 3622368
This commit is contained in:
Alfredo Menezes 2022-12-09 12:11:43 -03:00 committed by Joost VandeVondele
parent aa603cfeeb
commit 9d3fd011f1
2 changed files with 7 additions and 2 deletions

View file

@ -1067,7 +1067,10 @@ moves_loop: // When in check, search starts here
if ( !PvNode
&& value < singularBeta - 25
&& ss->doubleExtensions <= 9)
{
extension = 2;
depth += depth < 12;
}
}
// Multi-cut pruning
@ -1296,7 +1299,7 @@ moves_loop: // When in check, search starts here
&& depth < 6
&& beta < VALUE_KNOWN_WIN
&& alpha > -VALUE_KNOWN_WIN)
depth -= 1;
depth -= 1;
assert(depth > 0);
}
@ -1521,7 +1524,6 @@ moves_loop: // When in check, search starts here
&& futilityBase > -VALUE_KNOWN_WIN
&& type_of(move) != PROMOTION)
{
if (moveCount > 2)
continue;

View file

@ -186,6 +186,9 @@ enum Value : int {
VALUE_MATE_IN_MAX_PLY = VALUE_MATE - MAX_PLY,
VALUE_MATED_IN_MAX_PLY = -VALUE_MATE_IN_MAX_PLY,
// In the code, we make the assumption that these values
// are such that non_pawn_material() can be used to uniquely
// identify the material on the board.
PawnValueMg = 126, PawnValueEg = 208,
KnightValueMg = 781, KnightValueEg = 854,
BishopValueMg = 825, BishopValueEg = 915,