Commit Graph

5701 Commits

Author SHA1 Message Date
Tomasz Sobczyk
591609c262 Fix relation between halfmove and fullmove clocks. 2021-03-14 22:01:01 +09:00
QuackQuackBlah
03b888e118 Update gensfen_nonpv.md
Fixes typo.
2021-03-09 14:25:27 +09:00
Tomasz Sobczyk
0ddad45ab2 Add gather_statistics command that allows gathering statistics from a .bin or .binpack file. Initially only support position count. 2021-03-01 00:36:45 +09:00
Tomasz Sobczyk
b68cd36708 http://talkchess.com/forum3/viewtopic.php?f=2&t=76736&p=885254#p885254 2021-02-28 23:28:12 +09:00
Tomasz Sobczyk
74774c36e1 Fix wrong multipv depth range. Fixes #291 2021-01-25 21:39:22 +09:00
Tomasz Sobczyk
1f7e5d3861 Add thread sanitized run for instrumented_learn and fix races. 2020-12-28 16:08:34 +09:00
Tomasz Sobczyk
acf95c7c98 Accumulate clipping statistics to a 64 bit integer to prevent overflow for larger batch sizes. 2020-12-25 10:04:28 +09:00
Tomasz Sobczyk
1b560efabd Correctly handle the last batch of data in sfen_reader 2020-12-25 10:03:24 +09:00
Tomasz Sobczyk
6d28d97a91 Don't unload evalfile on set nnue false 2020-12-25 09:58:24 +09:00
Tomasz Sobczyk
c1e69f450e Prevent q_ in loss calculation from reaching values that would produce NaN 2020-12-25 00:41:31 +09:00
Joost VandeVondele
bb6188430d Add split_count argument to shuffle_binpack.py
this optional argument allows for splitting the input binpack in multiple output binpacks while shuffling.
2020-12-25 00:40:40 +09:00
Tomasz Sobczyk
4f6fdca31f Reduce the amount of sfens buffered for the validation step.
Used to be 10M, now we bound it by a multiple of validation_count, and at most 1M. This reduces the RAM usage greatly.
2020-12-25 00:17:35 +09:00
Tomasz Sobczyk
7636bcccd1 Correctly account for factors when computing the average absolute weight of the feature transformer. 2020-12-25 00:08:51 +09:00
Tomasz Sobczyk
2061be4730 smart_fen_skipping at gensfen_nonpv level 2020-12-24 21:37:30 +09:00
Tomasz Sobczyk
868b4e9421 add gensfen_nonpv docs 2020-12-24 21:37:30 +09:00
Tomasz Sobczyk
96b377a90a Add gensfen_nonpv 2020-12-24 21:37:30 +09:00
Tomasz Sobczyk
3f73c40412 More deterministic move accuracy validation. 2020-12-24 10:16:59 +09:00
Joost VandeVondele
b50dcd7dde allow for repeated searches in rescoring
allows for repeating a depth N search K times.
Repeated searches improve the quality of eval, but don't bring in higher depth info.
Might allow for removing some of the noise in low depth scoring.
2020-12-24 09:46:10 +09:00
Tomasz Sobczyk
8ca82646a9 Use plain nnue eval for validation loss calculation instead of first performing qsearch 2020-12-22 10:35:19 +09:00
Tomasz Sobczyk
6853b4aac2 Simple filtering for validation data. 2020-12-22 09:40:25 +09:00
Tomasz Sobczyk
50df3a7389 fix annoying warning 2020-12-22 09:24:26 +09:00
Tomasz Sobczyk
994eb5e183 rescore_fen -> rescore. Make it work on .bin and .binpack inputs. 2020-12-21 10:48:20 +09:00
Tomasz Sobczyk
ffae19b5a1 Add docs for rescore_fen 2020-12-21 10:48:20 +09:00
Tomasz Sobczyk
a9cfaa4d98 Add a tool for rescoring fens from an epd file with fixed depth search 2020-12-21 10:48:20 +09:00
Tomasz Sobczyk
f56613ebf6 Add 'validation_count' option for 'learn' that specifies how many positions to use for validation 2020-12-20 09:47:30 +09:00
Tomasz Sobczyk
a7378f3249 Make next_fen in opening_book a critical section 2020-12-14 09:03:04 +09:00
Joost VandeVondele
76fbc5e3d0 Make score sign flip optional
Bug fix: flipping score is not needed for fishtest, make this optional.
2020-12-13 09:32:46 +09:00
kennyfrc
f4b4430380 remove unnecessary makefile commands and fix blas on mac 2020-12-13 09:31:52 +09:00
Joost VandeVondele
9c65e868f9 Enhance pgn_to_plain.py
in case a score can be parsed from the comment field in the pgn, add it to the output.
This form works for the fishtest pgns, and is quite common (cutechess-cli among others).
2020-12-11 00:33:34 +09:00
Tomasz Sobczyk
d99ba07b81 Fix incorrect enpassant flag for moves read from uci format in the binpack lib 2020-12-11 00:31:32 +09:00
Joost VandeVondele
b49fd3ab30 Add -lstdc++fs to the link line of gcc
older versions of gcc (<8.1) need this, even if they accept -std=c++17

with this patch, the code can be run on fishtest again,
at least by the majority of workers (fishtest doesn't require c++17 to be available)

See e.g.
https://tests.stockfishchess.org/tests/view/5fcfbf801ac1691201888235

Bench: 3820648
2020-12-09 08:40:34 +09:00
nodchip
ae045e2cd8 Merge pull request #258 from kennyfrc/stockfish-nnue-2020-08-30-macos
mac-compatible makefile with instructions for stockfish-nnue-2020-08-30
2020-12-09 08:39:36 +09:00
Kenn Costales
055f907315 Merge branch 'master' into stockfish-nnue-2020-08-30-macos 2020-12-08 22:49:11 +08:00
kennyfrc
bb26ce5aa1 mac specific makefile with compilation instructions 2020-12-08 22:14:18 +08:00
Tomasz Sobczyk
3a1bd1185f Add binpack coarse shuffle tool. 2020-12-06 19:08:52 +09:00
Tomasz Sobczyk
28d6d7cb03 Avoid computing gradient for validation loss. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
fafb9557a8 Get train loss from update_parameters. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
4eb0e77a2a Store references instead of copying the results of intermediate autograd computations. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
6cd0b03098 Add some comments regarding the current state of autograd loss computation. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
99cb869db3 Reintroduce use_wdl. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
cf6bc7ecaf Cleanup around get_loss 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
256c4b55ec Properly apply gradient norm clipping after it's scaled in the update_parameters. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
de675e3503 Reintroduce optional scaling of the teacher signal. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
01ae7b1e2c Simplify passing constants that may vary between calls. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
cbd973fdaa Detect constant expressions in autograd and return 0 grad early. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
e975889132 Move cross_entropy calculation to a separate function. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
891abf5511 Make the autograd loss expression chain thread_local. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
8adf00ae6e Identify a single evalation chain by ID in autograd to prevent cache reuse for subsequent evaluations of the same expression tree. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
cb812c742c Add [[nodiscard]] attributes to autograd functions. 2020-12-02 08:56:20 +09:00
Tomasz Sobczyk
26f19e1429 Make automatic differentiation node types constexpr. 2020-12-02 08:56:20 +09:00