Commit Graph

5618 Commits

Author SHA1 Message Date
Tomasz Sobczyk
89294e2e4f Add transform command. Add transform nudged_static subcommand. 2020-11-27 09:16:22 +09:00
nodchip
c12848d5ac Merge pull request #249 from noobpwnftw/merge
Merge
2020-11-23 19:55:23 +09:00
Tomasz Sobczyk
45e3335ee8 Add missing docs. 2020-11-23 19:22:11 +09:00
Tomasz Sobczyk
9030020a85 Add smart_fen_skipping option to learn. 2020-11-23 19:22:11 +09:00
noobpwnftw
f978e1bef0 Merge branch 'master' into merge 2020-11-23 13:07:31 +08:00
Tomasz Sobczyk
ee13cfce67 Fix result assigned for a psvector when the positions are not continuous. 2020-11-23 08:32:08 +09:00
Tomasz Sobczyk
3cee6881ee Move the terminal position check to after qsearch, otherwise qsearch may end up in a terminal position. 2020-11-23 08:29:38 +09:00
noobpwnftw
c29554a120 Merge remote-tracking branch 'remotes/official/master' into master
Bench: 3597730
2020-11-23 04:27:12 +08:00
Tomasz Sobczyk
d43cd104b6 Fix uninitialized variable when searching from a terminal position. 2020-11-22 07:45:39 +09:00
JWmer
38d19eca14 Update instrumented.sh 2020-11-22 07:45:39 +09:00
JWmer
3975fc9c0d Update half_relative_ka.cpp 2020-11-22 07:45:39 +09:00
JWmer
b0429237a8 Update half_ka.cpp 2020-11-22 07:45:39 +09:00
JWmer
ea70e378cd Update a.cpp 2020-11-22 07:45:39 +09:00
JWmer
777c3a08ab Update README.md 2020-11-22 07:45:39 +09:00
JWmer
f832aa6b6b Update evaluate.h 2020-11-22 07:45:39 +09:00
JWmer
be4cd56146 Update half_kp.cpp 2020-11-22 07:45:39 +09:00
JWmer
021f47b00e Update half_relative_kp.cpp 2020-11-22 07:45:39 +09:00
JWmer
36c801699f Update k.cpp 2020-11-22 07:45:39 +09:00
JWmer
5b3e9b0eb3 Update p.cpp 2020-11-22 07:45:39 +09:00
JWmer
c04c5b6658 Update nnue_common.h 2020-11-22 07:45:39 +09:00
JWmer
b27c51b5cf Delete k-p-cr-ep_256x2-32-32.h 2020-11-22 07:45:39 +09:00
JWmer
72fee2f7a4 Delete k-p-cr_256x2-32-32.h 2020-11-22 07:45:39 +09:00
JWmer
d9dcdc2b73 Delete k-p_256x2-32-32.h 2020-11-22 07:45:39 +09:00
Tomasz Sobczyk
5f18c88b3d Docs for book in gensfen. 2020-11-17 09:43:23 +09:00
Tomasz Sobczyk
e1dbad47ce Add support for opening book to gensfen. 2020-11-17 09:43:23 +09:00
Tomasz Sobczyk
d4350a16f3 Add representation of an opening book. 2020-11-17 09:43:23 +09:00
Tomasz Sobczyk
d793663188 Add docs for max_grad option for learn 2020-11-16 10:08:56 +09:00
Tomasz Sobczyk
3dbc45bdfc Add gradient clipping. 2020-11-16 10:08:56 +09:00
Tomasz Sobczyk
50358e26c7 Fix searching terminal nodes in gensfen. 2020-11-15 22:18:13 +09:00
Tomasz Sobczyk
00bc80c3c4 Add assume_quiet option to the learner. 2020-11-15 22:18:13 +09:00
Tomasz Sobczyk
00797a3d86 add option ensure_quiet for gensfen that makes the generated position quiet 2020-11-15 22:18:13 +09:00
FauziAkram
f9595828eb Rook Mobility Tweak
Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 171152 W: 34715 L: 34202 D: 102235
Ptnml(0-2): 3278, 20155, 38228, 20606, 3309
https://tests.stockfishchess.org/tests/view/5fa861f467cbf42301d6a68e

Passed LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 149616 W: 20471 L: 19882 D: 109263
Ptnml(0-2): 1172, 14434, 43102, 14833, 1267
https://tests.stockfishchess.org/tests/view/5fa9c8ff67cbf42301d6a74f

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

Bench: 3597730
2020-11-15 13:23:19 +01:00
Tomasz Sobczyk
9b930023fb Fix default value for batchsize in learn docs. 2020-11-15 00:51:04 +09:00
Tomasz Sobczyk
691da3bdad Add more information for factorizers at the start of training. 2020-11-14 18:47:22 +09:00
Tomasz Sobczyk
4e1653d53a Fix reliance on transitive includes for factorizers in trainer feature transformer. Add a file that includes all factorizers. 2020-11-14 12:35:12 +09:00
Tomasz Sobczyk
69bc3ef9be Output loss more often. 2020-11-14 12:33:25 +09:00
Tomasz Sobczyk
a71623f74c Add explicit read head seek to the start of the binpack file. Otherwise on MACOS the read head is placed at the end when app is specified. 2020-11-13 19:56:36 +09:00
SFisGOD
285bf7041a Increase reduction at root
when the best move does not change frequently

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 51320 W: 5159 L: 4956 D: 41205
Ptnml(0-2): 215, 3897, 17242, 4082, 224
https://tests.stockfishchess.org/tests/view/5faa072367cbf42301d6a767

LTC:
LLR: 2.98 (-2.94,2.94) {0.25,1.25}
Total: 15952 W: 762 L: 642 D: 14548
Ptnml(0-2): 8, 561, 6725, 667, 15
https://tests.stockfishchess.org/tests/view/5faa4c3567cbf42301d6a794

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

Bench: 3954692
2020-11-12 12:49:03 +01:00
lonfom169
b5781150ea Increase reduction based on the number of best move changes.
Thanks to Vizvezdenec for the PvNode idea and also to vondele the !PvNode idea.

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 19120 W: 1998 L: 1839 D: 15283
Ptnml(0-2): 76, 1445, 6375, 1572, 92
https://tests.stockfishchess.org/tests/view/5fa8af3e67cbf42301d6a6c9

Passed LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 75584 W: 3454 L: 3205 D: 68925
Ptnml(0-2): 54, 2832, 31771, 3081, 54

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

Bench: 3595418
2020-11-10 18:21:05 +01:00
Tomasz Sobczyk
2a8576b804 Fix compilation issues. 2020-11-10 10:21:09 +09:00
Tomasz Sobczyk
8069963c56 Update convert docs. 2020-11-10 10:21:09 +09:00
Tomasz Sobczyk
5d88e7bce8 Add optional move validation to training data conversion. No longer rely on static initialization order for magics initialization. 2020-11-10 10:21:09 +09:00
Stéphane Nicolet
392b529c3f Qsearch pruning: follow-up
This is a follow-up of the recent qsearch pruning patch in
a260c9a8a2

We now use the same guard condition (testing that we already have a defense with
a score better  score than a TB loss) for all pruning heuristics in qsearch().
This allows some pruning when in check, but  in a controlled way to ensure that
no wrong mate scores appear.

Tested with Elo-gaining bounds:

STC:
LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 22632 W: 2433 L: 2264 D: 17935
Ptnml(0-2): 98, 1744, 7487, 1865, 122
https://tests.stockfishchess.org/tests/view/5fa59405936c54e11ec99515

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 105432 W: 4965 L: 4648 D: 95819
Ptnml(0-2): 85, 4110, 44011, 4423, 87
https://tests.stockfishchess.org/tests/view/5fa5b609936c54e11ec9952a

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

Bench: 3578092
2020-11-08 09:15:34 +01:00
SFisGOD
32edb1d009 Update default net to nn-c3ca321c51c9.nnue
Optimization of the net biases of the 32 x 32 layer and the output layer.

Tuning of 32 x 32 layer (200k games, 5 seconds TC)
https://tests.stockfishchess.org/tests/view/5f9aaf266a2c112b60691c68

STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 41848 W: 4665 L: 4461 D: 32722
Ptnml(0-2): 239, 3308, 13659, 3446, 272
https://tests.stockfishchess.org/tests/view/5fa5ef5a936c54e11ec9954f

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 88008 W: 4045 L: 3768 D: 80195
Ptnml(0-2): 69, 3339, 36908, 3622, 66
https://tests.stockfishchess.org/tests/view/5fa62a78936c54e11ec99577

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

Bench: 3649288
2020-11-08 08:36:16 +01:00
Tomasz Sobczyk
ba35c88ab8 AVX-512 for smaller affine and feature transforms.
For the feature transformer the code is analogical to AVX2 since there was room for easy adaptation of wider simd registers.

For the smaller affine transforms that have 32 byte stride we keep 2 columns in one zmm register. We also unroll more aggressively so that in the end we have to do 16 parallel horizontal additions on ymm slices each consisting of 4 32-bit integers. The slices are embedded in 8 zmm registers.

These changes provide about 1.5% speedup for AVX-512 builds.

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

No functional change.
2020-11-07 16:49:49 +01:00
FauziAkram
7fc47eeb6f Introducing King On File
this new concept calculates bonuses/penalties for the king when the king is in a semiopen or open file.

Passed STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 44904 W: 9365 L: 9028 D: 26511
Ptnml(0-2): 857, 5309, 9841, 5530, 915
https://tests.stockfishchess.org/tests/view/5fa343625d72639a7acef72b

Passed LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 60552 W: 8449 L: 8051 D: 44052
Ptnml(0-2): 466, 5772, 17481, 6012, 545
https://tests.stockfishchess.org/tests/view/5fa40e365d72639a7acef79e

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

Bench: 3689484
2020-11-07 16:49:49 +01:00
Joost VandeVondele
04a320666e Change handling the special case of a single legal move.
Using no searching time in case of a single legal move is not beneficial from
a strength point of view, and this special case can be easily removed:

STC:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 22472 W: 2458 L: 2357 D: 17657
Ptnml(0-2): 106, 1733, 7453, 1842, 102
https://tests.stockfishchess.org/tests/view/5f926cbc81eda81bd78cb6df

LTC:
LLR: 2.94 (-2.94,2.94) {-0.75,0.25}
Total: 37880 W: 1736 L: 1682 D: 34462
Ptnml(0-2): 22, 1392, 16057, 1448, 21
https://tests.stockfishchess.org/tests/view/5f92a26081eda81bd78cb6fe

The advantage of using the normal time management for a single legal move is that scores
reported for that move are reasonable, not searching leads to artifacts during games
(see e.g. https://tcec-chess.com/#div=sf&game=96&season=19)

The disadvantage of using normal time management of a single legal move is that thinking
times can be unnaturally long, making it 'painful to watch' in online tournaments.

This patch uses normal time management, but caps the used time to 500ms.
This should lead to reasonable scores, and be hardly perceptible.

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

variant of a patch suggested by SFisGOD

No functional change.
2020-11-07 16:48:02 +01:00
Tomasz Sobczyk
3f6451eff7 Manually align arrays on the stack
as a workaround to issues with overaligned alignas() on stack variables in gcc < 9.3 on windows.

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

fixes #3216

No functional change
2020-11-04 19:52:42 +01:00
J. Oster
a260c9a8a2 Fix incorrect pruning in qsearch
Only do countermove based pruning in qsearch if we already have a move with a better score than a TB loss.

This patch fixes a bug (started as 843a961) that incorrectly prunes moves if in check,
and adds an assert to make sure no wrong mate scores are given in the future.
It replaces a no-op moveCount check with a check for bestValue.

Initially discussed in #3171 and later in #3199, #3198 and #3210.
This PR effectively closes #3171
It also likely fixes #3196 where this causes user visible incorrect TB scores,
which probably result from these incorrect mate scores.

Passed STC and LTC non-regression tests.
https://tests.stockfishchess.org/tests/view/5f9ef8dabca9bf35bae7f648
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 21672 W: 2339 L: 2230 D: 17103
Ptnml(0-2): 126, 1689, 7083, 1826, 112

https://tests.stockfishchess.org/tests/view/5f9f0caebca9bf35bae7f666
LLR: 2.97 (-2.94,2.94) {-0.75,0.25}
Total: 33152 W: 1551 L: 1485 D: 30116
Ptnml(0-2): 27, 1308, 13832, 1390, 19

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

Bench: 3625915
2020-11-02 19:41:17 +01:00
FauziAkram
931070b65a Elo Worth in King Danger
Adding the EloWorth for each term in King Danger.
Should be useful for simplifications, tuning patches, and new ideas.

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

non-functional change
2020-11-02 19:41:17 +01:00