nodchip
4cc98d80f8
Replaced the utility function to create a directory to std::filesystem.
2020-09-07 18:56:41 +09:00
nodchip
e004e47e5a
Commented out an unused function parameter to remove a compile warning.
2020-09-07 16:21:40 +09:00
nodchip
7d6668515c
Added -static link option to the learn and profile-learn targets.
2020-08-30 14:54:07 +09:00
nodchip and GitHub
bc90567e09
Merge pull request #94 from nodchip/nnue-player-merge-2020-08-28
...
Nnue player merge 2020 08 28
2020-08-30 09:27:12 +09:00
nodchip and GitHub
d258662383
Update README.md
2020-08-29 09:12:10 +09:00
nodchip
9f2f31632c
Fixed build errors.
2020-08-29 08:17:24 +09:00
nodchip
f7bc4e6e45
Fixed compilation errors.
2020-08-29 00:56:05 +09:00
nodchip
906c18eb46
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge-2020-08-28
...
# Conflicts:
# README.md
# src/Makefile
# src/search.cpp
# src/types.h
# src/uci.cpp
# src/ucioption.cpp
2020-08-28 11:26:11 +09:00
nodchip and GitHub
def6ec4d16
Merge pull request #90 from tttak/wdl_20200824
...
Use winning_percentage_wdl in learn
2020-08-28 10:06:33 +09:00
nodchip
763e72cc9f
Changed the default value of use_raw_nnue_eval. Updated a source code comment.
2020-08-27 23:49:58 +09:00
nodchip
9fc3ff4c30
Added use_raw_nnue_eval option to return raw NNUE eval value in evaluate().
2020-08-27 23:48:28 +09:00
nodchip
7ee8a2bbb7
Merge branch 'master' of github.com:nodchip/Stockfish
2020-08-22 12:19:46 +09:00
nodchip
87633b876c
Added an option to convert teacher signals to winning probabilities.
2020-08-22 12:19:29 +09:00
nodchip and GitHub
17d2b5bf17
Merge pull request #88 from tttak/convert_bin_from_pgn-extract_20200819
...
Modify convert_bin_from_pgn-extract
2020-08-21 23:34:39 +09:00
nodchip
e5e5d7d4ab
Merge branch 'master' of github.com:nodchip/Stockfish
2020-08-21 21:17:40 +09:00
nodchip
11752d4e63
Added options to scale the scores in training data. #71
2020-08-21 21:16:55 +09:00
nodchip
2646080543
Merge branch 'master' of github.com:nodchip/Stockfish
2020-08-15 11:58:05 +09:00
nodchip
79654ac509
Added winning_probability_coefficient option to specify the coefficient to calculate the winning probability from a value. #71
2020-08-15 11:57:08 +09:00
nodchip and GitHub
ee823afdad
Deleted a duplicated Readme.md.
2020-08-14 23:33:28 +09:00
nodchip
75b9d6f6b1
Fixed build parameters.
2020-08-11 16:37:47 +09:00
nodchip
35f04aaf24
Removed an unnecessary call for pos.is_draw().
2020-08-10 19:42:39 +09:00
nodchip
c420b327bf
Added output messages.
2020-08-10 16:23:04 +09:00
nodchip
8c0429d1e5
Added detect_draw_by_insufficient_mating_material option.
2020-08-10 16:14:56 +09:00
nodchip
84070c02e6
Renamed use_game_draw_adjudication to detect_draw_by_consecutive_low_score.
2020-08-10 16:02:18 +09:00
nodchip
5467ba3c23
Renamed use_hash_in_training to skip_duplicated_positions_in_training.
2020-08-10 15:58:17 +09:00
nodchip
87c50c5cbc
Renamed use_draw_in_validation to use_draw_games_in_validation.
...
Added comments.
2020-08-10 15:55:34 +09:00
nodchip
fa5b2aec3a
Renamed use_draw_in_training to use_draw_games_in_training.
2020-08-10 15:51:23 +09:00
nodchip
a41cbb9ca9
Renamed use_draw_in_training_data_generation option to write_out_draw_game_in_training_data_generation.
2020-08-10 15:49:24 +09:00
nodchip
3bd3ef0aea
Implemented the code to detect draw by insufficient mating material.
2020-08-10 15:47:11 +09:00
nodchip
4a87d7b787
Added the use_game_draw_adjudication option.
2020-08-10 15:44:58 +09:00
nodchip
12c6c2f550
Chagned to use the search value instead of the value of the PV leaf to avoid crash by assertion.
2020-08-10 13:07:22 +09:00
nodchip
bac96aa04a
Changed to use TB in the training data generator. #67
2020-08-10 12:17:26 +09:00
nodchip
e65c515d6b
Changed to specify the current tick as a random seed. #68
2020-08-10 12:09:21 +09:00
nodchip
643be3c6f9
Changed not to use std::random_device(). Because it always returns the same integers on MingW. #68
2020-08-10 10:45:03 +09:00
nodchip and GitHub
53d15e5ec2
Merge pull request #79 from nodchip/nnue-player-merge
...
Merge Stockfish master to nodchip's repository
2020-08-10 09:51:44 +09:00
nodchip
4260ed0c7f
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge
2020-08-10 08:52:55 +09:00
nodchip
4f97d3446d
Cleaned up source code.
2020-08-10 08:52:34 +09:00
nodchip
7f1f08d094
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge
...
# Conflicts:
# README.md
2020-08-09 09:19:47 +09:00
nodchip
fcd70a3c81
Updated README.md.
...
Bench: 4067325
2020-08-08 21:00:19 +09:00
nodchip
3b5de9f18b
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge
2020-08-08 19:47:32 +09:00
nodchip
22b85810fe
Re-added the code to skip loading a net file.
2020-08-08 19:04:08 +09:00
nodchip
4f94f29f39
Revert "Fixed a bug that the training data generation crashes if eval_limit is high."
...
This reverts commit b0d28ac3ab .
2020-08-08 18:38:02 +09:00
nodchip
9a0b20d3fc
Changed to show if NNUE is used in the training data generator.
2020-08-08 18:24:09 +09:00
nodchip
b0d28ac3ab
Fixed a bug that the training data generation crashes if eval_limit is high.
2020-08-08 18:23:11 +09:00
nodchip
70d88364fe
Fixed a bug that the training data generation crashes.
2020-08-08 18:22:29 +09:00
nodchip
ed4d007e3c
Fixed a bug that the training data generator crahses on memory allocation.
2020-08-08 18:21:38 +09:00
nodchip
2395833c07
Re-added commands for training data generator and trainer.
2020-08-08 16:52:18 +09:00
nodchip
fa649ba1e2
Removed a compile warning.
2020-08-08 16:17:55 +09:00
nodchip
2c9075e919
Fixed Makefile to fix build.
2020-08-08 16:05:05 +09:00
nodchip
55a6b2bdc4
Merge branch 'master' of github.com:official-stockfish/Stockfish into nnue-player-merge
...
# Conflicts:
# README.md
# Readme.md
# src/Makefile
# src/evaluate.cpp
# src/evaluate.h
# src/misc.cpp
# src/nnue/architectures/halfkp_256x2-32-32.h
# src/nnue/evaluate_nnue.cpp
# src/nnue/evaluate_nnue.h
# src/nnue/features/feature_set.h
# src/nnue/features/features_common.h
# src/nnue/features/half_kp.cpp
# src/nnue/features/half_kp.h
# src/nnue/features/index_list.h
# src/nnue/layers/affine_transform.h
# src/nnue/layers/clipped_relu.h
# src/nnue/layers/input_slice.h
# src/nnue/nnue_accumulator.h
# src/nnue/nnue_architecture.h
# src/nnue/nnue_common.h
# src/nnue/nnue_feature_transformer.h
# src/position.cpp
# src/position.h
# src/types.h
# src/ucioption.cpp
# stockfish.md
2020-08-08 15:55:42 +09:00
nodchip
1abae04ceb
Fixed Makefile.
2020-08-07 23:00:11 +09:00
nodchip
bf7d02578e
Fixed build errors.
2020-08-07 22:47:45 +09:00
nodchip
1c23465383
Moved the nnue folder.
2020-08-07 22:34:53 +09:00
nodchip and Joost VandeVondele
84f3e86790
Add NNUE evaluation
...
This patch ports the efficiently updatable neural network (NNUE) evaluation to Stockfish.
Both the NNUE and the classical evaluations are available, and can be used to
assign a value to a position that is later used in alpha-beta (PVS) search to find the
best move. The classical evaluation computes this value as a function of various chess
concepts, handcrafted by experts, tested and tuned using fishtest. The NNUE evaluation
computes this value with a neural network based on basic inputs. The network is optimized
and trained on the evalutions of millions of positions at moderate search depth.
The NNUE evaluation was first introduced in shogi, and ported to Stockfish afterward.
It can be evaluated efficiently on CPUs, and exploits the fact that only parts
of the neural network need to be updated after a typical chess move.
[The nodchip repository](https://github.com/nodchip/Stockfish ) provides additional
tools to train and develop the NNUE networks.
This patch is the result of contributions of various authors, from various communities,
including: nodchip, ynasu87, yaneurao (initial port and NNUE authors), domschl, FireFather,
rqs, xXH4CKST3RXx, tttak, zz4032, joergoster, mstembera, nguyenpham, erbsenzaehler,
dorzechowski, and vondele.
This new evaluation needed various changes to fishtest and the corresponding infrastructure,
for which tomtor, ppigazzini, noobpwnftw, daylen, and vondele are gratefully acknowledged.
The first networks have been provided by gekkehenker and sergiovieri, with the latter
net (nn-97f742aaefcd.nnue) being the current default.
The evaluation function can be selected at run time with the `Use NNUE` (true/false) UCI option,
provided the `EvalFile` option points the the network file (depending on the GUI, with full path).
The performance of the NNUE evaluation relative to the classical evaluation depends somewhat on
the hardware, and is expected to improve quickly, but is currently on > 80 Elo on fishtest:
60000 @ 10+0.1 th 1
https://tests.stockfishchess.org/tests/view/5f28fe6ea5abc164f05e4c4c
ELO: 92.77 +-2.1 (95%) LOS: 100.0%
Total: 60000 W: 24193 L: 8543 D: 27264
Ptnml(0-2): 609, 3850, 9708, 10948, 4885
40000 @ 20+0.2 th 8
https://tests.stockfishchess.org/tests/view/5f290229a5abc164f05e4c58
ELO: 89.47 +-2.0 (95%) LOS: 100.0%
Total: 40000 W: 12756 L: 2677 D: 24567
Ptnml(0-2): 74, 1583, 8550, 7776, 2017
At the same time, the impact on the classical evaluation remains minimal, causing no significant
regression:
sprt @ 10+0.1 th 1
https://tests.stockfishchess.org/tests/view/5f2906a2a5abc164f05e4c5b
LLR: 2.94 (-2.94,2.94) {-6.00,-4.00}
Total: 34936 W: 6502 L: 6825 D: 21609
Ptnml(0-2): 571, 4082, 8434, 3861, 520
sprt @ 60+0.6 th 1
https://tests.stockfishchess.org/tests/view/5f2906cfa5abc164f05e4c5d
LLR: 2.93 (-2.94,2.94) {-6.00,-4.00}
Total: 10088 W: 1232 L: 1265 D: 7591
Ptnml(0-2): 49, 914, 3170, 843, 68
The needed networks can be found at https://tests.stockfishchess.org/nns
It is recommended to use the default one as indicated by the `EvalFile` UCI option.
Guidelines for testing new nets can be found at
https://github.com/glinscott/fishtest/wiki/Creating-my-first-test#nnue-net-tests
Integration has been discussed in various issues:
https://github.com/official-stockfish/Stockfish/issues/2823
https://github.com/official-stockfish/Stockfish/issues/2728
The integration branch will be closed after the merge:
https://github.com/official-stockfish/Stockfish/pull/2825
https://github.com/official-stockfish/Stockfish/tree/nnue-player-wip
closes https://github.com/official-stockfish/Stockfish/pull/2912
This will be an exciting time for computer chess, looking forward to seeing the evolution of
this approach.
Bench: 4746616
2020-08-06 16:37:45 +02:00
nodchip
c0e1235fef
Added a description to Makefile.
2020-07-20 17:36:09 +09:00
nodchip
fbdb373b64
Changed to set the binary directory to the current working directory.
2020-07-20 17:17:50 +09:00
nodchip
afd7d0ea4d
Fixed a bug that Makefile specifies -mpopcnt for armv8-a.
2020-07-19 18:34:35 +09:00
nodchip
36092b855a
Removed the x86-64-ssse3-popcnt architecture.
2020-07-19 14:17:35 +09:00
nodchip
3bbe4802b1
Removed the sse41-popcnt architecture.
2020-07-19 14:02:49 +09:00
nodchip
c001a4e62d
Revert "Removed x86-64-ssse3-popcnt and x86-64-sse41-popcnt."
...
This reverts commit 92c2167481 .
2020-07-19 13:58:19 +09:00
nodchip
92c2167481
Removed x86-64-ssse3-popcnt and x86-64-sse41-popcnt.
2020-07-19 12:52:20 +09:00
nodchip
a4786db4c2
Added support for architectures which supports SSE3+POPCNT, SSSE3+POPCNT and SSE41+POPCNT.
2020-07-19 12:41:50 +09:00
nodchip
c24ad8d8b5
Supported sse3 build.
2020-07-19 12:26:37 +09:00
nodchip
7a13d4ed60
Changed the default eval file path so that more GUIs can use Stockfish NNUE.
2020-07-17 15:40:01 +09:00
nodchip and GitHub
2b821682aa
Update README.md
2020-07-17 11:55:30 +09:00
nodchip
7f4b72cdfd
Merge branch 'master' of github.com:nodchip/Stockfish
2020-07-13 22:25:56 +09:00
nodchip
686a5a0df9
Fixed a bug that gensfen command does not accept the use_draw_in_training_data_generation option.
2020-07-13 22:25:23 +09:00
nodchip and GitHub
ae4db5ebfd
Merge pull request #45 from joergoster/sf-nnue-update
...
Sf nnue update
2020-07-11 19:17:38 +09:00
nodchip
d7c358cf19
Fixed descriptions and sanity checks in Makefile.
2020-07-10 16:55:32 +09:00
nodchip
bc6a8d09e9
Unified the nnue-learn and nnue-learn-use-blas targets into nnue-learn.
2020-07-10 16:17:35 +09:00
nodchip
df05ecb1d5
Added halfkp_384x2-32-32.
2020-07-10 16:14:19 +09:00
nodchip
1de1eb2d0d
Refactoring: Restructured the architecture list in Makefile.
2020-07-10 16:13:21 +09:00
nodchip and GitHub
272f0f88c3
Merge pull request #40 from FireFather/master
...
Update evaluate_nnue_learner.cpp
2020-07-08 20:52:39 +09:00
nodchip
288fdc5597
Added "nodes" option to the "gensfen" command to specify the number of the nodes to be searched.
2020-07-06 17:38:43 +09:00
nodchip
85c802d0b9
Revert "use winning_percentage_wdl in learn"
...
This reverts commit c964e902c5 .
# Conflicts:
# src/uci.cpp
2020-07-06 11:07:46 +09:00
nodchip and GitHub
3b535b5ade
Merge pull request #36 from tttak/WDL_20200703b
...
use winning_percentage_wdl in learn
2020-07-04 07:36:33 +09:00
nodchip and GitHub
cea5240909
Merge branch 'master' into WDL_20200703b
2020-07-04 07:36:16 +09:00
nodchip
c8262f8aec
Fixed a compile error.
2020-06-30 15:58:51 +09:00
nodchip and GitHub
9dc62809c8
Merge pull request #24 from FireFather/master
...
Comment translation
2020-06-28 11:43:53 +09:00
nodchip and GitHub
123dd68452
Merge branch 'master' into master
2020-06-28 11:42:23 +09:00
nodchip
f1a8580118
Merge branch 'master' of github.com:nodchip/Stockfish
2020-06-28 11:37:42 +09:00
nodchip
87c8b324f8
Simplified source code to estimate the winning ratio from an eval value.
...
We need to adjust the eta again after this commit is pushed.
2020-06-28 11:37:15 +09:00
nodchip and GitHub
6324c2de75
Merge pull request #23 from joergoster/linux_sse41
...
Linux sse41
2020-06-28 10:29:14 +09:00
nodchip
cb8accada2
Merge branch 'master' of github.com:nodchip/Stockfish
2020-06-27 22:19:33 +09:00
nodchip
13eb540020
Changed the formula to calculate winning ratio to 1/(1+10^(-Eval/4)).
2020-06-27 22:19:22 +09:00
nodchip
aa2dc962f5
Added use_draw_in_training_data_generation option to write out draw games to the training data.
2020-06-27 14:00:12 +09:00
nodchip and GitHub
1c8a931309
Merge pull request #18 from joergoster/sf-nnue-nodchip
...
Update to SF master
2020-06-25 23:09:45 +09:00
nodchip and GitHub
ff31d92b94
Merge pull request #14 from joergoster/sf-nnue-nodchip
...
Update to SF master
2020-06-25 10:38:16 +09:00
nodchip and GitHub
7818d23afb
Merge pull request #13 from zz4032/linux-identifier
...
Linux identifier corrected.
2020-06-24 09:35:44 +09:00
nodchip
0abd692543
Fixed a build error on Visual Studio.
2020-06-24 09:33:46 +09:00
nodchip
999f5ec446
COMP=msys2を指定できるようにした
2020-06-24 00:47:34 +09:00
nodchip
43e78187d7
ARCH=x86-64-avx2を指定できるようにした
2020-06-24 00:27:45 +09:00
nodchip
76b0de40a1
コンパイラーオプションを-std=c++14から-std=c++17に変更した
2020-06-23 23:47:59 +09:00
nodchip
c7884470fb
Merge branch 'master' of github.com:nodchip/Stockfish
2020-06-22 10:28:02 +09:00
nodchip
6c7a594362
Added "-Wl,-s" option.
2020-06-22 10:27:52 +09:00
nodchip
33772a0418
コンパイルエラーを修正した
2020-06-08 23:46:06 +09:00
nodchip
5c936572e9
Merge branch 'master' of github.com:official-stockfish/Stockfish
...
# Conflicts:
# src/Makefile
# src/position.cpp
# src/position.h
# src/search.cpp
# src/types.h
# src/uci.cpp
2020-06-08 23:09:51 +09:00
nodchip
d23f96d156
No pruning at low plies.
...
This makes those very early depths a bit more reliable.
Thanks, joergoster!
https://github.com/joergoster/Stockfish-NNUE/commit/be7f37187b85b8093ae0741909cbfd7b2bc76871
2020-06-06 18:50:15 +09:00
nodchip
2523f72ff9
盤上から取り除かれた駒に関する差分計算を省き、高速化した
2020-06-03 23:32:08 +09:00
nodchip
a85e3055f4
いくつかのターゲットでOpenMPを有効にした
2020-06-02 00:13:35 +09:00