Commit Graph

5260 Commits

Author SHA1 Message Date
Tomasz Sobczyk
c76bb34a96 Add convert UCI function that allows conversion of files between any of plain, bin, and binpack. Usage: convert infile outfile [append]. 2020-09-11 09:36:24 +09:00
nodchip
ac6e6f73f2 Added EnableTranspositionTable UCI option to enable/disable transposition table. 2020-09-11 09:20:48 +09:00
Tomasz Sobczyk
59402d4a6d Include <climits> for CHAR_BIT. Test both formats in instrumented learn. 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
7e6901af27 Remove unused immintring. Include intrin.h only on some platforms, otherwise builtins are used. 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
53ad4d8b56 A speculative build fix for linux. 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
a7ca826593 MIT license/copyright notice in the library file. 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
585a5351bf Fix warnings. 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
6b76ebc2ca Support for binpack format in sfenreader in learner. Automatically detect file extension and choose the correct reader (bin or binpack) 2020-09-10 21:19:37 +09:00
Tomasz Sobczyk
020e66d2e6 Add "sfen_format" option in gensfen. Valid values are "bin" and "binpack". It determines the output format of the sfens. Binpack is a highly compressed formats for consecutive sfens. Extension is now determined by the used format, output_file_name should contain just the stem. 2020-09-10 21:19:37 +09:00
nodchip
94f3cae760 Changed a sentence. 2020-09-10 08:23:21 +09:00
nodchip
e63b6088ba Changed a option name more descriptive, "Training" -> "PruneAtShallowDepthOnPvNode". The default value was changed but the default behavior is not changed.
Changed to set a global option prune_at_shallow_depth_on_pv_node on a callback function.
2020-09-10 08:19:54 +09:00
Joost VandeVondele
e0a9860708 Upgrade CI distro, remove special cases, fix one more warning 2020-09-10 08:15:15 +09:00
nodchip
9dcadfa642 Removed compile warnings. 2020-09-09 23:02:39 +09:00
nodchip
7bd4688747 Remove compile warnings. 2020-09-09 23:02:39 +09:00
Joost VandeVondele
17d42e023e add more CI, instrumented runs 2020-09-09 19:40:43 +09:00
nodchip
4206a1edd0 Renamed parameters to avoid shadowing other parameters. 2020-09-09 10:26:42 +09:00
nodchip
1864845811 Commented out unused parameters. 2020-09-09 10:26:42 +09:00
nodchip
2583f68972 Removed macros for KPP evaluate functions. 2020-09-09 10:26:42 +09:00
nodchip
cea17c92f9 Simplified evaluate_common.h. 2020-09-09 10:26:42 +09:00
nodchip
8d763fb503 Removed LEARN_GENSFEN_USE_DRAW_RESULT macro. 2020-09-09 10:26:42 +09:00
nodchip
eafa569365 Removed macros for KPP factorization. 2020-09-09 10:26:42 +09:00
nodchip
5e25702672 Removed USE_TRIANGLE_WEIGHT_ARRAY macro. 2020-09-09 10:26:42 +09:00
nodchip
f52165e1d3 Removed RESET_TO_ZERO_VECTOR macro. 2020-09-09 10:26:42 +09:00
nodchip
dbad9d96e0 Removed LOSS_FUNCTION_IS_ELMO_METHOD macro. 2020-09-09 10:26:42 +09:00
nodchip
ef1601218d Removed LOSS_FUNCTION_IS_CROSS_ENTOROPY_FOR_VALUE macro. 2020-09-09 10:26:42 +09:00
nodchip
f52fbf8006 Removed LOSS_FUNCTION_IS_CROSS_ENTOROPY macro. 2020-09-09 10:26:42 +09:00
nodchip
d37eb63581 Removed LOSS_FUNCTION_IS_WINNING_PERCENTAGE macro. 2020-09-09 10:26:42 +09:00
nodchip
f3a158725d Removed SGD_UPDATE macro. 2020-09-09 10:26:42 +09:00
nodchip
0271d70775 Removed ADA_GRAD_UPDATE macro. 2020-09-09 10:26:42 +09:00
nodchip
05d26499b4 Removed LEARN_ELMO_METHOD macro. 2020-09-09 10:26:42 +09:00
nodchip
82dc68ba9f Removed #if for USE_GLOBAL_OPTIONS. 2020-09-09 10:26:42 +09:00
nodchip
aa2452caf3 Removed #if for USE_EVAL_HASH. 2020-09-09 10:26:42 +09:00
nodchip
ec96409176 Replaced DNDEBUG macro to _DEBUG macro. 2020-09-09 10:26:42 +09:00
nodchip
04a9a951b8 Removed "#if 0" and "#if 1". 2020-09-09 10:26:42 +09:00
nodchip
458771a181 Removed GENSFEN2019 macro. 2020-09-09 10:26:42 +09:00
nodchip
1d00d00241 Removed ENABLE_TEST_CMD macro. 2020-09-09 10:26:42 +09:00
nodchip
21cfead52c Removed unused OMP_ macro. 2020-09-09 10:26:42 +09:00
nodchip
e6a6ba5221 Removed USE_BOOK macro. 2020-09-09 10:26:42 +09:00
nodchip
a6013557f2 Removed EVAL_NNUE macro. 2020-09-09 10:26:42 +09:00
SFisGOD
0405f35403 Double probability of using classical eval
This patch doubles the moderate imbalance threshold and probability of using classical eval.
So now if imbalance is greater than PawnValueMg / 4 then there is a 1/8 chance of using classical eval.

STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 10984 W: 1303 L: 1140 D: 8541
Ptnml(0-2): 58, 867, 3489, 1010, 68
https://tests.stockfishchess.org/tests/view/5f554c9f97da2d5437d3813e

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 43064 W: 2476 L: 2276 D: 38312
Ptnml(0-2): 37, 1985, 17308, 2145, 57
https://tests.stockfishchess.org/tests/view/5f55690a00a0aa2ca79f0a43

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

Bench: 4161067
2020-09-08 22:56:08 +02:00
Gian-Carlo Pascutto
d2562cde12 Always re-enable NNUE after "bench".
Restore the default NNUE setting (enabled) after a bench command.
This also makes the resulting program settings independent of the
number of FENs that are being benched.

Fixes issue #3112.

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

No functional change.
2020-09-08 22:53:50 +02:00
syzygy1
fc27d158c0 Bug fix in do_null_move() and NNUE simplification.
This fixes #3108 and removes some NNUE code that is currently not used.

At the moment, do_null_move() copies the accumulator from the previous
state into the new state, which is correct. It then clears the "computed_score"
flag because the side to move has changed, and with the other side to move
NNUE will return a completely different evaluation (normally with changed
sign but also with different NNUE-internal tempo bonus).

The problem is that do_null_move() clears the wrong flag. It clears the
computed_score flag of the old state, not of the new state. It turns out
that this almost never affects the search. For example, fixing it does not
change the current bench (but it does change the previous bench). This is
because the search code usually avoids calling evaluate() after a null move.

This PR corrects do_null_move() by removing the computed_score flag altogether.
The flag is not needed because nnue_evaluate() is never called twice on a position.

This PR also removes some unnecessary {}s and inserts a few blank lines
in the modified NNUE files in line with SF coding style.

Resulf ot STC non-regression test:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 26328 W: 3118 L: 3012 D: 20198
Ptnml(0-2): 126, 2208, 8397, 2300, 133
https://tests.stockfishchess.org/tests/view/5f553ccc2d02727c56b36db1

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

bench: 4109324
2020-09-08 22:53:17 +02:00
Tomasz Sobczyk
41b7674aee Improve comments, break long lines. 2020-09-08 20:07:30 +09:00
Tomasz Sobczyk
0202218f58 fix cast 2020-09-08 20:07:30 +09:00
Tomasz Sobczyk
a0b2d6a01e Note a potential defect in sfen packer. 2020-09-08 20:07:30 +09:00
Tomasz Sobczyk
1482e5215a A second batch of code reorganization. 2020-09-08 20:07:30 +09:00
Tomasz Sobczyk
832c414b0d First batch of reorganization. 2020-09-08 20:07:30 +09:00
noobpwnftw
58863c3243 Update gensfen.cpp 2020-09-08 13:22:41 +09:00
Joost VandeVondele
6e8f82ad76 Fix small CI failures
1) Only access UCI option if defined
2) disable -Werror for now.
3) disable a few target that don't have _mm_malloc.
4) Add profile-learn target, with small speedup.
5) just test on Linux + gcc (skip macOS, unclear openblas, skip linux+clang, unclear omp/std::filesystem).
2020-09-08 09:14:49 +09:00
Tomasz Sobczyk
e638d66bbe Only add -s flag to the linker if debug=no 2020-09-08 09:10:58 +09:00