Skip to content

Commit

Permalink
Simplify statScore divisor into a constant
Browse files Browse the repository at this point in the history
Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/665b392ff4a1fd0c208ea864
LLR: 2.93 (-2.94,2.94) <-1.75,0.25>
Total: 114752 W: 29628 L: 29495 D: 55629
Ptnml(0-2): 293, 13694, 29269, 13827, 293

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/665b588c11645bd3d3fac467
LLR: 2.95 (-2.94,2.94) <-1.75,0.25>
Total: 65322 W: 16549 L: 16373 D: 32400
Ptnml(0-2): 30, 7146, 18133, 7322, 30

closes #5337

bench 1241443
  • Loading branch information
linrock authored and vondele committed Jun 1, 2024
1 parent b009c43 commit c17d73c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/numa.h
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ class NumaConfig {
{
const size_t procGroupIndex = c / WIN_PROCESSOR_GROUP_SIZE;
const size_t idxWithinProcGroup = c % WIN_PROCESSOR_GROUP_SIZE;
// We skip processors that are not in the same proccessor group.
// We skip processors that are not in the same processor group.
// If everything was set up correctly this will never be an issue,
// but we have to account for bad NUMA node specification.
if (procGroupIndex != forcedProcGroupIndex)
Expand Down
5 changes: 3 additions & 2 deletions src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,8 @@ void Search::Worker::start_searching() {
return;
}

main_manager()->tm.init(limits, rootPos.side_to_move(), rootPos.game_ply(), options, main_manager()->originalTimeAdjust);
main_manager()->tm.init(limits, rootPos.side_to_move(), rootPos.game_ply(), options,
main_manager()->originalTimeAdjust);
tt.new_search();

if (rootMoves.empty())
Expand Down Expand Up @@ -1169,7 +1170,7 @@ Value Search::Worker::search(
+ (*contHist[1])[movedPiece][move.to_sq()] - 5169;

// Decrease/increase reduction for moves with a good/bad history (~8 Elo)
r -= ss->statScore / (12219 - std::min(depth, 13) * 120);
r -= ss->statScore / 11049;

// Step 17. Late moves reduction / extension (LMR, ~117 Elo)
if (depth >= 2 && moveCount > 1 + rootNode)
Expand Down
6 changes: 3 additions & 3 deletions src/thread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -217,9 +217,9 @@ void ThreadPool::clear() {
main_manager()->bestPreviousAverageScore = VALUE_INFINITE;
main_manager()->previousTimeReduction = 0.85;

main_manager()->callsCnt = 0;
main_manager()->bestPreviousScore = VALUE_INFINITE;
main_manager()->originalTimeAdjust = -1;
main_manager()->callsCnt = 0;
main_manager()->bestPreviousScore = VALUE_INFINITE;
main_manager()->originalTimeAdjust = -1;
main_manager()->tm.clear();
}

Expand Down

0 comments on commit c17d73c

Please sign in to comment.