Commit Graph

5733 Commits

Author SHA1 Message Date
Tomasz Sobczyk
d77b3d176e Always flush sfen writer at the end of gensfen and when it is destroyed. 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
21fac7c53c A collective struct for gensfen parameters. 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
cb61dc9c9b Make sfen writer a part of gensfen. 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
3f289546da Make some gensfen members private. 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
821b655bc6 Move gensfen progress reporting from sfen writer to gensfen 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
af238fe132 Rewrite gensfen to use stockfish's thread pool. 2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
0e528995c2 Print avg bias/weight for affine trasform and feature transformer during training. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
fe766f4f42 Additional output from layers during training. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
2c477d76ec Cleaner and more outputs during training initialization. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
b882423005 Bring back info for finished evalsave. Update tests with the new message. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
4b72658409 Synchronize printed info regions in the learner and sfen reader. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
d824bd8ec5 Add an overload for io manip in the logger. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
54dd6a2407 Add logger with synchronized regions. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
cf3edfed82 Improve info messages. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
c49ae541c4 Add layer info for check_health. Print subsequent infos from the same scope with "-->" instead of "INFO:" for clarity. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
8ddef320e6 Print an additional new line before calc_loss progress instead of after check_health in the feature transformer layer. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
d70408f204 Add docs entry for the verbose flag. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
a351c1d65e Add verbose flag to learn. Only print update parameters info when vebose=true 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
ec436d3dfd Print some weight update stats 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
be3937c37b Print layers and their indices during training initialization. 2020-10-25 22:18:28 +09:00
Tomasz Sobczyk
3bf397a569 Update instrumented_learn for the current codebase. 2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
47a82bfc91 Document new options. 2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
371acaa0b5 Allow changing sfen reader buffer sizes for the learn command. 2020-10-25 19:22:56 +09:00
Tomasz Sobczyk
d31169bab5 Update CI to use epochs instead of loops. 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
e4a38c18dd Don't test syzygi 2020-10-24 08:52:42 +09:00
Tomasz Sobczyk
e4e9f7e39b Reduce bench depth for testing with valgrind to prevent timeouts in CI. 2020-10-24 08:52:42 +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