Commit Graph

5422 Commits

Author SHA1 Message Date
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
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
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
Joost VandeVondele
61bc8d12d3 Fix some races in learning
declare a few variables atomic.

Other races remain...
2020-09-19 10:09:30 +09:00
Joost VandeVondele
e8472b5fbe Fix races in gensfen as detected with thread sanitizer.
RootInTB was an incorrectly shared global, probably leading to wrong scoreing

Minor:
 setting TB global state from input by all threads (all threads write same values)
 setting Limits global state by all threads (idem)
 thread counting for finalization

CI can be enabled once races are fixed in the learner, manually goes like:
```
make clean && make -j2 ARCH=x86-64-modern sanitize=thread    optimize=no debug=yes build
../tests/instrumented_learn.sh --sanitizer-thread
```

Needs some review.
2020-09-19 10:08:44 +09:00
noobpwnftw
26f63fe741 Merge remote-tracking branch 'remotes/origin/master' into trainer 2020-09-19 03:38:37 +08:00
noobpwnftw
a47a3bfc7c Merge remote-tracking branch 'remotes/nodchip/master' into trainer 2020-09-19 02:14:17 +08:00
syzygy1
8b8a510fd6 Use tiling to speed up accumulator refreshes and updates
Perform the update and refresh operations tile by tile in a local
array of vectors. By selecting the array size carefully, we
achieve that the compiler keeps the whole array in vector registers.

Idea and original implementation by @sf-x.

STC: https://tests.stockfishchess.org/tests/view/5f623eec912c15f19854b855
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 4872 W: 623 L: 477 D: 3772
Ptnml(0-2): 14, 350, 1585, 450, 37

LTC: https://tests.stockfishchess.org/tests/view/5f62434e912c15f19854b860
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 25808 W: 1565 L: 1401 D: 22842
Ptnml(0-2): 23, 1186, 10332, 1330, 33

closes https://github.com/official-stockfish/Stockfish/pull/3130

No functional change
2020-09-17 17:24:52 +02:00
Unai Corzo
64a63464d7 Simplify futility pruning for captures
STC https://tests.stockfishchess.org/tests/view/5f61f0e4b91f2ec371e429c2
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 75512 W: 8747 L: 8704 D: 58061
Ptnml(0-2): 440, 6589, 23683, 6576, 468

LTC https://tests.stockfishchess.org/tests/view/5f6215d3912c15f19854b801
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 92912 W: 5030 L: 4992 D: 82890
Ptnml(0-2): 88, 4363, 37532, 4369, 104

closes https://github.com/official-stockfish/Stockfish/pull/3129

bench: 3856086
2020-09-17 07:06:21 +02:00
Unai Corzo
0ca93c5b94 Remove castling extension
STC https://tests.stockfishchess.org/tests/view/5f5fa5348fbc1c8a3f476eca
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 38520 W: 4713 L: 4610 D: 29197
Ptnml(0-2): 233, 3486, 11734, 3559, 248

LTC https://tests.stockfishchess.org/tests/view/5f62166a912c15f19854b806
LLR: 2.93 (-2.94,2.94) {-0.75,0.25}
Total: 48024 W: 2673 L: 2600 D: 42751
Ptnml(0-2): 64, 2247, 19316, 2322, 63

closes https://github.com/official-stockfish/Stockfish/pull/3128

bench: 3818400
2020-09-17 07:06:21 +02:00
GoldenRare
df43805953 Added FEN string to bench output
fixes https://github.com/official-stockfish/Stockfish/pull/3117

closes https://github.com/official-stockfish/Stockfish/pull/3118

No functional change
2020-09-17 07:06:21 +02:00
syzygy1
d86663af14 Improve NDK section in Makefile
This PR sets the "comp" variable simply to "clang",
which seems to be more consistent and allows a small simplification.

The PR also moves the section that sets "profile_make" and "profile_use" to after the NDK section,
which ensures that these variables are now set correctly for NDK/clang.

closes https://github.com/official-stockfish/Stockfish/pull/3121

No functional change
2020-09-16 21:00:14 +02:00
xoto10
5f426d8667 Use 2 * bestMoveChanges.
NNUE appears to provide a more stable eval than the classic eval,
so the time use dependencies on bestMoveChanges, fallingEval,
etc may need to change to make the best use of available time.
This change doubles the effect of totBestMoveChanges when giving
more time because the choice of best move is unstable.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 101928 W: 11995 L: 11698 D: 78235 Elo +0.78
Ptnml(0-2): 592, 8707, 32103, 8936, 626
https://tests.stockfishchess.org/tests/view/5f538a462d02727c56b36cec

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 186392 W: 10383 L: 9877 D: 166132 Elo +0.81
Ptnml(0-2): 207, 8370, 75539, 8870, 210
https://tests.stockfishchess.org/tests/view/5f54a9712d02727c56b36d5a

closes https://github.com/official-stockfish/Stockfish/pull/3119

Bench 4222126
2020-09-16 20:56:40 +02:00
Tomasz Sobczyk
184bde47dc Add "seed" option to gensfen and learn 2020-09-16 23:09:45 +09:00
Tomasz Sobczyk
efca5d561f More PRNG seeding options 2020-09-16 23:09:45 +09:00
Tomasz Sobczyk
bc9be5a71f Allow setting PRNG seed 2020-09-16 23:09:45 +09:00
nodchip
6ae09ba266 Fixed a bug that the root color is wrong. 2020-09-16 12:10:35 +09:00
Joseph Ellis
d160436921 Update description for PruneAtShallowDepthOnPvNode 2020-09-16 10:01:09 +09:00
Sergio Vieri
7135678f71 Update default net to nn-03744f8d56d8.nnue
Equivalent to 20200914-1520

closes https://github.com/official-stockfish/Stockfish/pull/3123

Bench: 4222126
2020-09-15 07:21:04 +02:00
mckx00
35ab8254b7 Simplify StatSCore Initialization
No need to initialize StatScore at rootNode. Current Logic is redundant because at subsequent levels the grandchildren statScore is initialized to zero.

closes https://github.com/official-stockfish/Stockfish/pull/3122

Non functional change.
2020-09-15 07:19:02 +02:00
nodchip
ea5d437dbb Merge pull request #143 from Sopel97/no_eval_learn
Remove EVAL_LEARN and *learn* targets.
2020-09-14 14:37:50 +09:00
nodchip
f579beec5d Merge pull request #150 from vondele/CIconvertPlain01
add convert_plain to CI
2020-09-14 08:19:23 +09:00
Joost VandeVondele
5d088e02c8 add convert_plain to CI 2020-09-13 19:16:27 +02:00
Tomasz Sobczyk
30a1bc4c64 Change default value of "PruneAtShallowDepthOnPvNode" so that the bench matches master. 2020-09-13 14:19:30 +02:00
Tomasz Sobczyk
89f38c938b Don't prompt when the training data file doesn't exist when trying to delete it 2020-09-13 13:52:42 +02:00
Tomasz Sobczyk
2e2de7607b Add extension to the PGO_TRAINING_DATA_FILE so that the generated file name matches the one we try to delete. 2020-09-13 13:47:19 +02:00
Tomasz Sobczyk
e4a4f4001f parametrize the name of the training data file generated during pgo 2020-09-13 13:44:19 +02:00
Tomasz Sobczyk
9ee8ce67bf Move removal of generate training data file to profileclean. 2020-09-13 13:42:13 +02:00