Tomasz Sobczyk
5fa28b12fa
Allow setting UCI options programmatically.
2020-10-07 23:09:33 +09:00
Tomasz Sobczyk
80cbc3ffee
Fix grammar and spelling. Add recommendations for UCI options.
2020-10-07 16:08:26 +09:00
Tomasz Sobczyk
31f9d66f12
Initial documentation for learn, gensfen, convert, and binpack.
2020-10-07 16:08:26 +09:00
FauziAkram
767b4f4fbe
Pawn Tuning
...
Tuning of pawns, for classical evaluation:
Passed STC:
https://tests.stockfishchess.org/tests/view/5f771f0e52560f5fc78559ec
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 252696 W: 50321 L: 49692 D: 152683
Ptnml(0-2): 4614, 29845, 57049, 29978, 4862
Passed LTC:
https://tests.stockfishchess.org/tests/view/5f77cfef090dcf9aaa16d38b
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 48184 W: 6556 L: 6193 D: 35435
Ptnml(0-2): 335, 4516, 14100, 4733, 408
closes https://github.com/official-stockfish/Stockfish/pull/3169
bench: 4016121
2020-10-05 19:01:46 +02:00
Unai Corzo
17fb3a8ce0
Simplify away futility pruning for captures
...
Remove futility pruning for captures.
STC https://tests.stockfishchess.org/tests/view/5f749bfed930428c36d34c56
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 38064 W: 4011 L: 3929 D: 30124
Ptnml(0-2): 192, 3004, 12567, 3068, 201
LTC https://tests.stockfishchess.org/tests/view/5f74d99bf18675b1ce2f7412
LLR: 2.94 (-2.94,2.94) {-0.75,0.25}
Total: 184984 W: 8567 L: 8610 D: 167807
Ptnml(0-2): 146, 7593, 77058, 7548, 147
closes https://github.com/official-stockfish/Stockfish/pull/3166
bench: 3890648
2020-10-05 18:59:02 +02:00
Joost VandeVondele
9382f854b3
Schedule threads fairly under valgrind
...
fixes a rare case that can cause CI to fail when running multithreaded under valgrind.
closes https://github.com/official-stockfish/Stockfish/pull/3165
No functional change.
2020-10-05 18:56:49 +02:00
noobpwnftw
91cb4a6770
Skip eval dampening in Use NNUE = pure case
2020-10-03 19:31:21 +09:00
noobpwnftw
6f7a228707
Minor cleanups
...
Remove unused code and magic numbers
2020-10-01 16:52:20 +09:00
Joost VandeVondele
f848d67341
Use fair scheduling of threads under valgrind
...
fixes some rare case where the master search thread makes no progress,
observed in CI.
2020-10-01 09:36:44 +09:00
nodchip
b889debfb5
Merge pull request #171 from noobpwnftw/sf_merge
...
Merge SFdev
2020-09-30 10:18:41 +09:00
noobpwnftw
d865159bd6
Fix variable initialization in test commands
2020-09-29 17:30:08 +08:00
noobpwnftw
a8b502a975
Merge remote-tracking branch 'remotes/origin/master'
...
Bench: 3618595
2020-09-29 17:09:14 +08:00
noobpwnftw
b44d539c94
Fix a bug that LR is not correctly scaled when initial LR is not 1.0
2020-09-29 16:18:42 +09:00
Stéphane Nicolet
5af09cfda5
Include pawns in NNUE scaling
...
We now include the total pawn count in the scaling factor for the output
of the NNUE evaluation network. This should have the effect of trying to
keep more pawns when SF has the advantage, but exchange them when she
is defending.
Thanks to Alexander Pagel (Lolligerhans) for the idea of using the
value of pawns to ease the comparison with the rest of the material
estimation.
Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 15072 W: 1700 L: 1539 D: 11833
Ptnml(0-2): 65, 1202, 4845, 1355, 69
https://tests.stockfishchess.org/tests/view/5f7235a63b22d6afa50699b3
Passed LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 25880 W: 1270 L: 1124 D: 23486
Ptnml(0-2): 23, 980, 10788, 1126, 23
https://tests.stockfishchess.org/tests/view/5f723b483b22d6afa5069a99
closes https://github.com/official-stockfish/Stockfish/pull/3164
Bench: 3776081
2020-09-28 22:42:26 +02:00
Stefan Geschwentner
6f0aa186d8
Tweak reduction formula.
...
Replace log(i) with log(i + 0.25 * log(i)). This increases especially for low values the reductions. But for bigger values there are nearly no changes.
STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 49640 W: 5505 L: 5289 D: 38846
Ptnml(0-2): 270, 4074, 15924, 4274, 278
https://tests.stockfishchess.org/tests/view/5f71f04d3b22d6afa5069478
LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 43856 W: 2209 L: 2021 D: 39626
Ptnml(0-2): 32, 1776, 18128, 1956, 36
https://tests.stockfishchess.org/tests/view/5f7232ee3b22d6afa50699a2
closes https://github.com/official-stockfish/Stockfish/pull/3163
Bench: 3555769
2020-09-28 22:34:25 +02:00
SFisGOD
5efbaaba77
Update default net to nn-baeb9ef2d183.nnue
...
Further optimization of Sergio's nn-03744f8d56d8.nnue
This patch is the result of collaboration with Joost VandeVondele.
STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 37000 W: 4145 L: 3947 D: 28908
Ptnml(0-2): 191, 3016, 11912, 3166, 215
https://tests.stockfishchess.org/tests/view/5f71e7983b22d6afa5069475
LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 60224 W: 2992 L: 2769 D: 54463
Ptnml(0-2): 48, 2420, 24956, 2637, 51
https://tests.stockfishchess.org/tests/view/5f722bb83b22d6afa506998f
closes https://github.com/official-stockfish/Stockfish/pull/3161
Bench: 3720073
2020-09-28 22:29:31 +02:00
FauziAkram
ba46599aa2
Tweaking Mobility and Safe Check
...
Passed STC:
https://tests.stockfishchess.org/tests/view/5f70d86d3b22d6afa50693b9
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 100368 W: 20323 L: 19914 D: 60131
Ptnml(0-2): 1927, 11641, 22605, 12118, 1893
Passed LTC:
https://tests.stockfishchess.org/tests/view/5f71bb553b22d6afa5069457
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 77648 W: 10613 L: 10181 D: 56854
Ptnml(0-2): 634, 7280, 22594, 7652, 664
closes https://github.com/official-stockfish/Stockfish/pull/3160
Bench: 3861984
2020-09-28 22:26:37 +02:00
Vizvezdenec
a5e68d9b25
Adjust null move pruning constants
...
Idea is that division by fraction of 2 is slightly faster than by other numbers so parameters are adjusted in a way that division in null move pruning depth reduction features dividing by 256 instead of dividing by 213.
Other than this patch is almost non-functional - difference starts to exist by depth 133.
passed STC
https://tests.stockfishchess.org/tests/view/5f70dd943b22d6afa50693c5
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 57048 W: 6616 L: 6392 D: 44040
Ptnml(0-2): 304, 4583, 18531, 4797, 309
passed LTC
https://tests.stockfishchess.org/tests/view/5f7180db3b22d6afa506941f
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 45960 W: 2419 L: 2229 D: 41312
Ptnml(0-2): 43, 1779, 19137, 1987, 34
closes https://github.com/official-stockfish/Stockfish/pull/3159
bench 3789924
2020-09-28 22:22:54 +02:00
Joost VandeVondele
36c2886302
Update default net to nn-04a843f8932e.nnue
...
an optimization of Sergio's nn-03744f8d56d8.nnue tuning the output layer (33 parameters) on game play.
WIP code to make layer parameters tunable is https://github.com/vondele/Stockfish/tree/optionOutput
Optimization itself is using https://github.com/vondele/nevergrad4sf
Writing of the modified net using WIP code based on the learner code https://github.com/vondele/Stockfish/tree/evalWrite
Most parameters in the output layer are changed only little (~5 for int8_t).
passed STC:
https://tests.stockfishchess.org/tests/view/5f716f6b3b22d6afa506941a
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 15488 W: 1859 L: 1689 D: 11940
Ptnml(0-2): 79, 1260, 4917, 1388, 100
passed LTC:
https://tests.stockfishchess.org/tests/view/5f71908e3b22d6afa506942e
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 8728 W: 518 L: 400 D: 7810
Ptnml(0-2): 7, 338, 3556, 456, 7
closes https://github.com/official-stockfish/Stockfish/pull/3158
Bench: 3789924
2020-09-28 16:55:40 +02:00
noobpwnftw
c065abdcaf
Use incremental updates more often
...
Use incremental updates for accumulators for up to 2 plies.
Do not copy accumulator. About 2% speedup.
Passed STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 21752 W: 2583 L: 2403 D: 16766
Ptnml(0-2): 128, 1761, 6923, 1931, 133
https://tests.stockfishchess.org/tests/view/5f7150cf3b22d6afa5069412
closes https://github.com/official-stockfish/Stockfish/pull/3157
No functional change
2020-09-28 16:54:35 +02:00
Stéphane Nicolet
1dbd2a1ad5
Tweak nnue scaling to keep more material
...
Current master uses a constant scale factor of 5/4 = 1.25 for the output
of the NNUE network, for compatibility with search and classical evaluation.
We modify this scale factor to make it dependent on the phase of the game,
going from about 1.5 in the opening to 1.0 for pure pawn endgames.
This helps Stockfish to avoid exchanges of pieces (heavy pieces in particular)
when she has the advantage, keeping more material on the board when attacking.
Passed STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 14744 W: 1771 L: 1599 D: 11374
Ptnml(0-2): 87, 1184, 4664, 1344, 93
https://tests.stockfishchess.org/tests/view/5f6fb0a63b22d6afa506904f
Passed LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 8912 W: 512 L: 393 D: 8007
Ptnml(0-2): 7, 344, 3637, 459, 9
https://tests.stockfishchess.org/tests/view/5f6fcf533b22d6afa5069066
closes https://github.com/official-stockfish/Stockfish/pull/3154
Bench: 3943952
2020-09-27 08:24:50 +02:00
noobpwnftw
9d4bf4fe0c
Optimize accumulators for null move.
2020-09-27 09:39:16 +09:00
noobpwnftw
96a3180770
Update instrumented_learn.sh
...
Fix typo.
2020-09-27 09:32:26 +09:00
noobpwnftw
5e8a49f7f2
Restore lambda and gradient function post-merge and minor fixes.
...
bench: 3788313
2020-09-26 12:55:02 +09:00
nodchip
d1967bb281
Merge pull request #165 from Sopel97/merge_attempt
...
Merge attempt with official-stockfish/master and noobpwnftw/trainer
2020-09-26 10:05:16 +09:00
SFisGOD
f66c381f11
Switch to NNUE eval probabilistically for OCB
...
Introduce a small chance of switching to NNUE if PSQ imbalance is large but we have opposite colored bishops and the classical eval is struggling to win.
STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 25304 W: 3179 L: 2983 D: 19142
Ptnml(0-2): 172, 2171, 7781, 2345, 183
https://tests.stockfishchess.org/tests/view/5f6b14dec7759d4ee307cfe3
LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 84680 W: 4846 L: 4556 D: 75278
Ptnml(0-2): 89, 3933, 34011, 4213, 94
https://tests.stockfishchess.org/tests/view/5f6b3fb6c7759d4ee307cff9
closes https://github.com/official-stockfish/Stockfish/pull/3146
Bench: 3865413
2020-09-25 17:44:19 +02:00
Stéphane Nicolet
5e6a5e48e6
Suppress info strings before 'uci'
...
On Windows, Stockfish wouldn't launch in some GUI because we output some
info strings (about the use of large pages) before sending the 'uci'
command. It seems more robust to suppress these info strings, and instead
to add a proper section section in the Readme about large pages use.
fixes https://github.com/official-stockfish/Stockfish/issues/3052
closes https://github.com/official-stockfish/Stockfish/pull/3147
No functional change
2020-09-25 17:44:14 +02:00
Tomasz Sobczyk
c99541828f
Remove the re-search on depth 0. It is correctly handled by search now.
2020-09-25 16:06:33 +02:00
Tomasz Sobczyk
b6e7733b4c
In gensfen call search before get_current_game_result so that rootMoves is initialized by Learner::init_for_search. Don't call Tablebases::rank_root_moves in get_current_game_result because it's called in Learner::init_for_search. This fixes accessing uninitialized variables related to tablebases.
2020-09-25 15:04:21 +02:00
Tomasz Sobczyk
89eeb36835
Initialize Tablebases::MaxCardinality to 0 to prevent uninitialized variable read in rank_root_moves
2020-09-25 13:42:27 +02:00
Tomasz Sobczyk
654b94f0a7
Remove old unused use_raw_nnue_eval option from gensfen tests
2020-09-25 10:41:40 +02:00
Tomasz Sobczyk
0a3e070ffb
Adjust instrumented learn test for parameter changes.
2020-09-25 00:11:24 +02:00
Tomasz Sobczyk
9955f51215
Update bench signature. Bench: 4698761
2020-09-24 23:23:37 +02:00
Tomasz Sobczyk
baf8b5beaf
Change default net so that the architecture matches the architecture expected by the binary.
2020-09-24 22:58:21 +02:00
Tomasz Sobczyk
d4a5f91766
Add info string when loading/failing to load an eval file.
2020-09-24 22:57:55 +02:00
Tomasz Sobczyk
9f87282c6d
Fix net not being downloaded on build. Make PGO build faster by reverting gensfen command change.
2020-09-24 21:59:25 +02:00
Tomasz Sobczyk
9f3de8b40e
Revert some unwanted changes from merge conflict resolution.
2020-09-24 21:10:10 +02:00
Tomasz Sobczyk
56f1a2fe49
Merge branch 'trainer' into merge_attempt
2020-09-24 20:45:23 +02:00
Tomasz Sobczyk
4abe836896
Merge remote-tracking branch 'upstream/master' into merge_attempt
2020-09-24 20:34:29 +02:00
noobpwnftw
9827411b7c
Merge remote-tracking branch 'remotes/nodchip/master' into trainer
2020-09-24 21:45:28 +08:00
noobpwnftw
5be8b573be
Merge remote-tracking branch 'remotes/origin/master' into trainer
2020-09-23 19:02:27 +08:00
noobpwnftw
411adab149
Merge remote-tracking branch 'remotes/nodchip/master' into trainer
2020-09-23 18:29:30 +08:00
Stéphane Nicolet
3d5b2c8a51
Increase reductions with the number of threads
...
Passed STC with 8 threads:
LLR: 2.92 (-2.94,2.94) {-0.25,1.25}
Total: 13520 W: 1135 L: 1012 D: 11373
Ptnml(0-2): 39, 815, 4929, 938, 39
https://tests.stockfishchess.org/tests/view/5f68e274ded68c240be73f41
Passed LTC with 8 threads:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 48384 W: 2183 L: 1994 D: 44207
Ptnml(0-2): 28, 1777, 20402, 1948, 37
https://tests.stockfishchess.org/tests/view/5f68f068ded68c240be747e9
closes https://github.com/official-stockfish/Stockfish/pull/3142
No functional change (for one thread)
2020-09-22 22:45:02 +02:00
Stéphane Nicolet
9a64e737cf
Small cleanups 12
...
- Clean signature of functions in namespace NNUE
- Add comment for countermove based pruning
- Remove bestMoveCount variable
- Add const qualifier to kpp_board_index array
- Fix spaces in get_best_thread()
- Fix indention in capture LMR code in search.cpp
- Rename TtmemDeleter to LargePageDeleter
Closes https://github.com/official-stockfish/Stockfish/pull/3063
No functional change
2020-09-21 10:41:10 +02:00
Sami Kiminki
485d517c68
Add large page support for NNUE weights and simplify TT mem management
...
Use TT memory functions to allocate memory for the NNUE weights. This
should provide a small speed-up on systems where large pages are not
automatically used, including Windows and some Linux distributions.
Further, since we now have a wrapper for std::aligned_alloc(), we can
simplify the TT memory management a bit:
- We no longer need to store separate pointers to the hash table and
its underlying memory allocation.
- We also get to merge the Linux-specific and default implementations
of aligned_ttmem_alloc().
Finally, we'll enable the VirtualAlloc code path with large page
support also for Win32.
STC: https://tests.stockfishchess.org/tests/view/5f66595823a84a47b9036fba
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 14896 W: 1854 L: 1686 D: 11356
Ptnml(0-2): 65, 1224, 4742, 1312, 105
closes https://github.com/official-stockfish/Stockfish/pull/3081
No functional change.
2020-09-21 08:43:48 +02:00
Stefan Geschwentner
16b4578cc1
Tweak hybrid treshold.
...
Increase the first hybrid threshold with more material.
Rewrite the hybrid rules for clarity.
STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 24416 W: 3039 L: 2848 D: 18529
Ptnml(0-2): 135, 2136, 7503, 2271, 163
https://tests.stockfishchess.org/tests/view/5f6451efbb0cae038ca8f4dc
LTC;
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 65016 W: 3702 L: 3455 D: 57859
Ptnml(0-2): 66, 2991, 26157, 3218, 76
https://tests.stockfishchess.org/tests/view/5f64b143bb0cae038ca8f51f
closes https://github.com/official-stockfish/Stockfish/pull/3140
Bench: 3973739
2020-09-21 08:19:10 +02:00
Unai Corzo
8559c43914
Simplify reduced depth search
...
Simplification in reduced depth search.
STC https://tests.stockfishchess.org/tests/view/5f64c72fbb0cae038ca8f531
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 28320 W: 3475 L: 3359 D: 21486
Ptnml(0-2): 170, 2485, 8773, 2523, 209
LTC https://tests.stockfishchess.org/tests/view/5f650cfabb0cae038ca8f585
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 58392 W: 3354 L: 3285 D: 51753
Ptnml(0-2): 74, 2826, 23336, 2877, 83
closes https://github.com/official-stockfish/Stockfish/pull/3139
bench: 4201295
2020-09-21 07:47:41 +02:00
Joost VandeVondele
2931463d3a
Revert earlier TB changes.
...
they were not correct. Unfortunately, also restores the race on RootInTB
2020-09-21 09:45:42 +09:00
Tomasz Sobczyk
d4737819cd
Fix castling rights feature encoding.
2020-09-20 20:10:03 +09:00
Joost VandeVondele
da28ce3339
Add initialization also to learning patch
...
fixes https://github.com/nodchip/Stockfish/issues/160
2020-09-20 08:16:54 +09:00