1
0
Fork 0
Commit Graph

1936 Commits (c83cbe42f3a6c9b145a4557ef874222fe685a9bc)

Author SHA1 Message Date
xoto10 5a7827d59d Combo of statscore divisor and pawn psqt changes
Passed STC 10+0.1 th 1:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 13282 W: 3100 L: 2881 D: 7301
http://tests.stockfishchess.org/tests/view/5d21132e0ebc5925cf0c81f4

Passed LTC 60+0.6 th 1:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 44243 W: 7768 L: 7468 D: 29007
http://tests.stockfishchess.org/tests/view/5d2119050ebc5925cf0c832b

Bench 3705891
2019-07-11 11:51:27 +02:00
protonspring 93349d0dbd Use score instead of array to evaluate shelter
This is a non-functional simplification. Instead of an array of values, just use a Score.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 16309 W: 3673 L: 3541 D: 9095
http://tests.stockfishchess.org/tests/view/5d24f3b80ebc5925cf0ceb5b

No functional change
2019-07-11 11:42:08 +02:00
Joost VandeVondele ca51d1ee63 Smoothly change playing strength with skill level. (#2142)
The current skill levels (1-20) allow for adjusting playing strengths, but
do so in big steps (e.g. level 10 vs level 11 is a ~143 Elo jump at STC).
Since the 'Skill Level' input can already be a floating point number, this
patch uses the fractional part of the input to provide the user with
fine control, allowing for varying the playing strength essentially
continuously.

The implementation internally still uses integer skill levels (needed since they pick Depths),
but non-deterministically rounds up or down the used skill level such that the average integer
skill corresponds to the input floating point one. As expected, intermediate
(fractional) skill levels yield intermediate playing strenghts.

Tested at STC, playing level 10 against levels between 10 and 11 for 10000 games

level 10.25 ELO:  24.26 +-6.2
level 10.5  ELO:  67.51 +-6.3
level 10.75 ELO:  98.52 +-6.4
level 11    ELO: 143.65 +-6.7

http://tests.stockfishchess.org/tests/view/5cd9c6b40ebc5925cf056791
http://tests.stockfishchess.org/tests/view/5cd9d22b0ebc5925cf056989
http://tests.stockfishchess.org/tests/view/5cd9cf610ebc5925cf056906
http://tests.stockfishchess.org/tests/view/5cd9d2490ebc5925cf05698e

No functional change.
2019-07-01 14:07:54 +02:00
Joost VandeVondele 217840a6a5 Introduce coordination between searching threads (#2204)
this patch improves threading performance by introducing some coordination between threads.

The observation is that threading is an area where a lot of Elo can potentially be gained:
https://github.com/glinscott/fishtest/wiki/UsefulData#elo-from-threading
At STC, 8 threads gain roughly 320 Elo, vs sequential at the same time,
however, loses 66 Elo against a single thread with 8x more time.
This 66 Elo should be partially recoverable with improved threading.

To improve threading, this patch introduces some LMR at nodes that are already being searched by other threads.
This requires some coordination between threads, avoiding however synchronisation.
To do so, threads leave a trail of breadcrumbs to mark the nodes they are searching.
These breadcrumbs are stored in a small hash table, which is only probed at low plies (currently ply < 8).

A couple of variants of this patch passed both STC and LTC threaded tests.
I picked the simpler, more robust version.
I expect that further tests can find further improvements.

STC (5+0.05 @ 8 threads):
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 26209 W: 5359 L: 5079 D: 15771
http://tests.stockfishchess.org/tests/view/5d0a9b030ebc5925cf0a8e6f

LTC (20+0.2 @ 8 threads):
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 34832 W: 5650 L: 5382 D: 23800
http://tests.stockfishchess.org/tests/view/5d0c67a20ebc5925cf0aafa7

other passed/tested variants:
http://tests.stockfishchess.org/tests/view/5d0a9b030ebc5925cf0a8e6f
http://tests.stockfishchess.org/tests/view/5d0c67ca0ebc5925cf0aafa9
http://tests.stockfishchess.org/tests/view/5d0c67810ebc5925cf0aafa3
http://tests.stockfishchess.org/tests/view/5d0958ca0ebc5925cf0a74c6

For the sequential code there is no change in bench, and an earlier version of this patch passed a non-regression test.
STC (10+0.1 @ 1 thread)
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 10471 W: 2364 L: 2220 D: 5887
http://tests.stockfishchess.org/tests/view/5d087ee20ebc5925cf0a6381

passed the additional non-regression tests at 2 and 4 threads 20+0.2 TC. The code was rebased on master prior to testing.

2 threads:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 218863 W: 40927 L: 41153 D: 136783
http://tests.stockfishchess.org/tests/view/5d18c6c30ebc5925cf0b9566

4threads:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 16839 W: 3017 L: 2889 D: 10933
http://tests.stockfishchess.org/tests/view/5d18c6ea0ebc5925cf0b9568

No functional change.
2019-07-01 14:07:23 +02:00
joergoster a8de07cc26 Improve multiPV mode
Skip all moves during the Non-PV (zero-window) search which will be
searched as PV moves later anyways. We also wake sure the moves will
be reported to the GUI despite they're not being searched — some GUIs
may get confused otherwise, and it would unnecessarily complicate the
code.

Tested with MultiPV=4
STC
http://tests.stockfishchess.org/tests/view/5ce7137c0ebc5925cf070d69
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 8233 W: 3708 L: 3424 D: 1101

LTC
http://tests.stockfishchess.org/tests/view/5ce798d60ebc5925cf071d17
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 7369 W: 3197 L: 2911 D: 1261

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

No functional change. (in single PV mode)
2019-06-27 08:57:59 +02:00
Miguel Lahoz 8bf21a723e Change multi-cut pruning condition
Use comparison of eval with beta to predict potential cutNodes. This
allows multi-cut pruning to also prune possibly mislabeled Pv and NonPv
nodes.

STC:
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 54305 W: 12302 L: 11867 D: 30136
http://tests.stockfishchess.org/tests/view/5d048ba50ebc5925cf0a15e8

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 189512 W: 32620 L: 31904 D: 124988
http://tests.stockfishchess.org/tests/view/5d04bf740ebc5925cf0a17f0

Normally I would think such changes are risky, specially for PvNodes,
but after trying a few other versions, it seems this version is more
sound than I initially thought.

Aside from this, a small funtional change is made to return
singularBeta instead of beta to be more consistent with the fail-soft
logic used in other parts of search.

=============================

How to continue from there ?

We could try to audit other parts of the search where the "cutNode"
variable is used, and try to use dynamic info based on heuristic
eval rather than on this variable, to check if the idea behind this
patch could also be applied successfuly.

Bench: 3503788
2019-06-20 16:39:22 +02:00
Joost VandeVondele 59f1d0c7dd Fix progress issue with shuffling extensions
Fixes issues #2126 and #2189 where no progress in rootDepth is made for particular fens:

8/8/3P3k/8/1p6/8/1P6/1K3n2 b - - 0 1
8/1r1rp1k1/1b1pPp2/2pP1Pp1/1pP3Pp/pP5P/P5K1/8 w - - 79 46

the cause are the shuffle extensions. Upon closer analysis, it appears that in these cases a shuffle extension is made for every node searched, and progess can not be made. This patch implements a fix, namely to limit the number of extensions relative to the number of nodes searched. The ratio employed is 1/4, which fixes the issues seen so far, but it is a heuristic, and I expect that certain positions might require an even smaller fraction.

The patch was tested as a bug fix and passed:

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 56601 W: 12633 L: 12581 D: 31387
http://tests.stockfishchess.org/tests/view/5d02b37a0ebc5925cf09f6da

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 52042 W: 8907 L: 8837 D: 34298
http://tests.stockfishchess.org/tests/view/5d0319420ebc5925cf09fe57

Furthermore, to confirm that the shuffle extension in this form indeed still brings Elo, one more test at VLTC was performed:
VLTC:
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 142022 W: 20963 L: 20435 D: 100624
http://tests.stockfishchess.org/tests/view/5d03630d0ebc5925cf0a011a

Bench: 3961247
2019-06-20 16:15:57 +02:00
syzygy1 466daf6fba Partial revert of "Assorted trivial cleanups 5/2019".
Since root_probe() and root_probe_wdl() do not reset all tbRank values if they fail,
it is necessary to do this in rank_root_move(). This fixes issue #2196.
Alternatively, the loop could be moved into both root_probe() and root_probe_wdl().

No functional change
2019-06-20 16:09:40 +02:00
VoyagerOne 46ce245763 Simplify SEE Pruning (#2191)
Simplify SEE Pruning
Note this should also be a speedup...
If givesCheck is extended we know (except for DC) that it will have a positive SEE. So this new logic will be triggered before doing another expensive SEE function.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 24429 W: 5484 L: 5368 D: 13577
http://tests.stockfishchess.org/tests/view/5cffbccd0ebc5925cf09a154

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 28428 W: 4873 L: 4765 D: 18790
http://tests.stockfishchess.org/tests/view/5d0015f60ebc5925cf09acb1

Bench: 3897263
2019-06-14 19:59:17 +02:00
VoyagerOne a9cca5c953 No DC prune in QS (#2185)
Don't prune discover checks in qSearch

STC:
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 23176 W: 5320 L: 5039 D: 12817
http://tests.stockfishchess.org/tests/view/5cfbc9350ebc5925cf094ab3

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 128428 W: 22222 L: 21679 D: 84527
http://tests.stockfishchess.org/tests/view/5cfbf0b70ebc5925cf094ebc

Bench: 3883245
2019-06-10 00:26:47 +02:00
Marco Costalba d39bc2efa1 Assorted trivial cleanups 5/2019
No functional change.

bench: 4178282
2019-06-09 14:57:08 +02:00
Stefan Geschwentner 2ead74d1e2 Remove depth condition for ttPv (#2166)
Currently PV nodes with a depth <= 4 were ignored for ttPv. Now remove this constraint and use all PV nodes.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 52209 W: 11755 L: 11694 D: 28760
http://tests.stockfishchess.org/tests/view/5cebc2d30ebc5925cf07b93a

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 20874 W: 3689 L: 3568 D: 13617
http://tests.stockfishchess.org/tests/view/5cec01fc0ebc5925cf07c62d
2019-06-09 14:34:51 +02:00
VoyagerOne 6ed81f09ff SEE Pruning Tweak (#2183)
Don't SEE prune any check extensions

STC (yellow):
LLR: -2.96 (-2.94,2.94) [0.50,4.50]
Total: 129934 W: 29390 L: 28905 D: 71639
http://tests.stockfishchess.org/tests/view/5cf6b1a70ebc5925cf08dedb

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 102115 W: 17692 L: 17224 D: 67199
http://tests.stockfishchess.org/tests/view/5cf830710ebc5925cf090331
2019-06-09 14:27:50 +02:00
Michael Chaly 2d06d659c0 Advanced pawn pushes tweak (#2175)
passed STC
http://tests.stockfishchess.org/tests/view/5cf586ee0ebc5925cf08c0ed
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 29496 W: 6718 L: 6406 D: 16372

passed LTC
http://tests.stockfishchess.org/tests/view/5cf59b630ebc5925cf08c343
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 40778 W: 7057 L: 6765 D: 26956

original idea from early 2018 by @jerrydonaldwatson
Code slightly rewritten to be shorter and more logical, no functinal changes 
compared to passed patch.
2019-06-09 14:26:53 +02:00
Joost VandeVondele 190f38a7c2 Remove one division. (#2158)
Can be included in the earlier calculation, with a small rounding difference.

passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17912 W: 4044 L: 3915 D: 9953
http://tests.stockfishchess.org/tests/view/5ce711f90ebc5925cf070d0e

passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 56061 W: 9579 L: 9516 D: 36966
http://tests.stockfishchess.org/tests/view/5ce716820ebc5925cf070e37

Bench: 3817662
2019-05-25 09:43:52 +02:00
protonspring 272936eaba Score and Select Best Thread in same loop (#2125)
This is a non-functional simplification that combines vote counting and thread selecting in the same loop.

It is possible that the best thread would be updated more frequently than master, but I'm not sure it matters here. Perhaps "mostVotes" is a better name than "bestVote?"

STC (stopped early).
LLR: 0.70 (-2.94,2.94) [-3.00,1.00]
Total: 10714 W: 2329 L: 2311 D: 6074
http://tests.stockfishchess.org/tests/view/5ccc71470ebc5925cf03d244

No functional change.
2019-05-16 14:13:16 +02:00
xoto10 3a572ffb48 Update failedHighCnt rule #2063
Treat all threads the same as main thread and increment
failedHighCnt on fail highs. This makes the search try
again at lower depth.

@vondele suggested also changing the reset of failedHighCnt
when there is a fail low. Tests including this passed so the
branch has been updated to include both changes. failedHighCnt
is now handled exactly the same in helper threads and the main
thread. Thanks vondele :-)

STC @ 5+0.05 th 4 :
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 7769 W: 1704 L: 1557 D: 4508
http://tests.stockfishchess.org/tests/view/5c9f19520ebc5925cfffd2a1

LTC @ 20+0.2 th 8 :
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 37888 W: 5983 L: 5889 D: 26016
http://tests.stockfishchess.org/tests/view/5c9f57d10ebc5925cfffd696

Bench 3824325
2019-05-15 11:23:07 +02:00
Marco Costalba 02708a4a11 Revert "Make rootDepth local to search. (#2077)"
This reverts commit 44c320a572.

Fix a compile error.

Bench: 3824325
2019-05-15 10:52:15 +02:00
Joost VandeVondele 44c320a572 Make rootDepth local to search. (#2077)
passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 61869 W: 13668 L: 13626 D: 34575
http://tests.stockfishchess.org/tests/view/5ca660eb0ebc5925cf004f0c

No functional change.
2019-05-15 10:35:58 +02:00
Moez Jellouli 2d9fac1e13 Simplify reduction formula #2122
Simplify reduction formula

No functional change.
2019-05-15 10:26:32 +02:00
protonspring 66820a2668 Simplify Thread Voting Scheme #2129
This is a functional simplification of the math in the voting scheme.

It took a bit longer to pass LTC 8 threads, so perhaps more testing is needed at longer times and/or more threads.

STC 4 threads
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 22315 W: 4852 L: 4732 D: 12731
http://tests.stockfishchess.org/tests/view/5ccc86280ebc5925cf03d439

STC 8 threads
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 42427 W: 8451 L: 8369 D: 25607
http://tests.stockfishchess.org/tests/view/5cccb67c0ebc5925cf03da90

LTC 4 Threads
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 23513 W: 4208 L: 4092 D: 15213
http://tests.stockfishchess.org/tests/view/5ccce94d0ebc5925cf03e1ec

LTC 8 Threads
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 70098 W: 11442 L: 11399 D: 47257
http://tests.stockfishchess.org/tests/view/5ccd22aa0ebc5925cf03e463

No functional change (in single thread)
2019-05-15 10:24:00 +02:00
Michael Chaly 7df832fea6 Decrease reduction in case we had singular extension. #2146
Passed STC http://tests.stockfishchess.org/tests/view/5cda71790ebc5925cf057a84
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 73454 W: 16482 L: 15954 D: 41018

Passed LTC http://tests.stockfishchess.org/tests/view/5cdab17b0ebc5925cf05822f
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 56696 W: 9877 L: 9538 D: 37281

Original idea by @locutus2

bench 3378510
2019-05-15 09:49:29 +02:00
Miguel Lahoz 8a0af1004a Remove PvNode template from reduction
This functional simplification removes the PvNode reduction and adjusts
the ttPv lmr condition accordingly. Their definitions only differ by the
inclusions of ttPv. Aside from this, shallow move pruning definition
will be the only other functional difference, but this does not seem to
matter too much.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 58908 W: 12980 L: 12932 D: 32996
http://tests.stockfishchess.org/tests/view/5cd1aaaa0ebc5925cf046c6a

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 20351 W: 3521 L: 3399 D: 13431
http://tests.stockfishchess.org/tests/view/5cd23fa70ebc5925cf047cd2

Bench: 3687854
2019-05-09 18:00:58 +02:00
Stefan Geschwentner 368f976fb6 Less LMR at root
Do no LMR for the first four moves if at root node.

STC:
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 19686 W: 4524 L: 4261 D: 10901
http://tests.stockfishchess.org/tests/view/5cd3577b0ebc5925cf04a089

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 88335 W: 15193 L: 14766 D: 58376
http://tests.stockfishchess.org/tests/view/5cd35e600ebc5925cf04a1c3

Bench: 3184182
2019-05-09 15:25:39 +02:00
Stefan Geschwentner b6d11028bb LMR for captures not cracking alpha
Enable LMR for a capture/promotion move which does not seem
to have a good chance to fail high according to static eval
and value of captured piece.

STC:
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 40477 W: 9158 L: 8792 D: 22527
http://tests.stockfishchess.org/tests/view/5cceedc60ebc5925cf04174f

LTC:
LLR: 2.94 (-2.94,2.94) [0.00,3.50]
Total: 21926 W: 3873 L: 3634 D: 14419
http://tests.stockfishchess.org/tests/view/5ccf04310ebc5925cf041ab0

Bench: 3644175
2019-05-05 23:18:17 +02:00
VoyagerOne aba906b734 Stat Score reset at rootNode - Bench: 3393330 (#2124)
At rootNode reset great great grandchildren stat score i.e (ss + 4)->statScore = 0

STC: (yellow)
LLR: -2.96 (-2.94,2.94) [0.50,4.50]
Total: 256079 W: 57423 L: 56315 D: 142341
http://tests.stockfishchess.org/tests/view/5ccb0c420ebc5925cf03a6a5

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 61550 W: 10611 L: 10260 D: 40679
http://tests.stockfishchess.org/tests/view/5ccbf9d00ebc5925cf03c487

Bench: 3393330
2019-05-04 13:41:53 +02:00
Marco Costalba 4e72e2a964 Assorted trivial cleanups 4/2019
No functional change.
2019-05-02 19:30:26 +02:00
Joost VandeVondele 5c4002aa82 Simplified shuffle extension version (#2121)
only the extension part of the shuffle patch is sufficient to
pass [0,3.5] bounds at VLTC as shown by two more tests.

http://tests.stockfishchess.org/tests/view/5cc168bc0ebc5925cf02bda8
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 120684 W: 17875 L: 17400 D: 85409

http://tests.stockfishchess.org/tests/view/5cc14d510ebc5925cf02bcb5
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 68415 W: 10250 L: 9905 D: 48260

this patch proposes to simplify back to this basic and easier to
understand version. In case there is a need to run a [-3, 1] VLTC on
this one, it can be done, but it is resource intensive, and not needed
IMO.

Bench: 3388643
2019-05-02 19:22:29 +02:00
MJZ1977 e89bc30fdc Shuffle detection #2108
Bench: 3402947
2019-04-27 11:25:23 +02:00
Joost VandeVondele 6373fd56e9 Remove useless initializations (#2115)
Removes two unneeded inits, they are always set before their use later on.

No functional change.
2019-04-24 19:51:57 +02:00
Joost VandeVondele bdeb01dec0 Remove capping in reduction (#2110)
Saves two std::min.

Bench is unchanged to high depth, but in principle this is a functional change so tested both STC and LTC.

passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 78193 W: 17220 L: 17210 D: 43763
http://tests.stockfishchess.org/tests/view/5cb789540ebc5925cf01b90b

passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 93846 W: 15964 L: 15962 D: 61920
http://tests.stockfishchess.org/tests/view/5cb8066d0ebc5925cf01c72b

Bench: 3402947
2019-04-19 17:33:26 +02:00
Joost VandeVondele 1594d15922 Remove two useless assignments (#2093)
These variables are initialized before their use in the movepicker loop.

passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 138732 W: 30727 L: 30838 D: 77167
http://tests.stockfishchess.org/tests/view/5cb07af40ebc5925cf012c32

No functional change.
2019-04-13 17:17:47 +02:00
Joost VandeVondele 42d271f23c Give penalty for all early quiets of prev. ply
passed STC:
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 32884 W: 7283 L: 7184 D: 18417
http://tests.stockfishchess.org/tests/view/5cacb1b20ebc5925cf00ce97

passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 22869 W: 3920 L: 3803 D: 15146
http://tests.stockfishchess.org/tests/view/5cacbd760ebc5925cf00cfce

Bench: 3723099
2019-04-13 17:15:15 +02:00
Marco Costalba 5928cb2b30 Revert "Shuffle detection #2064"
It causes a serious regression hanging a simple fixed
depth search. Reproducible with:

position fen q1B5/1P1q4/8/8/8/6R1/8/1K1k4 w - - 0 1
go depth 13

The reason is a search tree explosion due to:

if (... && depth < 3 * ONE_PLY)
      extension = ONE_PLY;

This is very dangerous code by itself because triggers **at the leafs**
and in the above position keeps extending endlessly. In normal games
time deadline makes the search to stop sooner or later, but in fixed
seacrch we just hang possibly for a very long time. This is not acceptable
because 'go depth 13' shall not be a surprise for any position.

This patch reverts commit 76f1807baa.
and fixes the issue https://github.com/official-stockfish/Stockfish/issues/2091

Bench: 3243738
2019-04-12 13:48:04 +02:00
miguel-l 5b5687d76e Extend dangerous passed pawn moves (#2089)
Introduce a new search extension when pushing an advanced passed pawn is
also suggested by the first killer move. There have been previous tests
which have similar ideas, mostly about pawn pushes, but it seems to be
overkill to extend too many moves. My idea is to limit the extension to
when a move happens to be noteworthy in some other way as well, such as
in this case, when it is also a killer move.

STC:
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 19027 W: 4326 L: 4067 D: 10634
http://tests.stockfishchess.org/tests/view/5cac2cde0ebc5925cf00c36d

LTC:
LLR: 2.94 (-2.94,2.94) [0.00,3.50]
Total: 93390 W: 15995 L: 15555 D: 61840
http://tests.stockfishchess.org/tests/view/5cac42270ebc5925cf00c4b9

For future tests, it looks like this will interact heavily with passed
pawn evaluation. It may be good to try more variants of some of the more
promising evaluations tests/tweaks.

Bench: 3666092
2019-04-10 19:35:47 +02:00
erbsenzaehler 49a1fdd3fe Make ONE_PLY value independent again
And a Trevis CI test to catch future issues.

No functional change.
2019-04-06 11:15:17 +02:00
Marco Costalba fdd799bc16
Fix a missing assignment in previous commit
While reformatting the patch, I got wrong a statement and converted it badly.
2019-04-06 02:03:15 +02:00
xoto10 1982fe25f8 Use average bestMoveChanges across all threads #2072
The current update only by main thread depends on the luck of
whether main thread sees any/many changes to the best move or not.
It then makes large, lumpy changes to the time to be
used (1x, 2x, 3x, etc) depending on that sample of 1.
Use the average across all threads to get a more reliable
number with a smoother distribution.

STC @ 5+0.05 th 4 :
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 51899 W: 11446 L: 11029 D: 29424
http://tests.stockfishchess.org/tests/view/5ca32ff20ebc5925cf0016fb

STC @ 5+0.05 th 8 :
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 13851 W: 2843 L: 2620 D: 8388
http://tests.stockfishchess.org/tests/view/5ca35ae00ebc5925cf001adb

LTC @ 20+0.2 th 8 :
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 48527 W: 7941 L: 7635 D: 32951
http://tests.stockfishchess.org/tests/view/5ca37cb70ebc5925cf001cec

Further work:
Similar changes might be possible for the fallingEval and timeReduction calculations (and elsewhere?), using either the min, average or max values across all threads.

Bench 3506898
2019-04-05 20:37:16 +02:00
Moez Jellouli 0f63b35120 Remove pureStaticEval #2069
Remove pureStaticEval variable and keep only one
static evaluation (ss->staticEval).

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 64617 W: 14348 L: 14312 D: 35957 Elo -0.24
http://tests.stockfishchess.org/tests/view/5c9e1ad70ebc5925cfffc106

LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 82200 W: 13703 L: 13680 D: 54817 Elo -0.24
http://tests.stockfishchess.org/tests/view/5c9e4efd0ebc5925cfffc68b

Bench : 3506898
2019-04-04 09:40:34 +02:00
Marco Costalba 82ad9ce9cf
Assorted trivial cleanups 3/2019 (#2030)
No functional change.
2019-03-31 11:47:36 +02:00
Moez Jellouli 76f1807baa Shuffle detection #2064
Shuffle detection procedure :

Shuffling positions are detected if

    the last 36 moves are reversible (rule50_count() > 36),
    the position have been already in the TT,
    there is a still a pawn on the board (to avoid special endings like KBN vs K).

The position is then judged as a draw.

An extension is realized if we already made 14 successive reversible moves in PV to accelerate the detection of the eventual draw.

To go further : we can still improve the idea. The length of the tests need a lot of ressources.

    the limit of 36 is logic but must be checked again for special zugzwang positions,
    this limit can be decreased in special positions,
    the limit of 14 moves for extension has not been tuned.

STC
LLR: -2.94 (-2.94,2.94) [0.50,4.50]
Total: 32595 W: 7273 L: 7275 D: 18047 Elo +0.43
http://tests.stockfishchess.org/tests/view/5c90aa330ebc5925cfff1768

LTC
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 51249 W: 8807 L: 8486 D: 33956 Elo +1.85
http://tests.stockfishchess.org/tests/view/5c90b2450ebc5925cfff1800

VLTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 137974 W: 20503 L: 19983 D: 97488 Elo +1.05
http://tests.stockfishchess.org/tests/view/5c9243a90ebc5925cfff2a93

Bench: 3548313
2019-03-31 10:51:08 +02:00
protonspring c858990377 Replace std::mins/max with clamp function (#2062)
Adding a clamp function makes some of these range limitations a bit prettier and removes some #include's.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 28117 W: 6300 L: 6191 D: 15626
http://tests.stockfishchess.org/tests/view/5c9aa1df0ebc5925cfff8fcc

Non functional change.
2019-03-31 10:48:27 +02:00
Joost VandeVondele d1f76ebcd8 Remove duplication. (#2068)
always use the implementation of gives_check in position, no need to
hand-inline part of the implementation in search.

LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 57895 W: 12632 L: 12582 D: 32681
http://tests.stockfishchess.org/tests/view/5c9eaa4b0ebc5925cfffc9e3

No functional change.
2019-03-31 10:44:55 +02:00
xoto10 d320de7619 Remove !extension check #2045
While looking at pruning using see_ge() (which is very valuable)
it became apparent that the !extension test is not adding any
value - simplify it away.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 56843 W: 12621 L: 12569 D: 31653
http://tests.stockfishchess.org/tests/view/5c8588cb0ebc5925cffe77f4

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 78622 W: 13223 L: 13195 D: 52204
http://tests.stockfishchess.org/tests/view/5c8611cc0ebc5925cffe7f86

Further work could be to optimize the remaining see_ge() test. The idea of less pruning at higher depths is valuable, but perhaps the test (-PawnValueEg * depth) can be improved.

Bench: 3188688
2019-03-20 14:57:34 +01:00
CoffeeOne 66818f2e85 Skip skipping thread scheme (#1972)
Several simplification tests (all with the bounds [-3,1]) were run:
5+0.05 8 threads, failed very quickly:
http://tests.stockfishchess.org/tests/view/5c439a020ebc5902bb5d3970

20+0.2 8 threads, also failed, but needed a lot more games:
http://tests.stockfishchess.org/tests/view/5c44b1b70ebc5902bb5d4e34

60+0.6 8 threads passed:
http://tests.stockfishchess.org/tests/view/5c48bfe40ebc5902bca15325

60+0.6 4 threads passed:
http://tests.stockfishchess.org/tests/view/5c4b71a00ebc593af5d49904

No functional change.
2019-03-20 14:50:41 +01:00
xoto10 acc47e8b79 Simplify failedLow away #1986
FailedLow doesn't seem to add any value so remove it.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 43915 W: 9682 L: 9604 D: 24629
http://tests.stockfishchess.org/tests/view/5c5339770ebc592fc7baef74

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 58515 W: 9670 L: 9609 D: 39236
http://tests.stockfishchess.org/tests/view/5c53cc840ebc592fc7baf6c1

Ideas for further work:

    Tune the values in the revised fallingEval calculation
    Consider adding a term using delta, e.g. c * (delta - 20) as an indicator of eval instability

Bench: 3318033
2019-03-10 10:47:42 +01:00
Marco Costalba 4d0981fef3 Revert "Allowing singular extension in mate positions"
It was causing an assert: value > -VALUE_INFINITE
under some conditions.

See https://github.com/official-stockfish/Stockfish/issues/2036

Bench: 3318033
2019-03-09 13:28:11 +01:00
protonspring 1aab5b4b05 Remove FutilityMoveCounts array. (#2024)
This is a functional simplification that removes the FutilityMoveCounts array with a simple equation using only ints.

LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 14175 W: 3123 L: 2987 D: 8065

LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 9900 W: 1735 L: 1597 D: 6568

Bench: 3380343
2019-03-05 20:48:29 +01:00
protonspring 714e857c24 Shrink Reductions[] array to one dimension
This is a non-functional patch which shrinks the reductions array.
This saves about 8Kb of memory.

The only slow part of master's reductions array is the calculation
of the log values, so using a separate array for those values and
calculating the rest real-time appears to be just as fast as master.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 63245 W: 13906 L: 13866 D: 35473
http://tests.stockfishchess.org/tests/view/5c7b571f0ebc5925cffdc104

No funcional change.
2019-03-05 19:02:04 +01:00
Marco Costalba 2bceba7f51 Assorted trivial cleanups 2/2019
No functional change.
2019-03-05 11:13:02 +01:00