]> git.sesse.net Git - stockfish/commitdiff
Parameter tweaks in PSQT and NMP
authorElbertoOne <lubvdberg@gmail.com>
Mon, 3 Sep 2018 10:15:31 +0000 (12:15 +0200)
committerStéphane Nicolet <cassio@free.fr>
Tue, 4 Sep 2018 08:43:02 +0000 (10:43 +0200)
This patch is a combinaison of two parameters tweaks patches which
have failed as strong yellows at LTC recently, by Alain Savard (Rocky640)
and Fabian Fichter (ianfab):
  http://tests.stockfishchess.org/tests/view/5b8a71e60ebc592cf2749b1d
  http://tests.stockfishchess.org/tests/view/5b81ce3b0ebc5902bdbb6585

Passed STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 57200 W: 12392 L: 12008 D: 32800
http://tests.stockfishchess.org/tests/view/5b8d0a5a0ebc592cf274c48f

And LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 37215 W: 6233 L: 5962 D: 25020
http://tests.stockfishchess.org/tests/view/5b8d56090ebc592cf274cb53

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

Bench: 4136116

---------------

How to continue from there?

The null move reduction formula in line 769 of search.cpp is quite convoluted
and full of mysterious magic constants at the moment, it would certainly be
nice to simplify it and/or gain more Elo from it:

```
Depth R = (  (823 + 67 * depth / ONE_PLY) / 256
           + std::min(int(eval - beta) / 200, 3)) * ONE_PLY;
```

src/psqt.cpp
src/search.cpp

index 8a02bf7293e0039472311d1005621e5beee3d289..e822b3234ef6b9e82550e435bdcffc212d73ba5f 100644 (file)
@@ -57,14 +57,14 @@ constexpr Score Bonus[][RANK_NB][int(FILE_NB) / 2] = {
    { S(-195,-109), S(-67,-89), S(-42,-50), S(-29,-13) }
   },
   { // Bishop
-   { S(-64,-58), S(-13,-31), S(-25,-37), S(-34,-19) },
-   { S(-20,-34), S(  0, -9), S( 12,-14), S(  1,  4) },
-   { S( -9,-23), S( 27,  0), S(  1, -3), S( 11, 16) },
-   { S(-11,-26), S( 28, -3), S( 21, -5), S( 32, 16) },
-   { S(-11,-26), S( 27, -4), S( 16, -7), S( 31, 14) },
-   { S(-17,-24), S( 16, -2), S( -8,  0), S(  2, 13) },
-   { S(-23,-34), S( -3,-10), S(  6,-12), S( -2,  6) },
-   { S(-55,-55), S(-11,-32), S(-19,-36), S(-29,-17) }
+   { S(-49,-58), S(- 7,-31), S(-10,-37), S(-34,-19) },
+   { S(-24,-34), S(  9, -9), S( 15,-14), S(  1,  4) },
+   { S( -9,-23), S( 22,  0), S( -3, -3), S( 12, 16) },
+   { S(  4,-26), S(  9, -3), S( 18, -5), S( 40, 16) },
+   { S( -8,-26), S( 27, -4), S( 13, -7), S( 30, 14) },
+   { S(-17,-24), S( 14, -2), S( -6,  0), S(  6, 13) },
+   { S(-19,-34), S(-13,-10), S(  7,-12), S(-11,  6) },
+   { S(-47,-55), S( -7,-32), S(-17,-36), S(-29,-17) }
   },
   { // Rook
    { S(-25, 0), S(-16, 0), S(-16, 0), S(-9, 0) },
index 1f6a129039b1d3e4dce57add99b74f63e70aed60..1303e1fb08f7c587ea02b192fca7d8ec32c7e90c 100644 (file)
@@ -766,7 +766,7 @@ namespace {
         assert(eval - beta >= 0);
 
         // Null move dynamic reduction based on depth and value
-        Depth R = ((823 + 67 * depth / ONE_PLY) / 256 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY;
+        Depth R = ((823 + 67 * depth / ONE_PLY) / 256 + std::min(int(eval - beta) / 200, 3)) * ONE_PLY;
 
         ss->currentMove = MOVE_NULL;
         ss->continuationHistory = &thisThread->continuationHistory[NO_PIECE][0];