Skip to content

Commit b0e051e

Browse files
daniel-monroePikaCat-OuO
authored andcommitted
Simplify corrections in extension margins
1 parent 1d927a0 commit b0e051e

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

src/search.cpp

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1028,13 +1028,12 @@ Value Search::Worker::search(
10281028

10291029
if (value < singularBeta)
10301030
{
1031-
int corrValAdj1 = std::abs(correctionValue) / 265083;
1032-
int corrValAdj2 = std::abs(correctionValue) / 253680;
1033-
int doubleMargin = -4 + 254 * PvNode - 177 * !ttCapture - corrValAdj1
1031+
int corrValAdj = std::abs(correctionValue) / 265083;
1032+
int doubleMargin = -4 + 254 * PvNode - 177 * !ttCapture - corrValAdj
10341033
- 1045 * ttMoveHistory / 133568
10351034
- (ss->ply > thisThread->rootDepth) * 43;
1036-
int tripleMargin = 96 + 282 * PvNode - 241 * !ttCapture + 96 * ss->ttPv
1037-
- corrValAdj2 - (ss->ply * 2 > thisThread->rootDepth * 3) * 54;
1035+
int tripleMargin = 96 + 282 * PvNode - 241 * !ttCapture + 96 * ss->ttPv - corrValAdj
1036+
- (ss->ply * 2 > thisThread->rootDepth * 3) * 54;
10381037

10391038
extension =
10401039
1 + (value < singularBeta - doubleMargin) + (value < singularBeta - tripleMargin);

0 commit comments

Comments
 (0)