Tomasz Sobczyk
371acaa0b5
Allow changing sfen reader buffer sizes for the learn command.
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
8fb208598b
pass shuffle flag in the constructor
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
31f94a18b3
Update readme and docs after change from loop to epochs.
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
fc3788f630
Use cyclic sfen reader for learning, change loop option to epochs.
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
ad3d1b42e4
Make sfen reader only stop when it's destroyed. Now it is fully RAII.
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
c58aa9696a
Start sfen reader worker thread in the constructor.
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
0636e1256d
Add cyclic mode to the sfen reader. Make sfen reader take all files at construction
2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
c7ac3688a7
Move the old convert stuff from learn to their own commands.
2020-10-24 08:52:42 +09:00
Tomasz Sobczyk
f7530de20d
Fix assertion in trainer
2020-10-23 09:35:41 +09:00
Tomasz Sobczyk
9564a52523
Remove whole file shuffling as it does not change learning behaviour, only works for bin, and is considered harmful for binpack.
2020-10-23 09:33:20 +09:00
syzygy1
2046d5da30
More incremental accumulator updates
...
This patch was inspired by c065abd which updates the accumulator,
if possible, based on the accumulator of two plies back if
the accumulator of the preceding ply is not available.
With this patch we look back even further in the position history
in an attempt to reduce the number of complete recomputations.
When we find a usable accumulator for the position N plies back,
we also update the accumulator of the position N-1 plies back
because that accumulator is most likely to be helpful later
when evaluating positions in sibling branches.
By not updating all intermediate accumulators immediately,
we avoid doing too much work that is not certain to be useful.
Overall, roughly 2-3% speedup.
This patch makes the code more specific to the net architecture,
changing input features of the net will require additional changes
to the incremental update code as discussed in the PR #3193 and #3191 .
Passed STC:
https://tests.stockfishchess.org/tests/view/5f9056712c92c7fe3a8c60d0
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 10040 W: 1116 L: 968 D: 7956
Ptnml(0-2): 42, 722, 3365, 828, 63
closes https://github.com/official-stockfish/Stockfish/pull/3193
No functional change.
2020-10-22 20:50:16 +02:00
Joost VandeVondele
258af8ae44
Add net as dependency of config
...
cleaner output and error message if the server is down and the net is not available.
closes https://github.com/official-stockfish/Stockfish/pull/3188
No functional change
2020-10-22 20:18:12 +02:00
xoto10
f5dfad5d72
Reduce big time spikes by reducing PV re-searches.
...
Save time by reducing PV re-searches above original depth. Instead use 5% extra time on every move.
STC 10+0.1 th 1 :
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 90688 W: 9702 L: 9436 D: 71550
Ptnml(0-2): 408, 7252, 29792, 7450, 442
https://tests.stockfishchess.org/tests/view/5f8df807bacb75a4f9a47223
LTC 60+0.6 th 1 :
LLR: 2.97 (-2.94,2.94) {0.25,1.25}
Total: 97856 W: 4602 L: 4303 D: 88951
Ptnml(0-2): 53, 3757, 41057, 3960, 101
https://tests.stockfishchess.org/tests/view/5f8ec4872c92c7fe3a8c602d
closes https://github.com/official-stockfish/Stockfish/pull/3192
Bench 3943959
2020-10-22 20:08:15 +02:00
Tomasz Sobczyk
7b4a769cca
Fix base_dir not being applied to singular filenames.
2020-10-22 20:01:55 +09:00
Tomasz Sobczyk
af138d1937
Fix crashes when trying to open a file of unknown type. Increase robustness of error handling.
2020-10-22 20:01:55 +09:00
Tomasz Sobczyk
886467e09f
Fix crash when trying to read a non existing .binpack file.
2020-10-22 20:01:55 +09:00
Tomasz Sobczyk
11b28ad3b5
Don't treat unknown options in learn as file names. Add targetfile to specify individual files.
2020-10-22 20:01:55 +09:00
Tomasz Sobczyk
8f3e64a6d5
move sfen reader to separate file
2020-10-22 10:42:28 +09:00
Tomasz Sobczyk
ff06d1e0ad
Rewrite learner to be based on stockfish's thread pool. Reduce coupling along the way
2020-10-21 18:17:34 +09:00
Tomasz Sobczyk
f2ad307de3
Clarify the behaviour of execute_with_worker[s]
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
74af287637
Fix execute_with_workers test call in uci
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
71862e2ebb
remove incorrect move in execute_with_workers
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
fd229c0768
Fix races and UBs
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
97fb9a89e4
allow waiting for task completion.
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
5188c26b20
Allow execution of tasks on the global thread pool.
2020-10-20 19:19:32 +09:00
Tomasz Sobczyk
146a6b056e
PascalCase -> snake_case for consistency with the rest of the codebase.
2020-10-19 18:37:23 +09:00
Tomasz Sobczyk
2398d34e87
Move string split to misc
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
69ea3d30b2
Move the extra new line to after check health.
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
9023edc3c8
Add missing includes.
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
77624addf2
Cleanup last ".." in include paths.
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
497f689aa3
Cleanup nnue
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
c286f9cd7d
Cleanup trainer.
2020-10-19 08:29:51 +09:00
Tomasz Sobczyk
ea8eb415de
Cleanup trainer features.
2020-10-18 22:24:24 +09:00
Vizvezdenec
560c776397
Do more reductions for late quiet moves in case of consecutive fail highs.
...
Idea of this patch can be described as following - in case we have consecutive fail highs and we reach late enough moves at root node probability of remaining quiet moves being able to produce even bigger value than moves that produced previous cutoff (so ones that should be high in move ordering but now they fail to produce beta cutoff because we actually reached high move count) should be quiet small so we can reduce them more.
passed STC
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 53392 W: 5681 L: 5474 D: 42237
Ptnml(0-2): 214, 4104, 17894, 4229, 255
https://tests.stockfishchess.org/tests/view/5f88501adcdad978fe8c527e
passed LTC
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 59136 W: 2773 L: 2564 D: 53799
Ptnml(0-2): 30, 2117, 25078, 2300, 43
https://tests.stockfishchess.org/tests/view/5f884dbfdcdad978fe8c527a
closes https://github.com/official-stockfish/Stockfish/pull/3184
Bench: 4066972
2020-10-18 13:54:28 +02:00
mstembera
281d520cc2
Update default net to nn-eba324f53044.nnue
...
The new net is based on the previous net 04cf2b4ed1da but with the biases
for the 1st hidden layer tuned SPSA, see the SPSA session on fishtest there:
https://tests.stockfishchess.org/tests/view/5f875213dcdad978fe8c5211
Thanks to @vondele for writing out the net, see discussion in this thread:
432da86721
Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 15000 W: 1640 L: 1483 D: 11877
Ptnml(0-2): 50, 1183, 4908, 1278, 81
https://tests.stockfishchess.org/tests/view/5f8955e20fea1a44ec4f0a5d
Passed LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 81272 W: 3948 L: 3682 D: 73642
Ptnml(0-2): 64, 3194, 33856, 3456, 66
https://tests.stockfishchess.org/tests/view/5f89e8efeae8a6e60644d6e7
closes https://github.com/official-stockfish/Stockfish/pull/3187
Bench: 3762411
2020-10-18 13:43:26 +02:00
Tomasz Sobczyk
3041adb080
Cleanup layers.
2020-10-18 19:32:15 +09:00
Tomasz Sobczyk
0d4c3014ca
Cleanup features.
2020-10-17 23:19:16 +09:00
Tomasz Sobczyk
ca760c3a5b
Cleanup architecture files.
2020-10-17 20:01:09 +09:00
Tomasz Sobczyk
c93f8732bf
Force Use NNUE to pure when learning.
2020-10-17 08:44:38 +09:00
Tomasz Sobczyk
3cf193a90e
Properly handle cases in verify and init when SkipLoadingEval is set.
2020-10-17 08:44:38 +09:00
Tomasz Sobczyk
5db46d0c82
Verify whether there is a network being used during training.
2020-10-17 08:44:38 +09:00
Tomasz Sobczyk
e503cc4ea8
Add one more empty line between progress reports.
2020-10-17 00:13:50 +09:00
Tomasz Sobczyk
5856237e3f
Rename hirate to startpos
2020-10-16 09:07:02 +09:00
Tomasz Sobczyk
904adb9a32
Indentation consistency in learn folder
2020-10-15 22:11:31 +09:00
Tomasz Sobczyk
880d23af1c
Move sfen input/output streams to sfen_stream.h
2020-10-15 20:37:03 +09:00
Tomasz Sobczyk
14f83ad7b9
Move public search/qsearch interface from namespace Learner to namespace Search
2020-10-15 20:37:03 +09:00
Tomasz Sobczyk
0494adeb2c
Move nnue evaluation stuff from evaluate.h to nnue/evaluate_nnue.h
2020-10-15 20:37:03 +09:00
Unai Corzo
288a604411
Scale factor tweak
...
Add !pawnsOnBothFlanks heuristic to scale factor.
STC https://tests.stockfishchess.org/tests/view/5f8080575b3847b5d41f9134
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 250960 W: 49779 L: 49168 D: 152013
Ptnml(0-2): 4224, 28822, 58802, 29383, 4249
LTC https://tests.stockfishchess.org/tests/view/5f832f498ea73fb8ddf83ddb
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 88584 W: 11827 L: 11388 D: 65369
Ptnml(0-2): 585, 8079, 26578, 8412, 638
closes https://github.com/official-stockfish/Stockfish/pull/3179
bench: 3834252
2020-10-14 19:32:12 +02:00
FauziAkram
4a5cc1365f
RookOnQueenFile Removal
...
Removing Rook On Queen File looks beneficial, and it might even bring some ELO.
I will try to reintroduce it with a different method later on.
Passed STC:
https://tests.stockfishchess.org/tests/view/5f7cea204389873867eb10cb
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 18624 W: 3800 L: 3568 D: 11256
Ptnml(0-2): 308, 2131, 4257, 2253, 363
Passed LTC:
https://tests.stockfishchess.org/tests/view/5f7d76a4e936c6892bf50598
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 117864 W: 15515 L: 15340 D: 87009
Ptnml(0-2): 926, 11127, 34671, 11262, 946
closes https://github.com/official-stockfish/Stockfish/pull/3176
Bench: 3756191
2020-10-14 19:29:22 +02:00
Joost VandeVondele
ba73f8ce0d
Update default net to nn-04cf2b4ed1da.nnue
...
Further tune the net parameters, now the last but one layer (32x32).
To limit the number of parameters optimized, the network layer was
decomposed using SVD, and the singular values were treated
as parameters and tuned.
Tuning branch: https://github.com/vondele/Stockfish/tree/svdTune
Tuner: https://github.com/vondele/nevergrad4sf
passed STC:
https://tests.stockfishchess.org/tests/view/5f83e82f8ea73fb8ddf83e4e
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 8488 W: 944 L: 795 D: 6749
Ptnml(0-2): 39, 609, 2811, 734, 51
passed LTC:
https://tests.stockfishchess.org/tests/view/5f83f4118ea73fb8ddf83e66
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 169016 W: 8043 L: 7589 D: 153384
Ptnml(0-2): 133, 6623, 70538, 7085, 129
closes https://github.com/official-stockfish/Stockfish/pull/3181
Bench: 3945198
2020-10-14 13:28:21 +02:00