1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00
Commit graph

4944 commits

Author SHA1 Message Date
joergoster
a910ba71ee Simplify hashfull calculation.
We can simplify the calculation of the hashfull info by looping over exact 1,000 entries,
and then divide the result by ClusterSize. Somewhat memory accesses, somewhat more accurate.

Passed non-regression LTC
https://tests.stockfishchess.org/tests/view/5e30079dab2d69d58394fd5d
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 30125 W: 3987 L: 3926 D: 22212
Ptnml(0-2): 177, 2504, 9558, 2642, 141

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

No functional change.
2020-01-28 19:25:39 +01:00
Guenther Demetz
71e0b5385e More bonus for bestMoves on past PV nodes
It looks like it is important to keep past PV (ttPv) nodes as close as possible to current PV nodes.
Credits to Mark Tenzer (31m059) & Stefan Geschwentner who first tried ideas on ttPv nodes.

STC:
https://tests.stockfishchess.org/tests/view/5e2ff5efab2d69d58394fd52
LLR: 2.95 (-2.94,2.94) {-1.00,3.00}
Total: 13302 W: 2647 L: 2507 D: 8148
Ptnml(0-2): 237, 1540, 2956, 1632, 260

LTC:
https://tests.stockfishchess.org/tests/view/5e2fff38ab2d69d58394fd55
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 15797 W: 2137 L: 1960 D: 11700
Ptnml(0-2): 96, 1443, 4628, 1547, 130

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

bench: 5545845
2020-01-28 16:28:56 +01:00
31m059
d878bc8cda Less NMP if the position was previously in PV.
The intention of the patch is to avoid aggressive null move pruning (NMP)
in positions that have previously been found to be important (PV nodes).
If we already do not apply NMP for current PV nodes, it makes sense to apply
it less often for positions that have previously been PV nodes too.

STC:
LLR: 2.96 (-2.94,2.94) {-1.00,3.00}
Total: 14959 W: 2921 L: 2782 D: 9256
Ptnml(0-2): 254, 1679, 3493, 1762, 282
http://tests.stockfishchess.org/tests/view/5e2f6637ab2d69d58394fcfd

LTC:
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 6442 W: 899 L: 753 D: 4790
Ptnml(0-2): 42, 549, 1885, 659, 61
http://tests.stockfishchess.org/tests/view/5e2f767bab2d69d58394fd04

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

Bench: 4725546
2020-01-28 10:31:25 +01:00
Alain SAVARD
1d3efff472 Dynamic Complexity based on psqt
Adjust initiative score by psqt/2 instead of materialScore/2 which simplifies #2516

Passed STC
http://tests.stockfishchess.org/tests/view/5e2e667dab2d69d58394fc73
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 23198 W: 4506 L: 4353 D: 14339
Ptnml(0-2): 396, 2615, 5380, 2728, 418

Passed LTC
http://tests.stockfishchess.org/tests/view/5e2ed75cab2d69d58394fcbf
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 8519 W: 1179 L: 1062 D: 6278
Ptnml(0-2): 50, 775, 2472, 843, 74

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

Bench:  4684459
2020-01-27 18:14:10 +01:00
Sami Kiminki
39437f4e55 Advise the kernel to use huge pages (Linux)
Align the TT allocation by 2M to make it huge page friendly and advise the
kernel to use huge pages.

Benchmarks on my i7-8700K (6C/12T) box: (3 runs per bench per config)

                    vanilla (nps)               hugepages (nps)              avg
==================================================================================
bench             | 3012490  3024364  3036331   3071052  3067544  3071052    +1.5%
bench 16 12 20    | 19237932 19050166 19085315  19266346 19207025 19548758   +1.1%
bench 16384 12 20 | 18182313 18371581 18336838  19381275 19738012 19620225   +7.0%

On my box, huge pages have a significant perf impact when using a big
hash size. They also speed up TT initialization big time:

                                  vanilla (s)  huge pages (s)  speed-up
=======================================================================
time stockfish bench 16384 1 1  | 5.37         1.48            3.6x

In practice, huge pages with auto-defrag may always be enabled in the
system, in which case this patch has no effect. This
depends on the values in /sys/kernel/mm/transparent_hugepage/enabled
and /sys/kernel/mm/transparent_hugepage/defrag.

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

No functional change
2020-01-27 11:16:10 +01:00
Alain SAVARD
6d0eabd5fe Dynamic complexity
Instead of computing the initiative bonus on the material score + dynamic score
compute it on (material score/2) + dynamic score,

Passed STC
http://tests.stockfishchess.org/tests/view/5e2c4945ab2d69d58394fa8f
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 39387 W: 7594 L: 7386 D: 24407
Ptnml(0-2): 658, 4519, 9165, 4649, 697

Passed LTC
http://tests.stockfishchess.org/tests/view/5e2c85ccab2d69d58394faa7
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 32588 W: 4206 L: 3986 D: 24396
Ptnml(0-2): 244, 2909, 9738, 3111, 253

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

Bench: 4765486
2020-01-27 09:05:55 +01:00
Lolligerhans
0ae00454ba Tweak RestrictedPiece bonus
Double the "RestrictedPiece" bonus for restricted moves targeting
occupied squares.

STC LLR: 3.58 (-2.94,2.94) {-1.00,3.00}
    Total: 25504 W: 4887 L: 4697 D: 15920
    Ptnml(0-2): 387, 2935, 5947, 3051, 422
    https://tests.stockfishchess.org/tests/view/5e2aa15dab2d69d58394f94d

LTC LLR: 2.94 (-2.94,2.94) {0.00,2.00}
    Total: 28572 W: 3826 L: 3621 D: 21125
    Ptnml(0-2): 224, 2609, 8403, 2791, 239
    https://tests.stockfishchess.org/tests/view/5e2ae7f4ab2d69d58394f9a6

Bench: 4719086
2020-01-25 09:44:09 +01:00
Stefan Geschwentner
01b6088af3 History update for pruned captures
Use a SEE pruned capture move for history updates: this patch collects
pruned capture moves also in the failed captures list, so that they get
an update in capture history.

STC:
LLR: 2.95 (-2.94,2.94) {-1.00,3.00}
Total: 11124 W: 2222 L: 2089 D: 6813
Ptnml(0-2): 186, 1280, 2506, 1381, 200
http://tests.stockfishchess.org/tests/view/5e28995fc3b97aa0d75bc294

LTC:
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 25552 W: 3418 L: 3211 D: 18923
Ptnml(0-2): 168, 2354, 7538, 2490, 200
http://tests.stockfishchess.org/tests/view/5e2943734744cfa4d6af415b

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

Bench: 4810202
2020-01-23 19:12:48 +01:00
Vizvezdenec
18fc21eba0 Tweak trapped rook penalty
This patch greatly increases the endgame penalty for having a trapped rook.
Idea was a result of witnessing Stockfish losing some games at CCCC exchanging
pieces in the position with a trapped rook which directly lead to a lost endgame.
This patch should partially fix such behavior making this penalty high even in
deep endgames.

Passed STC
http://tests.stockfishchess.org/tests/view/5e279d7cc3b97aa0d75bc1c4
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 8528 W: 1706 L: 1588 D: 5234
Ptnml(0-2): 133, 957, 1985, 1024, 159

Passed LTC
http://tests.stockfishchess.org/tests/view/5e27aee4c3b97aa0d75bc1e1
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 88713 W: 11520 L: 11130 D: 66063
Ptnml(0-2): 646, 8170, 26342, 8492, 676

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

Bench: 4964462

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

Comment by Malcolm Campbell:

Congrats! I think this might be a common pattern - scores that seem to mainly apply
to the midgame are often better with a similar (or at least fairly big) endgame value
as well. Maybe there are others eval parameters we can tweak like this...
2020-01-23 19:03:25 +01:00
Stefan Geschwentner
56e698ef83 Less reduction for escape moves at ttPv nodes
At expected PV nodes or nodes which marked as PV node in the hash table,
reduce escape moves even one ply less.

STC:
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 31795 W: 6140 L: 5953 D: 19702
Ptnml(0-2): 525, 3625, 7455, 3695, 583
http://tests.stockfishchess.org/tests/view/5e25d77fc3b97aa0d75bc013

LTC:
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 43975 W: 5708 L: 5454 D: 32813
Ptnml(0-2): 314, 4012, 13070, 4242, 325
http://tests.stockfishchess.org/tests/view/5e2618c1c3b97aa0d75bc03c

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

Bench: 4475583
2020-01-23 18:53:50 +01:00
Guenther Demetz
f63d112c71 Use (strict) greater-than-operator for 'improving'
Currently on a normal bench run in ~0,7% of cases 'improving' is set to
true although the static eval isn't improving at all, just keeping
equal. It looks like the strict gt-operator is more appropriate here,
since it returns to 'improving' its literal meaning without sideffects.

STC {-1.00,3.00} failed yellow:
https://tests.stockfishchess.org/tests/view/5e1ec38c8fd5f550e4ae1c28
LLR: -2.93 (-2.94,2.94) {-1.00,3.00}
Total: 53155 W: 10170 L: 10109 D: 32876
Ptnml(0-2): 863, 6282, 12251, 6283, 892

non-regression LTC passed:
https://tests.stockfishchess.org/tests/view/5e1f1c0d8fd5f550e4ae1c41
LLR: 2.98 (-2.94,2.94) {-1.50,0.50}
Total: 23961 W: 3114 L: 3018 D: 17829
Ptnml(0-2): 163, 2220, 7114, 2298, 170

CLoses https://github.com/official-stockfish/Stockfish/pull/2496

bench: 4561386
2020-01-23 18:43:47 +01:00
Chess13234
7ed817d7e4 Minor fixes for misc.cpp
Fixes conflict with tune.h STRINGIFY macro.

No functional change
2020-01-23 18:33:01 +01:00
protonspring
6f1013794c Use a std::bitset for KPKBitbase
This is a non-functional simplification. Looks like std::bitset works good
for the KPKBitbase. Thanks for Jorg Oster for helping get the speed up
(the [] accessor is faster than test()).

Speed testing: 10k calls to probe:
  master 9.8 sec
  patch 9.8 sec.

STC
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 100154 W: 19025 L: 18992 D: 62137
Ptnml(0-2): 1397, 11376, 24572, 11254, 1473
http://tests.stockfishchess.org/tests/view/5e21e601346e35ac603b7d2b

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

No functional change
2020-01-23 18:20:11 +01:00
protonspring
f3c83ed46c Determine opposite colors mathematically
This is a non-functional speed-up: master has to access SquareBB twice while this patch
determines opposite_colors just using the values of the squares. It doesn't seem to change
the overall speed of bench, but calling opposite_colors(...) 10 Million times:

master: 39.4 seconds
patch: 11.4 seconds.

The only data point I have (other than my own tests), is a quite old failed STC test:
LLR: -2.93 (-2.94,2.94) [-1.50,4.50]
Total: 24308 W: 5331 L: 5330 D: 13647
Ptnml(0-2): 315, 2577, 6326, 2623, 289
http://tests.stockfishchess.org/tests/view/5e010256c13ac2425c4a9a67

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

No functional change
2020-01-23 17:59:03 +01:00
protonspring
75dfdeac11 Simplify KPK classify
This is a non-functional simplification. If we use the "side to move" of the entry
instead of the template, one of the classify methods goes away. Furthermore, I've
resolved  the colors in some of the statements (we're already assuming direction
using NORTH), and used stm (side to move) instead of "us," since this is much clearer
to me.

This is not tested because it is non-functional, only applies building the bitbase
and there are no changes to the binary (on my machine).

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

No functional change
2020-01-23 17:49:10 +01:00
protonspring
7a7bcd6359 Simplify signature of remove_piece()
This is a non-functional simplification. Instead of passing the piece type
for remove_piece, we can rely on the board. The only exception is en-passant
which must be explicitly set because the destination square for the capture
is not the same as the piece to remove.

Verified also in the Chess960 castling case by running a couple of perft, see
the pull request discussion: https://github.com/official-stockfish/Stockfish/pull/2460

STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 18624 W: 4147 L: 4070 D: 10407
Ptnml(0-2): 223, 1933, 4945, 1938, 260
http://tests.stockfishchess.org/tests/view/5dfeaa93e70446e17e451163

No functional change
2020-01-23 17:31:45 +01:00
Stéphane Nicolet
bcf9282844 Restore development version
No functional change
2020-01-23 17:17:26 +01:00
Stéphane Nicolet
c3483fa9a7 Stockfish 11
Official release version of Stockfish 11.

Bench: 5156767

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

It is our pleasure to release Stockfish 11 to our fans and supporters.

Downloads are freely available at http://stockfishchess.org/download/

This version 11 of Stockfish is 50 Elo stronger than the last version, and
150 Elo stronger than the version which famously lost a match to AlphaZero
two years ago. This makes Stockfish the strongest chess engine running on
your smartphone or normal desktop PC, and we estimate that on a modern four
cores CPU, Stockfish 11 could give 1:1000 time odds to the human chess champion
having classical time control, and be on par with him. More specific data,
including nice cumulative curves for the progression of Stockfish strength
over the last seven years, can be found on [our progression page][1], at
[Stefan Pohl site][2] or at [NextChessMove][3].

In October 2019 Stockfish has regained its crown in the TCEC competition,
beating in the superfinal of season 16 an evolution of the neural-network
engine Leela that had won the previous season. This clash of style between an
alpha-beta and an neural-network engine produced spectacular chess as always,
with Stockfish [emerging victorious this time][0].

Compared to Stockfish 10, we have made hundreds of improvements to the
[codebase][4], from the evaluation function (improvements in king attacks,
middlegame/endgame transitions, and many more) to the search algorithm (some
innovative coordination methods for the searching threads, better pruning of
unsound tactical lines, etc), and fixed a couple of bugs en passant.

Our testing framework [Fishtest][5] has also seen its share of improvements
to continue propelling Stockfish forward. Along with a lot of small enhancements,
Fishtest has switched to new SPRT bounds to increase the chance of catching Elo
gainers, along with a new testing book and the use of pentanomial statistics to
be more resource-efficient.

Overall the Stockfish project is an example of open-source at its best, as
its buzzing community of programmers sharing ideas and daily reviewing their
colleagues' patches proves to be an ideal form to develop innovative ideas for
chess programming, while the mathematical accuracy of the testing framework
allows us an unparalleled level of quality control for each patch we put in
the engine. If you wish, you too can help our ongoing efforts to keep improving
it, just [get involved][6] :-)

Stockfish is also special in that every chess fan, even if not a programmer,
[can easily help][7] the team to improve the engine by connecting their PC to
Fishtest and let it play some games in the background to test new patches.
Individual contributions vary from 1 to 32 cores, but this year Bojun Guo
made it a little bit special by plugging a whole data center during the whole
year: it was a vertiginous experience to see Fishtest spikes with 17466 cores
connected playing [25600 games/minute][8]. Thanks Guo!

The Stockfish team

[0]: <http://mytcecexperience.blogspot.com/2019/10/season-16-superfinal-games-91-100.html>
[1]: <https://github.com/glinscott/fishtest/wiki/Regression-Tests>
[2]: <https://www.sp-cc.de/index.htm>
[3]: <https://nextchessmove.com/dev-builds>
[4]: <https://github.com/official-stockfish/Stockfish>
[5]: <https://tests.stockfishchess.org/tests>
[6]: <https://stockfishchess.org/get-involved/>
[7]: <https://github.com/glinscott/fishtest/wiki>
[8]: <https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/lebEmG5vgng%5B1-25%5D>
2020-01-18 01:44:37 +01:00
Stéphane Nicolet
446a3c2522 Update Readme.md for the compiler command
No functional change
2020-01-15 22:25:05 +01:00
Joost VandeVondele
baf184e8d9 Tweak late move reductions at root
More LMR at root, unless a fail low might happen.

passed STC:
 LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 25428 W: 4960 L: 4789 D: 15679
Ptnml(0-2): 424, 2948, 5832, 3045, 460
http://tests.stockfishchess.org/tests/view/5e1c9afed12216a2857e6401

passed LTC:
 LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 187423 W: 24253 L: 23599 D: 139571
Ptnml(0-2): 1284, 17437, 55536, 18085, 1292
http://tests.stockfishchess.org/tests/view/5e1ceb9975be933c8fe635a3

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

Bench: 5156767
2020-01-15 11:40:44 +01:00
Stefan Geschwentner
7150183d07 Tweak reductions for captures/promotions
From the third move reduce captures and promotions more if remaining depth is low.

STC:
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 25218 W: 5008 L: 4837 D: 15373
Ptnml(0-2): 439, 2950, 5717, 3001, 499
http://tests.stockfishchess.org/tests/view/5e1b33abd12216a2857e6359

LTC:
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 35491 W: 4760 L: 4524 D: 26207
Ptnml(0-2): 264, 3288, 10413, 3460, 294
http://tests.stockfishchess.org/tests/view/5e1b88d5d12216a2857e6385

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

Bench: 4979757
2020-01-13 12:09:23 +01:00
Vizvezdenec
4901218d4c Tweak futility pruning constants
Based on recent improvement of futility pruning by @locutus2 : we lower
the futility margin to apply it for more nodes but as a compensation
we also lower the history threshold to apply it to less nodes. Further
work in tweaking constants can always be done - numbers are guessed
"by hand" and are not results of some tuning, maybe there is some more
Elo to squeeze from this part of code.

Passed STC
LLR: 2.98 (-2.94,2.94) {-1.00,3.00}
Total: 15300 W: 3081 L: 2936 D: 9283
Ptnml(0-2): 260, 1816, 3382, 1900, 290
http://tests.stockfishchess.org/tests/view/5e18da3b27dab692fcf9a158

Passed LTC
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 108670 W: 14509 L: 14070 D: 80091
Ptnml(0-2): 813, 10259, 31736, 10665, 831
http://tests.stockfishchess.org/tests/view/5e18fc9627dab692fcf9a180

Bench: 4643972
2020-01-13 11:49:27 +01:00
xoto10
01dfdb95dc Fix previous patch in case of ponder
No functional change
2020-01-13 10:47:14 +01:00
xoto10
69204f0720 Smarter time management near stop limit
This patch makes Stockfish search same depth again if > 60% of optimum time is
already used, instead of trying the next iteration. The idea is that the next
iteration will generally take about the same amount of time as has already been
used in total. When we are likely to begin the last iteration, as judged by total
time taken so far > 0.6 * optimum time, searching the last depth again instead of
increasing the depth still helps the other threads in lazy SMP and prepares better
move ordering for the next moves.

STC :
LLR: 2.95 (-2.94,2.94) {-1.00,3.00}
Total: 13436 W: 2695 L: 2558 D: 8183
Ptnml(0-2): 222, 1538, 3087, 1611, 253
https://tests.stockfishchess.org/tests/view/5e1618a761fe5f83a67dd964

LTC :
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 32160 W: 4261 L: 4047 D: 23852
Ptnml(0-2): 211, 2988, 9448, 3135, 247
https://tests.stockfishchess.org/tests/view/5e162ca061fe5f83a67dd96d

The code was revised as suggested by @vondele for multithreading:

STC (8 threads):
LLR: 2.95 (-2.94,2.94) {0.00,2.00}
Total: 16640 W: 2049 L: 1885 D: 12706
Ptnml(0-2): 119, 1369, 5158, 1557, 108
https://tests.stockfishchess.org/tests/view/5e19826a2cc590e03c3c2f52

LTC (8 threads):
LLR: 2.95 (-2.94,2.94) {-1.00,3.00}
Total: 16536 W: 2758 L: 2629 D: 11149
Ptnml(0-2): 182, 1758, 4296, 1802, 224
https://tests.stockfishchess.org/tests/view/5e18b91a27dab692fcf9a140

Thanks to those discussing Stockfish lazy SMP on fishcooking which made me
try this, and to @vondele for suggestions and doing related tests.

See full discussion in the pull request thread:
https://github.com/official-stockfish/Stockfish/pull/2482

Bench: 4586187
2020-01-12 22:37:24 +01:00
Stéphane Nicolet
9f800a2577 Show compiler info at startup
This patch shows a description of the compiler used to compile Stockfish,
when starting from the console.

Usage:

```
./stockfish
compiler
```

Example of output:

```
Stockfish 120120 64 POPCNT by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

Compiled by clang++ 9.0.0 on Apple
 __VERSION__ macro expands to: 4.2.1 Compatible Apple LLVM 9.0.0 (clang-900.0.38)
```

No functional change
2020-01-12 11:54:15 +01:00
Joost VandeVondele
114ddb789b Update Elo estimates for terms in search
This updates estimates from 1.5 year ago, and adds missing terms. All estimates
from tests run on fishtest at 10+0.1 (STC), 20000 games, error bars +- 3 Elo,
see the original message in the pull request for the full list of tests.
Noteworthy changes are step 7 (futility pruning) going from ~30 to ~50 Elo
and step 13 (pruning at shallow depth) going from ~170 to ~200 Elo.

Full list of tests: https://github.com/official-stockfish/Stockfish/pull/2401

@Rocky640 made the suggestion to look at time control dependence of these terms.
I picked two large terms (early futility pruning and singular extension), so with
small relative error. It turns out it is actually quite interesting (see figure 1).
Contrary to my expectation, the Elo gain for early futility pruning is pretty time
control sensitive, while singular extension gain is not.

Figure 1: TC dependence of two search terms
![elo_search_tc]( http://cassio.free.fr/divers/elo_search_tc.png )

Going back to the old measurement of futility pruning (30 Elo vs today 50 Elo),
the code is actually identical but the margins have changed. It seems like a nice
example of how connected terms in search really are, i.e. the value of early futility
pruning increased significantly due to changes elsewhere in search.

No functional change.
2020-01-10 03:31:44 +01:00
protonspring
7f623206f4 Rewrite initialization of PseudoMoves
This is a non-functional code style change. I believe master is a bit convoluted
here and propose this version for clarity.

No functional change
2020-01-10 01:58:27 +01:00
Stéphane Nicolet
384bff4264 Assorted trivial cleanups January 2020
Assorted trivial cleanups.

No functional change
2020-01-09 21:57:21 +01:00
joergoster
bae019b53e 50-moves rule improvement for transposition table
User "adentong" reported recently of a game where Stockfish blundered a game
in a tournament because during a search there was an hash-table issue for
positions inside the tree very close to the 50-moves draw rule. This is part
of a problem which is commonly referred to as the Graph History Interaction (GHI),
and is difficult to solve in computer chess because storing the 50-moves counter
in the hash-table loses Elo in general.

Links:
Issue 2451    : https://github.com/official-stockfish/Stockfish/issues/2451
About the GHI : https://www.chessprogramming.org/Graph_History_Interaction

This patch tries to address the issue in this particular game and similar
reported games: it prevents that values from the transposition table are
getting used when the 50-move counter is close to reaching 100 (). The idea
is that in such cases values from previous searches, with a much lower 50-move
count, become less and less reliable.

More precisely, the heuristic we use in this patch is that we don't take the
transposition table cutoff  when we have reached a 45-moves limit, but let the
search continue doing its job. There is a possible slowdown involved, but it will
also help to find either a draw when it thought to be losing, or a way to avoid
the draw by 50-move rule. This heuristics probably will not fix all possible cases,
but seems to be working reasonably well in practice while not losing too much Elo.

Passed non-regression tests:
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 274452 W: 59700 L: 60075 D: 154677
http://tests.stockfishchess.org/tests/view/5df546116932658fe9b451bf

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 95235 W: 15297 L: 15292 D: 64646
http://tests.stockfishchess.org/tests/view/5df69c926932658fe9b4520e

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

Bench: 4586187
2020-01-09 19:48:47 +01:00
Alain SAVARD
09bef14c76 Update lists of authors and contributors
Preparing for version 11 of Stockfish: update lists of authors,
contributors giving CPU time to the fishtest framework, etc.

No functional change
2020-01-09 01:43:47 +01:00
lantonov
44f79bdf5a Tuned nullmove search
Tuning was done with Bayesian optimisation and sequential use of gaussian process
regressor and gaussian process classifier. The latter is used in lieu of ordinal
categorical modelling. Details will be given in Fishcooking forum topic: https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/b3uhBBJcJG4

STC:
LLR: 2.96 (-2.94,2.94) {-1.00,3.00}
Total: 10248 W: 2361 L: 2233 D: 5654
Ptnml(0-2): 191, 1153, 2303, 1276, 194
http://tests.stockfishchess.org/tests/view/5e0ba4159d3fbe26f672d4e6

LTC:
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 16003 W: 2648 L: 2458 D: 10897
Ptnml(0-2): 121, 1595, 4394, 1718, 153
http://tests.stockfishchess.org/tests/view/5e0bb8519d3fbe26f672d4fd

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

Bench 4747984
2020-01-07 11:47:39 +01:00
Vizvezdenec
de4e1cb88d Introduce king infiltration bonus
Add king infiltration bonus to initiative calculation. Idea is somewhat similar
to outflanking - endgames are hard to win if each king is on it side of the board.
So this adds extra bonus for one of kings crossing the middle line.

STC
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 10533 W: 2372 L: 2242 D: 5919
Ptnml(0-2): 196, 1198, 2352, 1316, 202
http://tests.stockfishchess.org/tests/view/5e0e6fd1e97ea42ea89da9b3

LTC
LLR: 2.96 (-2.94,2.94) {0.00,2.00}
Total: 15074 W: 2563 L: 2381 D: 10130
Ptnml(0-2): 118, 1500, 4111, 1663, 129
http://tests.stockfishchess.org/tests/view/5e0e857ae97ea42ea89da9cc

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

Bench: 5146339
2020-01-07 11:33:53 +01:00
Stefan Geschwentner
56d5504f65 Tweak futility pruning
Exclude moves with a good history total from futility pruning. This adds
a condition for quiet futility pruning: history total has to be low.

STC:
LLR: 2.94 (-2.94,2.94) {-1.00,3.00}
Total: 20095 W: 4503 L: 4342 D: 11250
Ptnml(0-2): 362, 2380, 4422, 2486, 388
http://tests.stockfishchess.org/tests/view/5e0d7c5387585b1706b68370

LTC:
LLR: 2.94 (-2.94,2.94) {0.00,2.00}
Total: 53016 W: 8587 L: 8302 D: 36127
Ptnml(0-2): 353, 5397, 14751, 5545, 423
http://tests.stockfishchess.org/tests/view/5e0e30d062fb773bb7047e95

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

Bench: 5215200
2020-01-07 11:18:50 +01:00
Alain SAVARD
83ecfa7c33 Use a faster implementation of Static Exchange Evaluation
SEE (Static Exchange Evaluation) is a critical component, so we might
indulge some tricks to make it faster. Another pull request #2469 showed
some speedup by removing templates, this version uses Ronald de Man
(@syzygy1) SEE implementation which also unrolls the for loop by
suppressing the min_attacker() helper function and exits as soon as
the last swap is conclusive.

See Ronald de Man version there:
https://github.com/syzygy1/Cfish/blob/master/src/position.c

Patch testes against pull request #2469:
LLR: 2.95 (-2.94,2.94) {-1.00,3.00}
Total: 19365 W: 3771 L: 3634 D: 11960
Ptnml(0-2): 241, 1984, 5099, 2092, 255
http://tests.stockfishchess.org/tests/view/5e10eb135e5436dd91b27ba3

And since we are using new SPRT statistics, and that both pull requests
finished with less than 20000 games I also tested against master as
a speed-up:

LLR: 2.99 (-2.94,2.94) {-1.00,3.00}
Total: 18878 W: 3674 L: 3539 D: 11665
Ptnml(0-2): 193, 1999, 4966, 2019, 250
http://tests.stockfishchess.org/tests/view/5e10febf12ef906c8b388745

Non functional change
2020-01-07 11:00:54 +01:00
ppigazzini
44f56e04e2 Update Readme.md
Update fishtest server URL, fix a broken wiki link, fix a typo.
2020-01-04 21:54:20 +01:00
xoto10
13f70d0392 Tune search constants
STC failed red :
LLR: -2.95 (-2.94,2.94) [0.00,3.50]
Total: 41667 W: 9094 L: 9138 D: 23435
https://tests.stockfishchess.org/tests/view/5df7bb566932658fe9b45253

LTC failed yellow :
LLR: -2.96 (-2.94,2.94) [0.00,3.50]
Total: 113667 W: 18330 L: 18196 D: 77141
https://tests.stockfishchess.org/tests/view/5df562386932658fe9b451c7

VLTC turned green :
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 128630 W: 17747 L: 17273 D: 93610
https://tests.stockfishchess.org/tests/view/5df9054dcde01bf360ab78db

Bench 5180012
2019-12-25 00:12:07 +01:00
Guenther Demetz
b6482472a0 Refine improving-logic
Don't rely on the assumption that we are improving after surviving a
check. Instead, compare with the static eval of 2 moves before.

STC
https://tests.stockfishchess.org/tests/view/5dedfd7f3cff9a249bb9e44d
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 38859 W: 8621 L: 8397 D: 21841

LTC
https://tests.stockfishchess.org/tests/view/5dee1b5a3cff9a249bb9e465
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 51130 W: 8308 L: 7996 D: 34826

Bench: 5371271
2019-12-10 08:07:34 +01:00
lantonov
443787b0d1 Tuned razor and futility margins
Tuning was done with Bayesian optimisation with the following parameters:
Acquisition function: Expected Improvement
alpha: 0.05
xi: 1e-4
TC: 60+0.6
Number of iterations: 100
Initial points: 5
Batch size: 20 games

STC
http://tests.stockfishchess.org/tests/view/5dee291e3cff9a249bb9e470
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 19586 W: 4382 L: 4214 D: 10990

LTC
http://tests.stockfishchess.org/tests/view/5dee4e273cff9a249bb9e473
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 38840 W: 6315 L: 6036 D: 26489

Bench: 5033242
2019-12-10 01:10:19 +01:00
xoto10
3ef0c3c34a TrappedRook value and King positional tables
Small tweak to increase the TrappedRook penalty. Nice idea by Alain Savard!

STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 36977 W: 8212 L: 7993 D: 20772
https://tests.stockfishchess.org/tests/view/5dee1c1e3cff9a249bb9e46d

LTC
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 36395 W: 6070 L: 5795 D: 24530
https://tests.stockfishchess.org/tests/view/5dee90153cff9a249bb9e479

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

Bench: 5176990

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

Comments by Alain Savard:

For the record, the idea was to run an experimental tuning with disabled
castling in the hope to get more hits on the TrappedRook and the king in
the c1- f1-f2-c2 area
http://tests.stockfishchess.org/tests/view/5dec57be51219d7befdc76e1

A first interpretation of that tuning was green STC (0, 4) and yellow LTC (0, 4):
http://tests.stockfishchess.org/tests/view/5ded04bc51219d7befdc773a
http://tests.stockfishchess.org/tests/view/5ded1e7a51219d7befdc7760

Thank you @xoto for trying this. Indeed, because the tuned Kc2 and Kf2 values
were quite different, it was a good idea to try something more neutral.
2019-12-10 01:04:07 +01:00
Vizvezdenec
764b9adda6 Exclude blockers for king from mobility area
This patch excludes blockers for king from mobility area. It was tried a couple
of times by now but now it passed. Performance is not enormously good but this
patch makes a lot of sence - blockers for king can't really move until king moves
(in most cases) so logic behind it is the same as behind excluding king square
from mobility area.

STC
http://tests.stockfishchess.org/tests/view/5dec388651219d7befdc76be
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 6155 W: 1428 L: 1300 D: 3427

LTC
http://tests.stockfishchess.org/tests/view/5dec4a3151219d7befdc76d3
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 120800 W: 19636 L: 19134 D: 82030

Bench: 5173081
2019-12-09 00:38:16 +01:00
Vizvezdenec
d00b2ec6bd Do last capture extensions for every single node
This patch simplifies latest @MJZ1977 elo gainer. Seems like PvNode check in
condition of last capture extension is not needed. Note - even if this is a
simplification it actually causes this extension to be applied more often, thus
strengthening effect of @MJZ1977's patch.

passed STC
http://tests.stockfishchess.org/tests/view/5deb9a3eb7bdefd50db28d0e
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 80244 W: 17421 L: 17414 D: 45409

passed LTC
http://tests.stockfishchess.org/tests/view/5deba860b7bdefd50db28d11
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 21506 W: 3565 L: 3446 D: 14495

Bench: 5097036
2019-12-09 00:32:37 +01:00
protonspring
78eeba29a2 Simplify pruning moves with negative SEE
This patch simplifies pruning moves with negative SEE values.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 18847 W: 4211 L: 4084 D: 10552
http://tests.stockfishchess.org/tests/view/5de983f2caa7c610e4d1866e

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 25556 W: 4200 L: 4087 D: 17269
http://tests.stockfishchess.org/tests/view/5de99e21caa7c610e4d18676

Bench 5390930
2019-12-09 00:27:12 +01:00
joergoster
a6b5ba1b64 Fix output of PV lines with invalid scores #2439
As reported on the forum it is possible, on very rare occasions, that we are
trying to print a PV line with an invalid previousScore, although this line
has a valid actual score. This patch fixes output of PV lines with invalid
scores in a MultiPV search. This is a follow-up patch to 8b15961 and makes
the fix finally complete.

The reason is the i <= pvIdx condition which probably is a leftover from the
times there was a special root search function. This check is no longer needed
today and prevents PV lines past the current one (current pvIdx) to be flagged
as updated even though they do have a valid score.

8b15961349
https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/PrnoDLvMvro

No functional change.
2019-12-09 00:16:55 +01:00
xoto10
20484ccdd5 Tweak time management (failing eval)
Adjust fallingEval with score change in last 5 iterations. FallingEval adjusts
the time used on a move depending on whether the position score is better or
worse than on the previous move. This change adds a dependency on the score
change in the last 5 iterations of the current search.

Tests with original code:
STC :
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 18728 W: 4170 L: 4005 D: 10553
https://tests.stockfishchess.org/tests/view/5de68a5bb407ee7bfda68a94

LTC :
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 180217 W: 29214 L: 28551 D: 122452
https://tests.stockfishchess.org/tests/view/5de690a4b407ee7bfda68a9a

Revised code using a simple array instead of a deque and different values
gave a slightly quicker pass at LTC. The merged patch now uses this:

STC :
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 18616 W: 4114 L: 3950 D: 10552
https://tests.stockfishchess.org/tests/view/5debb790b7bdefd50db28d14

LTC :
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 134151 W: 21729 L: 21191 D: 91231
https://tests.stockfishchess.org/tests/view/5debc13fb7bdefd50db28d19

No functional change
2019-12-09 00:10:47 +01:00
Joost VandeVondele
0256416bb7 Remove unneeded & incorrect check.
the removed line is not needed, since with the conditions on SE, eval
equals ttValue (except inCheck), which must be larger than beta if the second condition
is true.

The removed line is also incorrect as eval might be VALUE_NONE at this
location if inCheck. This removal addresses part of https://github.com/official-stockfish/Stockfish/pull/2406#issuecomment-552642608

No functional change.
2019-12-09 00:05:25 +01:00
Stéphane Nicolet
6a6fc28551 The sudo tag is deprecated in Travis CI
Reported by Christian Clauss. Thanks!

No functional change
2019-12-09 00:00:34 +01:00
FauziAkram
97a0e4e817 UnblockedStorm tuned
STC
http://tests.stockfishchess.org/tests/view/5de155980294ec4750cba9bd
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 60206 W: 13295 L: 12895 D: 34016

LTC
http://tests.stockfishchess.org/tests/view/5de22f6f0294ec4750cba9e7
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 182005 W: 29571 L: 28902 D: 123532

VLTC
http://tests.stockfishchess.org/tests/view/5de4adca5e868d334be516c1
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 42101 W: 6068 L: 5978 D: 30055

Bench: 5122362
2019-12-03 00:27:58 +01:00
Alain SAVARD
f0047ce08e King proximity tweak for passed pawns
Decrease slightly the penalty for opponent king distance to passed pawn.
Instead of 5:2 ratio (or 20:8) we now have 19:8

STC
http://tests.stockfishchess.org/tests/view/5de281b2727dc1d26718a673
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 28638 W: 6297 L: 6104 D: 16237

LTC
http://tests.stockfishchess.org/tests/view/5de2a2ff727dc1d26718a67b
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 59586 W: 9766 L: 9429 D: 40391

Where to go from here:
Further tests will try a similar tweak on the friendly king proximity penalty,
because recent experiments indicate that this penalty is quite sensitive,
but I wanted to try first on the larger term.

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

bench: 5258928

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

Increasing the penalty ratio to 21:8 was neutral.
http://tests.stockfishchess.org/tests/view/5de2814d727dc1d26718a671

Decreasing the penalty ratio a bit more to 9:4 seems less promising
http://tests.stockfishchess.org/tests/view/5de2f4c2727dc1d26718a691
http://tests.stockfishchess.org/tests/view/5de32ecc727dc1d26718a6b0
2019-12-01 19:12:39 +01:00
Joost VandeVondele
54253bcce6 Extend bench to static evaluations
this patch extends bench to print static evaluations.

./stockfish bench 16 1 1 filename eval

will now print the evaluations for all fens in the file.

This complements the various 'go' flavors for bench and might be useful for debugging and/or tuning.

No functional change.
2019-11-28 10:39:02 +01:00
Vizvezdenec
df340a839c Simplify king danger
This patch is a cleanup/simplification of king flank defenders patch,
removing king flanks attacks linear dependance in kingdanger. Result
of experiments with quadratic kingflank defenders scaling. Rebased on
the latest master.

passed STC
http://tests.stockfishchess.org/tests/view/5ddc2b99e0b4af579302bacf
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 19660 W: 4309 L: 4184 D: 11167

passed LTC
http://tests.stockfishchess.org/tests/view/5ddc3168e0b4af579302bade
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 24362 W: 3974 L: 3859 D: 16529

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

bench 5742013
2019-11-26 01:28:05 +01:00