@@ -769,9 +769,9 @@ namespace {
769769 && !ttMove
770770 && (PvNode || ss->staticEval + 256 >= beta))
771771 {
772- Depth d = 2 * ( depth - 2 * ONE_PLY) - (PvNode ? DEPTH_ZERO : depth / 2 );
772+ Depth d = depth - 2 * ONE_PLY - (PvNode ? DEPTH_ZERO : depth / 4 );
773773 ss->skipEarlyPruning = true ;
774- search<PvNode ? PV : NonPV, false >(pos, ss, alpha, beta, d / 2 , true );
774+ search<PvNode ? PV : NonPV, false >(pos, ss, alpha, beta, d, true );
775775 ss->skipEarlyPruning = false ;
776776
777777 tte = TT.probe (posKey, ttHit);
@@ -821,13 +821,11 @@ namespace {
821821 if (!pos.legal (move, ci.pinned ))
822822 continue ;
823823
824- moveCount = ++splitPoint->moveCount ;
824+ ss-> moveCount = moveCount = ++splitPoint->moveCount ;
825825 splitPoint->spinlock .release ();
826826 }
827827 else
828- ++moveCount;
829-
830- ss->moveCount = moveCount;
828+ ss->moveCount = ++moveCount;
831829
832830 if (RootNode)
833831 {
@@ -935,8 +933,7 @@ namespace {
935933 // Check for legality just before making the move
936934 if (!RootNode && !SpNode && !pos.legal (move, ci.pinned ))
937935 {
938- moveCount--;
939- ss->moveCount = moveCount;
936+ ss->moveCount = --moveCount;
940937 continue ;
941938 }
942939
@@ -1429,7 +1426,7 @@ namespace {
14291426 }
14301427
14311428 // Extra penalty for PV move in previous ply when it gets refuted
1432- if (is_ok ((ss-2 )->currentMove ) && (ss-1 )->moveCount == 1 && !pos.captured_piece_type ())
1429+ if (is_ok ((ss-2 )->currentMove ) && (ss-1 )->moveCount == 1 && !pos.captured_piece_type ())
14331430 {
14341431 Square prevPrevSq = to_sq ((ss-2 )->currentMove );
14351432 HistoryStats& ttMoveCmh = CounterMovesHistory[pos.piece_on (prevPrevSq)][prevPrevSq];
0 commit comments