Small cleanups 12

- Clean signature of functions in namespace NNUE
- Add comment for countermove based pruning
- Remove bestMoveCount variable
- Add const qualifier to kpp_board_index array
- Fix spaces in get_best_thread()
- Fix indention in capture LMR code in search.cpp
- Rename TtmemDeleter to LargePageDeleter

Closes https://github.com/official-stockfish/Stockfish/pull/3063

No functional change
This commit is contained in:
Stéphane Nicolet
2020-09-09 10:49:31 +02:00
parent 485d517c68
commit 9a64e737cf
11 changed files with 36 additions and 41 deletions
+9 -11
View File
@@ -225,7 +225,7 @@ void MainThread::search() {
Time.init(Limits, us, rootPos.game_ply());
TT.new_search();
Eval::verify_NNUE();
Eval::NNUE::verify();
if (rootMoves.empty())
{
@@ -462,10 +462,7 @@ void Thread::search() {
++failedHighCnt;
}
else
{
++rootMoves[pvIdx].bestMoveCount;
break;
}
delta += delta / 4 + 5;
@@ -1218,14 +1215,14 @@ moves_loop: // When in check, search starts from here
}
else
{
// Increase reduction for captures/promotions if late move and at low depth
if (depth < 8 && moveCount > 2)
r++;
// Increase reduction for captures/promotions if late move and at low depth
if (depth < 8 && moveCount > 2)
r++;
// Unless giving check, this capture is likely bad
if ( !givesCheck
&& ss->staticEval + PieceValue[EG][pos.captured_piece()] + 213 * depth <= alpha)
r++;
// Unless giving check, this capture is likely bad
if ( !givesCheck
&& ss->staticEval + PieceValue[EG][pos.captured_piece()] + 213 * depth <= alpha)
r++;
}
Depth d = std::clamp(newDepth - r, 1, newDepth);
@@ -1570,6 +1567,7 @@ moves_loop: // When in check, search starts from here
[pos.moved_piece(move)]
[to_sq(move)];
// CounterMove based pruning
if ( !captureOrPromotion
&& moveCount
&& (*contHist[0])[pos.moved_piece(move)][to_sq(move)] < CounterMovePruneThreshold