}
ss->ttPv = ttPv;
}
-
+
// Step 11. If the position is not in TT, decrease depth by 2
if ( PvNode
&& depth >= 6
[to_sq(move)];
if ( !captureOrPromotion
- && moveCount >= abs(depth) + 1
+ && moveCount
&& (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold
&& (*contHist[1])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold)
continue;
if (RootInTB)
{
// Sort moves according to TB rank
- std::sort(rootMoves.begin(), rootMoves.end(),
+ std::stable_sort(rootMoves.begin(), rootMoves.end(),
[](const RootMove &a, const RootMove &b) { return a.tbRank > b.tbRank; } );
// Probe during search only if DTZ is not available and we are winning