]> git.sesse.net Git - stockfish/commitdiff
Simplifying two formulas
authorFauziAkram <fauzi.dabat@hotmail.com>
Wed, 1 Nov 2023 10:42:06 +0000 (13:42 +0300)
committerJoost VandeVondele <Joost.VandeVondele@gmail.com>
Fri, 3 Nov 2023 21:40:43 +0000 (22:40 +0100)
by eliminating two multiplication operations.

Passed STC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 60000 W: 15193 L: 14996 D: 29811
Ptnml(0-2): 199, 7100, 15215, 7277, 209
https://tests.stockfishchess.org/tests/view/653beb69cc309ae83956129d

Passed LTC:
LLR: 2.94 (-2.94,2.94) <-1.75,0.25>
Total: 122910 W: 30471 L: 30353 D: 62086
Ptnml(0-2): 68, 13961, 33271, 14095, 60
https://tests.stockfishchess.org/tests/view/653c5848cc309ae839561ae7

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

bench: 1216779

src/search.cpp

index 6e719be82f4a719a7c9810c5ea3907967c8cf2f8..3cd3b555c4a4506f712c214076ccced287731dd3 100644 (file)
@@ -772,7 +772,7 @@ Value search(Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, boo
                 update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
                                               stat_bonus(depth) * bonus);
                 thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)]
-                  << stat_bonus(depth) * bonus * 57 / 100;
+                  << stat_bonus(depth) * bonus / 2;
             }
             return value;
         }
@@ -1339,7 +1339,7 @@ moves_loop:  // When in check, search starts here
         update_continuation_histories(ss - 1, pos.piece_on(prevSq), prevSq,
                                       stat_bonus(depth) * bonus);
         thisThread->mainHistory[~us][from_to((ss - 1)->currentMove)]
-          << stat_bonus(depth) * bonus * 61 / 100;
+          << stat_bonus(depth) * bonus / 2;
     }
 
     if (PvNode)