1
0
Fork 0
Commit Graph

338 Commits (riscv64-cartesi)

Author SHA1 Message Date
pb00067 760b7462bc Simplify lowply-history scoring logic
STC:
https://tests.stockfishchess.org/tests/view/60eee559d1189bed71812b16
LLR: 2.97 (-2.94,2.94) <-2.50,0.50>
Total: 33976 W: 2523 L: 2431 D: 29022
Ptnml(0-2): 66, 2030, 12730, 2070, 92

LTC:
https://tests.stockfishchess.org/tests/view/60eefa12d1189bed71812b24
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 107240 W: 3053 L: 3046 D: 101141
Ptnml(0-2): 56, 2668, 48154, 2697, 45

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

bench: 5199177
2021-07-23 18:53:03 +02:00
Dieter Dobbelaere 7ffae17f85 Add Stockfish namespace.
fixes #3350 and is a small cleanup that might make it easier to use SF
in separate projects, like a NNUE trainer or similar.

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

No functional change.
2021-03-07 14:26:54 +01:00
Lolligerhans 40cb0f076a Small trivial clean-ups, February 2021
Closes https://github.com/official-stockfish/Stockfish/pull/3329

No functional change
2021-02-16 01:31:42 +01:00
bmc4 6617ad6e03 Tune ordering of moves at internal nodes
We change the relative weights of the function used to order
quiet moves in our MovePicker class.

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32184 W: 2936 L: 2773 D: 26475
Ptnml(0-2): 115, 2196, 11328, 2317, 136
https://tests.stockfishchess.org/tests/view/60161ee1735dd7f0f03530f8

Passed LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 33088 W: 1292 L: 1149 D: 30647
Ptnml(0-2): 14, 1030, 14318, 1163, 19
https://tests.stockfishchess.org/tests/view/60163146735dd7f0f03530ff

The new weight were chosen after the following SPSA session:
https://tests.stockfishchess.org/tests/view/60136857735dd7f0f0352f6c

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

Bench: 4398803
2021-01-31 16:00:06 +01:00
Dieter Dobbelaere 87586b3d0c Use correct chess terms + fix spelling.
- "discovered check" (instead of "discovery check")
  - "en passant" (instead of "en-passant")
  - "pseudo-legal" before a noun (instead of "pseudo legal")
  - "3-fold" (instead of "3fold")

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

No functional change.
2021-01-11 19:19:39 +01:00
Joost VandeVondele c4d67d77c9 Update copyright years
No functional change
2021-01-08 17:04:23 +01:00
pb00067 16adcb5374 Merge static history into main history,
thus simplifying and reducing the memory footprint.
I believe using static diff for better move ordering is more suited for
low depths, so restrict writing to low depths.

Todo: probably the condition for writing can be simplified

LTC:
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 18752 W: 768 L: 705 D: 17279
Ptnml(0-2): 7, 635, 8034, 688, 12
https://tests.stockfishchess.org/tests/view/5fd631791ac169120188859e

STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 36504 W: 3380 L: 3313 D: 29811
Ptnml(0-2): 116, 2667, 12645, 2682, 142
https://tests.stockfishchess.org/tests/view/5fd5ed861ac1691201888569

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

bench: 4018036
2020-12-14 07:48:48 +01:00
Vizvezdenec be7a03a957 Introduce static history
The idea of this patch can be described as following: we update static
history stats based on comparison of the static evaluations of the
position before and after the move. If the move increases static evaluation
it's assigned positive bonus, if it decreases static evaluation
it's assigned negative bonus. These stats are used in movepicker
to sort quiet moves.

passed STC
https://tests.stockfishchess.org/tests/view/5fca4c0842a050a89f02cd66
LLR: 3.00 (-2.94,2.94) {-0.25,1.25}
Total: 78152 W: 7409 L: 7171 D: 63572
Ptnml(0-2): 303, 5695, 26873, 5871, 334

passed LTC
https://tests.stockfishchess.org/tests/view/5fca6be442a050a89f02cd75
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 40240 W: 1602 L: 1441 D: 37197
Ptnml(0-2): 19, 1306, 17305, 1475, 15

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

bench 3845156
2020-12-05 16:48:33 +01:00
syzygy1 0f6c08c73f Do not skip non-recapture ttMove when in check
The qsearch() MovePicker incorrectly skips a non-recapture ttMove
when in check (if depth <= DEPTH_QS_RECAPTURES). This is clearly not
intended and can cause qsearch() to return a mate score when there
is no mate. Introduced in cad300c and 6596f0e, as observed by
joergoster in #3171 and #3198.

This PR fixes the bug by not skipping the non-recapture ttMove when in check.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/5f9867ea6a2c112b60691b10
LLR: 2.98 (-2.94,2.94) {-1.25,0.25}
Total: 27112 W: 2943 L: 2842 D: 21327
Ptnml(0-2): 127, 2170, 8878, 2237, 144

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/5f9967326a2c112b60691bb0
LLR: 2.99 (-2.94,2.94) {-0.75,0.25}
Total: 18392 W: 807 L: 738 D: 16847
Ptnml(0-2): 9, 655, 7802, 718, 12

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

Bench: 3870606
2020-10-28 23:40:37 +01:00
Joost VandeVondele 5f1843c9cb Small trivial cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2801

No functional change
2020-08-23 01:53:41 +02:00
nodchip 84f3e86790 Add NNUE evaluation
This patch ports the efficiently updatable neural network (NNUE) evaluation to Stockfish.

Both the NNUE and the classical evaluations are available, and can be used to
assign a value to a position that is later used in alpha-beta (PVS) search to find the
best move. The classical evaluation computes this value as a function of various chess
concepts, handcrafted by experts, tested and tuned using fishtest. The NNUE evaluation
computes this value with a neural network based on basic inputs. The network is optimized
and trained on the evalutions of millions of positions at moderate search depth.

The NNUE evaluation was first introduced in shogi, and ported to Stockfish afterward.
It can be evaluated efficiently on CPUs, and exploits the fact that only parts
of the neural network need to be updated after a typical chess move.
[The nodchip repository](https://github.com/nodchip/Stockfish) provides additional
tools to train and develop the NNUE networks.

This patch is the result of contributions of various authors, from various communities,
including: nodchip, ynasu87, yaneurao (initial port and NNUE authors), domschl, FireFather,
rqs, xXH4CKST3RXx, tttak, zz4032, joergoster, mstembera, nguyenpham, erbsenzaehler,
dorzechowski, and vondele.

This new evaluation needed various changes to fishtest and the corresponding infrastructure,
for which tomtor, ppigazzini, noobpwnftw, daylen, and vondele are gratefully acknowledged.

The first networks have been provided by gekkehenker and sergiovieri, with the latter
net (nn-97f742aaefcd.nnue) being the current default.

The evaluation function can be selected at run time with the `Use NNUE` (true/false) UCI option,
provided the `EvalFile` option points the the network file (depending on the GUI, with full path).

The performance of the NNUE evaluation relative to the classical evaluation depends somewhat on
the hardware, and is expected to improve quickly, but is currently on > 80 Elo on fishtest:

60000 @ 10+0.1 th 1
https://tests.stockfishchess.org/tests/view/5f28fe6ea5abc164f05e4c4c
ELO: 92.77 +-2.1 (95%) LOS: 100.0%
Total: 60000 W: 24193 L: 8543 D: 27264
Ptnml(0-2): 609, 3850, 9708, 10948, 4885

40000 @ 20+0.2 th 8
https://tests.stockfishchess.org/tests/view/5f290229a5abc164f05e4c58
ELO: 89.47 +-2.0 (95%) LOS: 100.0%
Total: 40000 W: 12756 L: 2677 D: 24567
Ptnml(0-2): 74, 1583, 8550, 7776, 2017

At the same time, the impact on the classical evaluation remains minimal, causing no significant
regression:

sprt @ 10+0.1 th 1
https://tests.stockfishchess.org/tests/view/5f2906a2a5abc164f05e4c5b
LLR: 2.94 (-2.94,2.94) {-6.00,-4.00}
Total: 34936 W: 6502 L: 6825 D: 21609
Ptnml(0-2): 571, 4082, 8434, 3861, 520

sprt @ 60+0.6 th 1
https://tests.stockfishchess.org/tests/view/5f2906cfa5abc164f05e4c5d
LLR: 2.93 (-2.94,2.94) {-6.00,-4.00}
Total: 10088 W: 1232 L: 1265 D: 7591
Ptnml(0-2): 49, 914, 3170, 843, 68

The needed networks can be found at https://tests.stockfishchess.org/nns
It is recommended to use the default one as indicated by the `EvalFile` UCI option.

Guidelines for testing new nets can be found at
https://github.com/glinscott/fishtest/wiki/Creating-my-first-test#nnue-net-tests

Integration has been discussed in various issues:
https://github.com/official-stockfish/Stockfish/issues/2823
https://github.com/official-stockfish/Stockfish/issues/2728

The integration branch will be closed after the merge:
https://github.com/official-stockfish/Stockfish/pull/2825
https://github.com/official-stockfish/Stockfish/tree/nnue-player-wip

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

This will be an exciting time for computer chess, looking forward to seeing the evolution of
this approach.

Bench: 4746616
2020-08-06 16:37:45 +02:00
Joost VandeVondele 6f15e7fab2 small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2695

No functional change
2020-06-21 15:22:20 +02:00
pb00067 15e190e942 Use lowply-history also on low depths
STC:
https://tests.stockfishchess.org/tests/view/5ed75078f29b40b0fc95a8b9
LLR: 2.93 (-2.94,2.94) {-0.50,1.50}
Total: 73928 W: 14301 L: 14005 D: 45622
Ptnml(0-2): 1243, 8572, 17096, 8752, 1301

LTC:
https://tests.stockfishchess.org/tests/view/5ed895e0f29b40b0fc95a976
LLR: 2.93 (-2.94,2.94) {0.25,1.75}
Total: 154848 W: 19684 L: 19074 D: 116090
Ptnml(0-2): 1048, 14108, 46627, 14468, 1173

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

bench: 4582693
2020-06-06 16:18:42 +02:00
Stéphane Nicolet 6c1af710d1 A combo of parameters tweaks
This patch is a combinaison of two recent parameters tweaks which had
failed narrowly (yellow) at long time control:

• improvement in move ordering during search by softening the distinction
  between bad captures and good captures during move generation, leading
  to improved awareness of Stockfish of potential piece sacrifices (idea
  by Rahul Dsilva)
• increase in the weight of pawns in the "initiative" part of the evaluation
  function. With this change Stockfish should have more incentive to exchange
  pawns when losing, and to keep pawns when winning.

STC:
LLR: 2.93 (-2.94,2.94) {-0.50,1.50}
Total: 10704 W: 2178 L: 1974 D: 6552
Ptnml(0-2): 168, 1185, 2464, 1345, 190
https://tests.stockfishchess.org/tests/view/5ec5553b377121ac09e1023d

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.75}
Total: 60592 W: 7835 L: 7494 D: 45263
Ptnml(0-2): 430, 5514, 18086, 5817, 449
https://tests.stockfishchess.org/tests/view/5ec55ca2377121ac09e10249

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

Bench: 4519117
2020-05-21 14:05:07 +02:00
protonspring 6596f0eac0 Always remember the ttMove
In master, if the received ttMove meets the prescribed conditions in the various MovePicker constructors, it is returned as the first move, otherwise we set it to MOVE_NONE. If set to MOVE_NONE, we no longer track what the ttMove was, and it will might be returned later in a list of generated moves. This may be a waste. With this patch, if the ttMove fails to meet the prescribed conditions, we simply skip the TT stages, but still store the move and make sure it's never returned.

STC
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 66424 W: 12903 L: 12806 D: 40715
Ptnml(0-2): 1195, 7730, 15230, 7897, 1160

LTC
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 45682 W: 5989 L: 5926 D: 33767
Ptnml(0-2): 329, 4361, 13443, 4334, 374

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

Bench 4928928
2020-04-12 20:34:50 +02:00
Joost VandeVondele 209e94203f Small cleanups
https://github.com/official-stockfish/Stockfish/pull/2584

No functional change.
2020-03-30 22:46:07 +02:00
Günther Demetz b8c00efa27 Improve move order near the root
Current move histories are known to work well near the leaves, whilst at
higher depths they aren't very helpful. To address this problem this
patch introduces a table dedicated for what's happening at plies 0-3.
It's structured like mainHistory with ply index instead of color.
It get cleared with each new search and is filled during iterative
deepening at higher depths when recording successful quiet moves near
the root or traversing nodes which were in the principal variation
(ttPv).

Medium TC (20+0.2):
https://tests.stockfishchess.org/tests/view/5e4d358790a0a02810d096dc
LLR: 2.94 (-2.94,2.94) {-0.50,1.50}
Total: 100910 W: 16682 L: 16376 D: 67852
Ptnml(0-2): 1177, 10983, 25883, 11181, 1231

LTC:
https://tests.stockfishchess.org/tests/view/5e4e2cb790a0a02810d09714
LLR: 2.95 (-2.94,2.94) {0.25,1.75}
Total: 80444 W: 10495 L: 10095 D: 59854
Ptnml(0-2): 551, 7479, 23803, 7797, 592

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

Bench: 4705960
2020-02-22 21:32:32 +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
VoyagerOne 2e96c513ad Introduce separate counter-move tables for captures
Enhance counter-move history table by adding a capture/no-capture dimension,
depending wether the previous move was a quiet move or a capture. This doubles
the size of the table but provides more accurate move ordering.

STC:
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 79702 W: 17720 L: 17164 D: 44818
http://tests.stockfishchess.org/tests/view/5d97945e0ebc590c21aa724b

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 29147 W: 4907 L: 4651 D: 19589
http://tests.stockfishchess.org/tests/view/5d97ccb90ebc590c21aa7bc0

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

Bench: 4131643
2019-10-06 02:04:19 +02:00
Brian Sheppard ca7d4e9ac7 Eliminate ONE_PLY
Simplification that eliminates ONE_PLY, based on a suggestion in the forum that
support for fractional plies has never been used, and @mcostalba's openness to
the idea of eliminating it. We lose a little bit of type safety by making Depth
an integer, but in return we simplify the code in search.cpp quite significantly.

No functional change

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

The argument favoring eliminating ONE_PLY:

* The term “ONE_PLY” comes up in a lot of forum posts (474 to date)
https://groups.google.com/forum/?fromgroups=#!searchin/fishcooking/ONE_PLY%7Csort:relevance

* There is occasionally a commit that breaks invariance of the code
with respect to ONE_PLY
https://groups.google.com/forum/?fromgroups=#!searchin/fishcooking/ONE_PLY%7Csort:date/fishcooking/ZIPdYj6k0fk/KdNGcPWeBgAJ

* To prevent such commits, there is a Travis CI hack that doubles ONE_PLY
and rechecks bench

* Sustaining ONE_PLY has, alas, not resulted in any improvements to the
  engine, despite many individuals testing many experiments over 5 years.

The strongest argument in favor of preserving ONE_PLY comes from @locutus:
“If we use par example ONE_PLY=256 the parameter space is increases by the
factor 256. So it seems very unlikely that the optimal setting is in the
subspace of ONE_PLY=1.”

There is a strong theoretical impediment to fractional depth systems: the
transposition table uses depth to determine when a stored result is good
enough to supply an answer for a current search. If you have fractional
depths, then different pathways to the position can be at fractionally
different depths.

In the end, there are three separate times when a proposal to remove ONE_PLY
was defeated by the suggestion to “give it a few more months.” So… it seems
like time to remove this distraction from the community.

See the pull request here:
https://github.com/official-stockfish/Stockfish/pull/2289
2019-10-06 00:57:00 +02:00
VoyagerOne c83cbe42f3 Tweak capture scoring formula
STC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 20556 W: 4685 L: 4438 D: 11433
http://tests.stockfishchess.org/tests/view/5d25d26e0ebc5925cf0d0b4a

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 14856 W: 2649 L: 2446 D: 9761
http://tests.stockfishchess.org/tests/view/5d25d8b20ebc5925cf0d0c6d

bench: 3206912
2019-07-11 11:59:36 +02:00
protonspring d889bb4718 Bonus for double attacks on unsupported pawns
This is a functional change that rewards double attacks on an unsupported pawns.

STC (non-functional difference)
LLR: 2.96 (-2.94,2.94) [0.50,4.50]
Total: 83276 W: 18981 L: 18398 D: 45897
http://tests.stockfishchess.org/tests/view/5d0970500ebc5925cf0a77d4

LTC (incomplete looping version)
LLR: 0.50 (-2.94,2.94) [0.00,3.50]
Total: 82999 W: 14244 L: 13978 D: 54777
http://tests.stockfishchess.org/tests/view/5d0a8d480ebc5925cf0a8d58

LTC (completed non-looping version).
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 223381 W: 38323 L: 37512 D: 147546
http://tests.stockfishchess.org/tests/view/5d0e80510ebc5925cf0ad320

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

Bench 3633546

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

Comments by Alain SAVARD:

interesting result ! I would have expected that search would resolve such positions
correctly on the very next move. This is not a very common pattern, and when it happens,
it will quickly disappear. So I'm quite surprised that it passed LTC.
I would be even more surprised if this would resist a simplification.

Anyway, let's try to imagine a few cases.

a) If you have White d5 f5 against Black e6, and White to move
last move by Black was probably a capture on e6 and White is about to recapture on e6

b) If you have White d5 f5 against e6, and Black to move
last move by White was possibly a capture on d5 or f5
or the pawn on e6 was pinned or could not move for some reason.
and white wants to blast open the position and just pushed d4-d5 or f4-f5

Some possible follow-ups
a) Motif is so rare that the popcount() can be safely replaced with a bool()
But this would not pass a SPRT[0,4],
So try a simplification with bool() and also without the & ~theirAttacks

b) If it works, we probably can simply have this in the loop
if (lever) score += S(0, 20);

c) remove all this and tweak something in search for pawn captures (priority, SEE, extension,..)
2019-06-27 09:46:36 +02:00
VoyagerOne 297c40291a QuietPick Speed-up
Non-functional speedup: no need to generate, score, or sort quiet moves
if SkipQuiet is true. Thanks to @mstembera for his suggestion.

STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 27910 W: 6406 L: 6129 D: 15375
http://tests.stockfishchess.org/tests/view/5d07e0920ebc5925cf0a58a8

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

No functional change
2019-06-20 16:22:45 +02:00
protonspring c4fc00ec49 Remove Movepick::move (#2085)
The "move" class variable is Movepick is removed (removes some abstraction) which saves a few assignment operations, and the effects of "filter" is limited to the current move (movePtr). The resulting code is a bit more verbose, but it is also more clear what is going on. This version is NOT tested, but is substantially similar to:

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 29191 W: 6474 L: 6367 D: 16350
http://tests.stockfishchess.org/tests/view/5ca7aab50ebc5925cf006e50

This is a non-functional simplification.
2019-04-17 21:13:39 +02:00
Vizvezdenec c2fb0ff720 Add continuation history 5
Original patch passed STC:
http://tests.stockfishchess.org/tests/view/5c7439ff0ebc5925cffd3e64
LLR: 2.95 (-2.94,2.94) [0.50,4.50]
Total: 26348 W: 5926 L: 5632 D: 14790

and LTC:
http://tests.stockfishchess.org/tests/view/5c745a8b0ebc5925cffd41a8
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 198411 W: 33238 L: 32510 D: 132663

But had undefined behavior.
After fixing (thx to @vondele )

passed LTC:
http://tests.stockfishchess.org/tests/view/5c763c7c0ebc5925cffd5de2
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 112253 W: 18711 L: 18225 D: 75317

bench 3049229
2019-03-05 11:10:10 +01:00
Marco Costalba 05f7d59a9a Assorted trivial cleanups 1/2019
To address #1862

No functional change.
2019-02-08 10:20:43 +01:00
protonspring 7accf07c0b Remove "Any" predicate filter (#1914)
This custom predicate filter creates an unnecessary abstraction layer, but doesn't make the code any more readable. The code is clear enough without it.

No functional change.
2019-01-01 13:36:56 +01:00
Stéphane Nicolet 5c2fbcd09b Revert "pseudo_legal() and MOVE_NONE"
This reverts commit 33d9548218 ,
which crashed in DEBUG mode because of the following assert in position.h

````
Assertion failed: (is_ok(m)), function capture, file ./position.h, line 369.
````

No functional change
2018-12-06 15:04:04 +01:00
protonspring 33d9548218 pseudo_legal() and MOVE_NONE
MOVE_NONE is represented as SQ_A1 to SQ_A1 which is never pseudo_legal.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 38807 W: 8363 L: 8275 D: 22169
http://tests.stockfishchess.org/tests/view/5c05f11d0ebc5902bcee4c86

No functional change
2018-12-06 14:02:29 +01:00
Stéphane Nicolet cf5d683408 Stockfish 10-beta
Preparation commit for the upcoming Stockfish 10 version, giving a chance to catch last minute feature bugs and evaluation regression during the one-week code freeze period. Also changing the copyright dates to include 2019.

No functional change
2018-11-19 11:18:21 +01:00
Stéphane Nicolet 881cab2525 Double weight of capture history
We double in this patch the weight of the capture history table in the
local scoring of captures for move ordering.

The capture history table is indexed by the triplet (capturing piece,
capture square, captured piece) and gets information like "it seems to
have been historically good in that part of the search tree to capture
a pawn with a rook on g3, even if it seems to lose material", and affect
the normaly pure « Most Valuable Victim » ordering of captures.

Finished yellow at STC after 228842 games (posting a +1.36 Elo gain):
LLR: -2.95 (-2.94,2.94) [0.00,4.00]
Total: 228842 W: 50894 L: 50152 D: 127796
http://tests.stockfishchess.org/tests/view/5b714bb00ebc5902bdba332d

Passed LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 43251 W: 7425 L: 7131 D: 28695
http://tests.stockfishchess.org/tests/view/5b71c7d40ebc5902bdba3e51

Thanks to user Vizvezdenec for running the LTC test.

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

Bench: 4272361
2018-08-14 10:12:31 +02:00
Stefan Geschwentner 12e79be910 Better check evasion move sorting
Use in addition the counter move history table for sorting quiet
check evasion moves in main and quiecence search. Also rename
"contHistory" to "continuationHistory" while there.

STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 73284 W: 16433 L: 15938 D: 40913
http://tests.stockfishchess.org/tests/view/5b4f526e0ebc5902bdb7a401

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 12135 W: 2171 L: 1997 D: 7967
http://tests.stockfishchess.org/tests/view/5b4fc0ef0ebc5902bdb7ae0e

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

Bench 4817583
2018-07-19 18:27:20 +02:00
Joost VandeVondele a64d524d02 Remove template W param
Different W template parameters for the different statEntries are
not needed, simplify by consistently using 32.

Passed STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21683 W: 4545 L: 4424 D: 12714
http://tests.stockfishchess.org/tests/view/5ad797550ebc595700526e59

Passed LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 110391 W: 16551 L: 16562 D: 77278
http://tests.stockfishchess.org/tests/view/5ad7a88f0ebc595700526e61

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

Bench: 5120532
2018-04-23 08:46:32 +02:00
Marco Costalba 280022baf7 Fix indentation in movepicker.cpp
Fix indentation in movepicker.cpp and evaluate.cpp. Also move
the PickType enum out of global space.

No functional change
2018-03-27 16:45:12 +02:00
Joost VandeVondele d40e7ee209 Join refutation stages in the movepicker
Unifies a bit further the three refuation stages in the MovePicker
class. Also treat the skipping of TT move now always via select_move(),
as discussed in pull request #1454.

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 16608 W: 3461 L: 3331 D: 9816
http://tests.stockfishchess.org/tests/view/5ab0aaf00ebc59029fb6f6c3

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

No functional change.
2018-03-21 01:48:47 +01:00
Joost VandeVondele bd59560480 Join common code in the stages of next_move()
Rewrite the MovePicker class using lambda expressions for move filtering.
Includes code style changes by @mcostalba.

Verified for speed, passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 43191 W: 9391 L: 9312 D: 24488
http://tests.stockfishchess.org/tests/view/5a99b9df0ebc590297cc8f04

This rewrite of MovePicker.cpp seems to trigger less random crashes on Ryzen
machines than the version in previous master (reported by Bojun Guo).

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

No functional change.
2018-03-19 00:59:30 +01:00
protonspring 6e9337b107 MovePicker: combine countermove with killers.
Handle the countermove in the same way we use stages to progress
through the killer moves, using a common array called "refutations".
Removes some lines of code and simplifies a bit the jump table.

STC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 71707 W: 14622 L: 14595 D: 42490
http://tests.stockfishchess.org/tests/view/5aa003cf0ebc590297cb6276

LTC: LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 22320 W: 3470 L: 3352 D: 15498
http://tests.stockfishchess.org/tests/view/5aa051020ebc590297cb62ba

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

No functional change.
2018-03-12 02:49:14 +01:00
Joost VandeVondele cad300cfab No extra stage for QS recaptures.
remove the QRECAPTURES and QSEARCH_RECAPTURES stages as they can be
incoorporated in QCAPTURES stage with a simple condition on depth.

passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 214964 W: 46188 L: 46443 D: 122333
http://tests.stockfishchess.org/tests/view/5a98544b0ebc590297cc8e35

passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 14552 W: 2404 L: 2274 D: 9874
http://tests.stockfishchess.org/tests/view/5a9947b20ebc590297cc8e93

Bench: 6361582
2018-03-03 12:41:35 +01:00
Marco Costalba f35e52f030 Merge Stats tables
Use a recursive std::array with variadic template
parameters to get rid of the last redundacy.

The first template T parameter is the base type of
the array, the W parameter is the weight applied to
the bonuses when we update values with the << operator,
the D parameter limits the range of updates (range is
[-W * D, W * D]), and the last parameters (Size and
Sizes) encode the dimensions of the array.

This allows greater flexibility because we can now tweak
the range [-W * D, W * D] for each table.

Patch removes more lines than what adds and streamlines
the Stats soup in movepick.h

Closes PR#1422 and PR#1421

No functional change.
2018-03-03 11:35:33 +01:00
Joost VandeVondele ebb3e7df65 Combine killer moves
Move the first killer move out of the capture stage, combining treatment
of first and second killer move.

passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 55777 W: 12367 L: 12313 D: 31097
http://tests.stockfishchess.org/tests/view/5a88617e0ebc590297cc8351

Similar to an earlier proposition of Günther Demetz, see pull request #1075.
I think it is more robust and readable than master, why hand-unroll the loop
over the killer array, and duplicate code ?

This version includes review comments from Marco Costalba.

Bench: 5227124
2018-02-25 23:11:56 +01:00
Joost VandeVondele 8dd6875240 Join all capture init stages in MovePicker
Passed STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 16789 W: 3685 L: 3554 D: 9550
http://tests.stockfishchess.org/tests/view/5a91a8bb0ebc590297cc875b

Passed LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21293 W: 3527 L: 3407 D: 14359
http://tests.stockfishchess.org/tests/view/5a920a730ebc590297cc87ba

No functional change
2018-02-25 12:49:51 +01:00
protonspring 69067e1988 Obey skipQuiets strictly in MovePicker
The current logic in master is to continue return quiet moves if their
history score is above 0. It appears as though this check can be
removed, which is also more logically consistent with the “skipQuiets”
semantics used in search.cpp.

This patch may open new opportunitiesto get Elo by changing or
tuning the definition of 'moveCountPruning' in line 830 of search.cpp,
because obeying skipQuiets without checking the history scores makes
the search more sensitive to 'moveCountPruning'.

STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 34780 W: 7680 L: 7584 D: 19516
http://tests.stockfishchess.org/tests/view/5a79f8d80ebc5902971a99db

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 38757 W: 6732 L: 6641 D: 25384
http://tests.stockfishchess.org/tests/view/5a7afebe0ebc5902971a9a46

Bench 4954595
2018-02-08 10:46:27 +01:00
protonspring 414a3e6ee3 Don’t score and sort all captures in RECAPTURES stage.
For these recaptures, we’re are only considering those captures
    that recapture the recapture square (small portion of all the
    captures). Therefore, scoring all of the captures and pick_besting
    out of the whole group is not necessary.

    STC
    LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
    Total: 85583 W: 18978 L: 18983 D: 47622
    http://tests.stockfishchess.org/tests/view/5a717faa0ebc590f2c86e9a7

    LTC
    LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
    Total: 20231 W: 3533 L: 3411 D: 13287
    http://tests.stockfishchess.org/tests/view/5a73ad330ebc5902971a96ba

    Bench: 5023593
2018-02-05 17:27:59 +01:00
protonspring d93baae220 Simplify qsearch stages in MovePicker
The difference between QCAPTURES_1 and QCAPTURES_2 quiescence search stages
boils down to a simple check of depth. The way it's being done now is
unnecessarily complex.

This patch is simpler, clearer, and easier to understand.

Passed SPRT[-3..1] test at STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 99755 W: 22158 L: 22192 D: 55405
http://tests.stockfishchess.org/tests/view/5a71f41c0ebc590f2c86e9cb

No functional change.
2018-02-04 14:57:57 +01:00
Joost VandeVondele 9afa1d7330 New Year 2018
Adjust copyright headers.

No functional change.
2018-01-01 13:18:10 +01:00
Stefan Geschwentner d64ffd9621 Simplify good/bad capture detection. bench 5336313 2017-11-18 16:27:44 +01:00
Stefano Cardanobile c769d4df84 Fix comments. Bench: 5109559. 2017-11-18 14:08:06 +01:00
Günther Demetz 652199d840 Handle BxN trade as good capture when history score is good
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 19374 W: 3499 L: 3294 D: 12581
http://tests.stockfishchess.org/tests/view/59fc23f50ebc590ccbb8a0bf

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 91030 W: 11680 L: 11274 D: 68076
http://tests.stockfishchess.org/tests/view/59fc43ad0ebc590ccbb8a0d0

Bench: 5482249
2017-11-05 22:05:51 +01:00
Stefan Geschwentner 4bc11984fc Introduce capture history table for capture move sorting
Introduce capture move history table indexed by moved piece,
target square and captured piece type for sorting capture moves.

STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 11374 W: 2096 L: 1924 D: 7354
http://tests.stockfishchess.org/tests/view/59fac8dc0ebc590ccbb89fc5

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 24791 W: 3196 L: 3001 D: 18594
http://tests.stockfishchess.org/tests/view/59fae4d20ebc590ccbb89fd9

Bench: 5536775
2017-11-03 13:57:18 +01:00
Stéphane Nicolet 002bf4d8db Avoid constructing an empty tuple in qsearch
Avoid constructing, passing as a parameter and binding a useless empty tuple of pointers in the qsearch move picker constructor.

Also reformat the scoring function in movepicker.cpp and do some cleaning in evaluate.cpp while there.

No functional change.
2017-08-22 10:16:19 +02:00