@@ -127,17 +127,14 @@ void Search::init() {
127
127
{
128
128
double pvRed = 0.00 + log (double (hd)) * log (double (mc)) / 3.00 ;
129
129
double nonPVRed = 0.33 + log (double (hd)) * log (double (mc)) / 2.25 ;
130
- Reductions[1 ][1 ][hd][mc] = int8_t ( pvRed >= 1.0 ? pvRed * int (ONE_PLY) : 0 );
131
- Reductions[0 ][1 ][hd][mc] = int8_t (nonPVRed >= 1.0 ? nonPVRed * int (ONE_PLY) : 0 );
130
+ Reductions[1 ][1 ][hd][mc] = int8_t ( pvRed >= 1.0 ? pvRed+ 0.5 : 0 )* int (ONE_PLY);
131
+ Reductions[0 ][1 ][hd][mc] = int8_t (nonPVRed >= 1.0 ? nonPVRed+ 0.5 : 0 )* int (ONE_PLY);
132
132
133
133
Reductions[1 ][0 ][hd][mc] = Reductions[1 ][1 ][hd][mc];
134
134
Reductions[0 ][0 ][hd][mc] = Reductions[0 ][1 ][hd][mc];
135
135
136
- if (Reductions[0 ][0 ][hd][mc] > 2 * ONE_PLY)
136
+ if (Reductions[0 ][0 ][hd][mc] >= 2 * ONE_PLY)
137
137
Reductions[0 ][0 ][hd][mc] += ONE_PLY;
138
-
139
- else if (Reductions[0 ][0 ][hd][mc] > 1 * ONE_PLY)
140
- Reductions[0 ][0 ][hd][mc] += ONE_PLY / 2 ;
141
138
}
142
139
143
140
// Init futility move count array
@@ -565,8 +562,7 @@ namespace {
565
562
assert (eval - beta >= 0 );
566
563
567
564
// Null move dynamic reduction based on depth and value
568
- Depth R = 3 * ONE_PLY
569
- + depth / 4
565
+ Depth R = (3 + (depth / 8 )) * ONE_PLY
570
566
+ std::min (int (eval - beta) / PawnValueMg, 3 ) * ONE_PLY;
571
567
572
568
pos.do_null_move (st);
@@ -633,7 +629,7 @@ namespace {
633
629
&& (PvNode || ss->staticEval + 256 >= beta))
634
630
{
635
631
Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4 );
636
-
632
+ d = (d / 2 ) * 2 ; // Round to nearest full-ply
637
633
ss->skipNullMove = true ;
638
634
search<PvNode ? PV : NonPV, false >(pos, ss, alpha, beta, d, true );
639
635
ss->skipNullMove = false ;
@@ -735,7 +731,7 @@ namespace {
735
731
Value rBeta = ttValue - int (depth);
736
732
ss->excludedMove = move;
737
733
ss->skipNullMove = true ;
738
- value = search<NonPV, false >(pos, ss, rBeta - 1 , rBeta, depth / 2 , cutNode);
734
+ value = search<NonPV, false >(pos, ss, rBeta - 1 , rBeta, ( depth / 4 ) * 2 , cutNode);
739
735
ss->skipNullMove = false ;
740
736
ss->excludedMove = MOVE_NONE;
741
737
0 commit comments