]> git.sesse.net Git - stockfish/commitdiff
Simplify statScore divisor into a constant
authorLinmiao Xu <linmiao.xu@gmail.com>
Sat, 1 Jun 2024 15:07:08 +0000 (11:07 -0400)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Sat, 1 Jun 2024 18:17:38 +0000 (20:17 +0200)
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 https://github.com/official-stockfish/Stockfish/pull/5337

bench 1241443

src/numa.h
src/search.cpp
src/thread.cpp

index ee84e1cf34d4ca5838c80ab8b60808a1d0c83b19..967e24a66e6903470eda5e8196b46c2d9843649d 100644 (file)
@@ -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)
index 35de756ff273dbcc719bd0b7f59f5c1f6c08b4ba..84ca93f8e59aa943d8a679a87089226849ef04ee 100644 (file)
@@ -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())
@@ -1169,7 +1170,7 @@ moves_loop:  // When in check, search starts here
                       + (*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)
index 1b0fffc3572752ede5bb7079d45cbeb6bd9b0a62..a36c2efb7c1b010e57c95c95e421d98a8cd5c05a 100644 (file)
@@ -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();
 }