Skip to content

Commit

Permalink
Parameter tweaks in PSQT and NMP
Browse files Browse the repository at this point in the history
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 official-stockfish#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;
```
  • Loading branch information
ElbertoOne authored and snicolet committed Sep 4, 2018
1 parent 767c4ad commit 4bef7aa
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
16 changes: 8 additions & 8 deletions src/psqt.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
Expand Down
2 changes: 1 addition & 1 deletion src/search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down

0 comments on commit 4bef7aa

Please sign in to comment.