@@ -127,17 +127,14 @@ void Search::init() {
127127 {
128128 double pvRed = 0.00 + log (double (hd)) * log (double (mc)) / 3.00 ;
129129 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);
132132
133133 Reductions[1 ][0 ][hd][mc] = Reductions[1 ][1 ][hd][mc];
134134 Reductions[0 ][0 ][hd][mc] = Reductions[0 ][1 ][hd][mc];
135135
136- if (Reductions[0 ][0 ][hd][mc] > 2 * ONE_PLY)
136+ if (Reductions[0 ][0 ][hd][mc] >= 2 * ONE_PLY)
137137 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 ;
141138 }
142139
143140 // Init futility move count array
@@ -565,8 +562,7 @@ namespace {
565562 assert (eval - beta >= 0 );
566563
567564 // 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
570566 + std::min (int (eval - beta) / PawnValueMg, 3 ) * ONE_PLY;
571567
572568 pos.do_null_move (st);
@@ -633,7 +629,7 @@ namespace {
633629 && (PvNode || ss->staticEval + 256 >= beta))
634630 {
635631 Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4 );
636-
632+ d = (d / 2 ) * 2 ; // Round to nearest full-ply
637633 ss->skipNullMove = true ;
638634 search<PvNode ? PV : NonPV, false >(pos, ss, alpha, beta, d, true );
639635 ss->skipNullMove = false ;
@@ -735,7 +731,7 @@ namespace {
735731 Value rBeta = ttValue - int (depth);
736732 ss->excludedMove = move;
737733 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);
739735 ss->skipNullMove = false ;
740736 ss->excludedMove = MOVE_NONE;
741737
0 commit comments