]> git.sesse.net Git - stockfish/commitdiff
Simplify quietMoveMalus malus
authorFauziAkram <fauzi.dabat@hotmail.com>
Wed, 29 Nov 2023 10:47:25 +0000 (13:47 +0300)
committerDisservin <disservin.social@gmail.com>
Sat, 2 Dec 2023 10:40:36 +0000 (11:40 +0100)
Use a simple depth instead of depth + 1 in the quietMoveMalus formula.

Passed STC:
https://tests.stockfishchess.org/tests/view/65636bf0136acbc57354b662
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 105248 W: 26680 L: 26532 D: 52036
Ptnml(0-2): 409, 12590, 26481, 12732, 412

Passed LTC:
https://tests.stockfishchess.org/tests/view/6563b5db136acbc57354bcab
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 204204 W: 50200 L: 50166 D: 103838
Ptnml(0-2): 123, 23331, 55145, 23395, 108

closes https://github.com/official-stockfish/Stockfish/pull/4893

Bench: 1717495

src/search.cpp

index 0a12c85b721a484363c6a6ce7988ac834543bc9b..786d25c615b74253a8cd05be26a13c1a00ca69b7 100644 (file)
@@ -1687,7 +1687,7 @@ void update_all_stats(const Position& pos,
     PieceType              captured;
 
     int quietMoveBonus = stat_bonus(depth + 1);
-    int quietMoveMalus = stat_malus(depth + 1);
+    int quietMoveMalus = stat_malus(depth);
 
     if (!pos.capture_stage(bestMove))
     {
@@ -1898,9 +1898,9 @@ string UCI::pv(const Position& pos, Depth depth) {
 }
 
 
-// Called in case we have no ponder move
-// before exiting the search, for instance, in case we stop the search during a
-// fail high at root. We try hard to have a ponder move to return to the GUI,
+// Called in case we have no ponder move before exiting the search,
+// for instance, in case we stop the search during a fail high at root.
+// We try hard to have a ponder move to return to the GUI,
 // otherwise in case of 'ponder on' we have nothing to think about.
 bool RootMove::extract_ponder_from_tt(Position& pos) {