Tomasz Sobczyk
ec9e49e875
Add a HalfKA architecture (a product of K - king, and A - any piece) along with all required infrastructure. HalfKA doesn't discriminate kings compared to HalfKP. Keep old architecture as the default one.
2020-10-29 09:10:01 +09: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
Tomasz Sobczyk
317fda2516
Cleanup eval saving and lr scheduling.
2020-10-28 23:08:05 +09:00
SFisGOD
6328135264
Update default net to nn-2eb2e0707c2b.nnue
...
Optimization of the net weights of the 32 x 32 layer (1024 parameters) and net biases of the 512 x 32 layer (32 parameters) using SPSA.
Tuning of 32 x 32 Layer (800,000 games, 5 seconds time control):
https://tests.stockfishchess.org/tests/view/5f942040d3978d7e86f1aa05
Tuning of 512 x 32 Layer (80,000 games, 20 seconds time control):
https://tests.stockfishchess.org/tests/view/5f8f926d2c92c7fe3a8c608b
STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 17336 W: 1918 L: 1754 D: 13664
Ptnml(0-2): 79, 1344, 5672, 1480, 93
https://tests.stockfishchess.org/tests/view/5f9882346a2c112b60691b34
LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 37304 W: 1822 L: 1651 D: 33831
Ptnml(0-2): 27, 1461, 15501, 1640, 23
https://tests.stockfishchess.org/tests/view/5f98a4b36a2c112b60691b40
closes https://github.com/official-stockfish/Stockfish/pull/3201
Bench: 3403528
2020-10-28 08:13:34 +01:00
FauziAkram
bde3505758
Bishop Pawns based on Files
...
Passed STC:
https://tests.stockfishchess.org/tests/view/5f8cc8145a4eacb45305da3c
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 132544 W: 27795 L: 27328 D: 77421
Ptnml(0-2): 2756, 15558, 29272, 15835, 2851
Passed LTC:
https://tests.stockfishchess.org/tests/view/5f8df614bacb75a4f9a4721e
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 169608 W: 23257 L: 22622 D: 123729
Ptnml(0-2): 1408, 16316, 48758, 16877, 1445
closes https://github.com/official-stockfish/Stockfish/pull/3194
Bench: 4067106
2020-10-28 08:11:29 +01:00
Tomasz Sobczyk
680654b254
Add dots to output every epoch for progress visualization.
2020-10-28 09:36:43 +09:00
Tomasz Sobczyk
f81fa3d712
Replace global_learning_rate with learning_rate local to the learner and passed to update_parameters as a parameter.
2020-10-28 09:36:07 +09:00
Tomasz Sobczyk
cde6ec2bf2
Make all grad related functions in learn static. Pass calc_grad as a parameter.
2020-10-27 14:47:50 +09:00
Tomasz Sobczyk
e4868cb59e
Move setting learn search limits to learner.
2020-10-27 14:47:07 +09:00
Tomasz Sobczyk
c229929d26
Remove the position parameter from learn.
2020-10-27 00:35:43 +09:00
Tomasz Sobczyk
a8066cd4a9
Rename elmo lambdas
2020-10-27 00:33:58 +09:00
Tomasz Sobczyk
f7de49eb66
Create a collective parameter struct for learner.
2020-10-27 00:33:58 +09:00
Tomasz Sobczyk
ba390a7f9a
Print the used factorizer when intializing training.
2020-10-27 00:32:39 +09:00
Tomasz Sobczyk
e01397c674
Remove multi_think
2020-10-26 19:40:40 +09:00
Tomasz Sobczyk
e515f1f61f
Move SfenWriter to a separate file
2020-10-26 19:39:58 +09:00
Tomasz Sobczyk
03abfae41f
Reorder members, renaming.
2020-10-26 09:37:59 +09:00
Tomasz Sobczyk
6d4d20c4be
Cleaner printing and some renaming.
2020-10-26 09:37:59 +09:00
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
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
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