Tomasz Sobczyk
c2511ffc7b
Renaming and small changes.
2021-04-19 19:05:37 +02:00
Tomasz Sobczyk
ba32bd5d70
Bring the changes closer to official-stockfish/master
2021-04-19 18:57:21 +02:00
Tomasz Sobczyk
19f712cdbb
Post-merge fixes.
2021-04-18 20:33:49 +02:00
Tomasz Sobczyk
08e255960d
Merge remote-tracking branch 'upstream/master' into data_generation
2021-04-18 19:45:46 +02:00
Tomasz Sobczyk
f1d4c1c896
remove useless stuff
2021-04-18 19:24:23 +02:00
Tomasz Sobczyk
696e849a30
learn -> tools
2021-04-18 19:18:41 +02:00
Tomasz Sobczyk
8169de72e2
asd
2021-04-18 19:04:37 +02:00
Tomasz Sobczyk
3101ae7973
remove learn
2021-04-18 19:04:14 +02:00
Tomasz Sobczyk
17946c5954
Merge pull request #322 from fsmosca/tb-issue-6
...
Fix ranking of root moves by TB
2021-04-17 00:22:28 +02:00
dsmsgms
a7ab92ec25
Use classical eval for Bishop vs Pawns
...
NNUE evaluation is incapable of recognizing trivially drawn bishop endgames
(the wrong-colored rook pawn), which are in fact ubiquitous and stock standard
in chess analysis. Switching off NNUE evaluation in KBPs vs KPs endgames is
a measure that stops Stockfish from trading down to a drawn version of these
endings when we presumably have advantage. The patch is able to edge over master
in endgame positions.
Patch tested for Elo gain with the "endgame.epd" book, and verified for
non-regression with our usual book (see the pull request for details).
STC:
LLR: 2.93 (-2.94,2.94) {-0.20,1.10}
Total: 33232 W: 6655 L: 6497 D: 20080
Ptnml(0-2): 4, 2342, 11769, 2494, 7
https://tests.stockfishchess.org/tests/view/6074a52981417533789605b8
LTC:
LLR: 2.93 (-2.94,2.94) {0.20,0.90}
Total: 159056 W: 29799 L: 29378 D: 99879
Ptnml(0-2): 7, 9004, 61085, 9425, 7
https://tests.stockfishchess.org/tests/view/6074c39a81417533789605ca
Closes https://github.com/official-stockfish/Stockfish/pull/3427
Bench: 4503918
blah
2021-04-15 12:45:39 +02:00
Tomasz Sobczyk
255514fb29
Documentation patch: AppendChangedIndices
...
Clarify the assumptions on the position passed to the AppendChangedIndices().
Closes https://github.com/official-stockfish/Stockfish/pull/3428
No functional change
2021-04-15 12:21:30 +02:00
Vizvezdenec
14d162d9f4
Simplification: last capture extension
...
The code for last capture extension can be removed in current master.
Passed STC
LLR: 2.95 (-2.94,2.94) {-1.00,0.20}
Total: 85024 W: 7754 L: 7707 D: 69563
Ptnml(0-2): 293, 5991, 29914, 6004, 310
https://tests.stockfishchess.org/tests/view/607690f1814175337896068f
Passed LTC
LLR: 2.96 (-2.94,2.94) {-0.70,0.20}
Total: 39880 W: 1503 L: 1453 D: 36924
Ptnml(0-2): 17, 1281, 17293, 1333, 16
https://tests.stockfishchess.org/tests/view/6076ccbe814175337896069e
Closes https://github.com/official-stockfish/Stockfish/pull/3430
Bench: 4202264
2021-04-15 11:41:30 +02:00
Stéphane Nicolet
4889cf22bb
Revert previous patch
...
Revert the previous patch about move generation, as it unexpectedly
changed the bench. Better to take the time to understand the issue.
Bench: 4191632
2021-04-15 11:19:44 +02:00
bmc4
79bb28281c
Merge all move generators
...
Merging `generate<EVASIONS>` and `generate<QUIET_CHECKS>` into `generate_all()`.
STC:
LLR: 2.94 (-2.94,2.94) {-1.00,0.20}
Total: 161800 W: 14585 L: 14624 D: 132591
Ptnml(0-2): 577, 11681, 56451, 11586, 605
https://tests.stockfishchess.org/tests/view/606532732b2df919fd5f026d
LTC:
LLR: 2.98 (-2.94,2.94) {-0.70,0.20}
Total: 188504 W: 6906 L: 6961 D: 174637
Ptnml(0-2): 87, 6272, 81610, 6175, 108
https://tests.stockfishchess.org/tests/view/6065b0772b2df919fd5f02ae
------------
Verified for correctness of `EVASIONS` by running perft:
```
./stockfish b3nch 16 1 6 default perft (replace 3 by e in b3nch)
Nodes searched : 71608931810
```
Also tested for correctness on Chess960 with a similar code shown here:
https://github.com/official-stockfish/Stockfish/pull/3418#issuecomment-816630295
```
./stockfish b3nch 16 1 6 fischer.txt perft
Nodes searched : 506736009395
```
------------
Closes https://github.com/official-stockfish/Stockfish/pull/3418
No functional change
2021-04-15 10:53:51 +02:00
fsmosca
744533c2cf
Fix ranking of root moves by TB
2021-04-13 18:54:54 +08:00
fsmosca
44f4d6f617
Fix ranking of root moves by TB
2021-04-13 18:54:19 +08:00
fsmosca
8748fd49b3
Fix include path in tbprobe
2021-04-10 19:11:38 +09:00
fsmosca
dfa53e4062
Fix some include paths in tbprobe
2021-04-10 19:11:38 +09:00
Vizvezdenec
3dfda1b28e
Replace distanceFromPv with a better logic
...
This patch removes the recently introduced distanceFromPv logic, and replaces
it with following logic: if reduction of moves with low movecount is really
negative, we search them deeper than the first move.
passed STC:
LLR: 2.95 (-2.94,2.94) {-0.20,1.10}
Total: 153008 W: 13913 L: 13579 D: 125516
Ptnml(0-2): 547, 10811, 53470, 11113, 563
https://tests.stockfishchess.org/tests/view/6069c9d02b2df919fd5f04d2
passed LTC:
LLR: 2.94 (-2.94,2.94) {0.20,0.90}
Total: 101920 W: 3964 L: 3699 D: 94257
Ptnml(0-2): 55, 3279, 44019, 3560, 47
https://tests.stockfishchess.org/tests/view/606a99fd2b2df919fd5f0532
Closes https://github.com/official-stockfish/Stockfish/pull/3421
Bench: 4191632
2021-04-06 18:23:35 +02:00
Stéphane Nicolet
f40913f7f6
Keep more pawns
...
This patch increases the weight of pawns in the scale factor applied
to the output of the NNUE evaluation. This has the effect that Stockfish
will try a little bit harder to keep more pawns in position where the
engine has the advantage, and exchange more pawns in bad positions.
STC:
LLR: 2.93 (-2.94,2.94) {-0.20,1.10}
Total: 42552 W: 3858 L: 3668 D: 35026
Ptnml(0-2): 152, 2956, 14876, 3134, 158
https://tests.stockfishchess.org/tests/view/606a06dd2b2df919fd5f0504
LTC:
LLR: 2.95 (-2.94,2.94) {0.20,0.90}
Total: 44328 W: 1703 L: 1531 D: 41094
Ptnml(0-2): 20, 1373, 19207, 1543, 21
https://tests.stockfishchess.org/tests/view/606aa4ec2b2df919fd5f053e
Closes https://github.com/official-stockfish/Stockfish/pull/3420
Bench: 4310076
2021-04-06 09:07:20 +02:00
Tomasz Sobczyk
0b33978e02
Merge pull request #320 from Sopel97/fix_stats_docs
...
Fix stats.md docs.
2021-04-05 18:54:53 +02:00
Tomasz Sobczyk
a93777c4ed
Fix stats.md docs.
2021-04-05 18:54:31 +02:00
Tomasz Sobczyk
ad24a8d2b4
Merge pull request #319 from Sopel97/more_stats
...
More stats
2021-04-05 18:51:27 +02:00
Tomasz Sobczyk
9dac979ce8
Update docs
2021-04-05 17:37:15 +02:00
Tomasz Sobczyk
f8d9836ca3
Use an ordered container for the results.
2021-04-05 17:30:38 +02:00
Tomasz Sobczyk
1786be5553
Minor fixes
2021-04-05 17:30:36 +02:00
Tomasz Sobczyk
e371d133a7
Fix grouping and do dedup in registry.
2021-04-05 17:25:28 +02:00
Tomasz Sobczyk
e7b3803fd0
Add more counters
2021-04-05 17:00:27 +02:00
Tomasz Sobczyk
fcd53684b6
To/from move stats
2021-04-05 16:43:25 +02:00
Tomasz Sobczyk
b2a5bf4171
Deduplicate statistic gatherers. Fix King square counter compilation errors.
2021-04-05 16:36:27 +02:00
Tomasz Sobczyk
eda51f19a2
Add king square counter
2021-04-05 16:15:37 +02:00
Tomasz Sobczyk
570a0f6f3c
Per square stats utility
2021-04-05 16:12:47 +02:00
Tomasz Sobczyk
7d74185d0b
Add max_count parameter to limit the number of positions read.
2021-04-05 14:21:25 +02:00
Tomasz Sobczyk
f85dbc3fe3
Reorder code and add important comments.
2021-04-05 14:21:25 +02:00
Tomasz Sobczyk
f69946cd0b
Merge pull request #317 from fsmosca/3fold_rep_termination
...
Fix segfault and end the game by 3-fold repetitions
2021-04-05 12:39:21 +02:00
Tomasz Sobczyk
8144fc54fc
Merge pull request #318 from Sopel97/revert_shit
...
Revert "Add additional checks for en-passant possiblity when fixing the erroneus ep flag from a fen."
2021-04-05 12:39:13 +02:00
Tomasz Sobczyk
8365109972
Revert "Add additional checks for en-passant possiblity when fixing the erroneus ep flag from a fen."
...
This reverts commit 6afcdaa928 .
2021-04-05 12:37:11 +02:00
fsmosca
560daefb01
Update position.h
...
* Add is_fifty_move_draw() and is_three_fold_repetition for gensfen()
2021-04-05 13:31:49 +08:00
fsmosca
f57af4d203
Update position.cpp
...
* Add is_fifty_move_draw() and is_three_fold_repetition for gensfen()
2021-04-05 13:31:21 +08:00
fsmosca
5bb6cdf7ba
Update gensfen.cpp
...
* Terminate game by 3-fold repetition.
* Fix segmentation fault by properly initializing the random_multi_pv_depth.
2021-04-05 13:29:49 +08:00
Tomasz Sobczyk
6afcdaa928
Add additional checks for en-passant possiblity when fixing the erroneus ep flag from a fen.
2021-04-03 23:17:55 +09:00
Stéphane Nicolet
b862c8d4be
Small clean-up
...
Bench: 4321677
2021-03-31 08:12:25 +02:00
bmc4
c489df6f5b
Simplify King Evasion
...
Simplify away the removal of some illegal `KING`-evasion moves during move
generation. Verified for correctness by running perft on the following positions:
```
./stockfish
bench 16 1 6 default perft
Nodes searched: 71608931810
./stockfish
position fen 4rrk1/1p1nq3/p7/2p1P1pp/3P2bp/3Q1Bn1/PPPB4/1K2R1NR w - - 40 21
go perft 6
Nodes searched: 6136386434
```
Passed STC:
LLR: 2.94 (-2.94,2.94) {-1.00,0.20}
Total: 16072 W: 1473 L: 1349 D: 13250
Ptnml(0-2): 57, 1047, 5710, 1159, 63
https://tests.stockfishchess.org/tests/view/60629e7ef183b42957b423b1
Passed LTC:
LLR: 2.94 (-2.94,2.94) {-0.70,0.20}
Total: 59064 W: 2214 L: 2177 D: 54673
Ptnml(0-2): 26, 1944, 25556, 1979, 27
https://tests.stockfishchess.org/tests/view/6062dce4f183b42957b423de
closes https://github.com/official-stockfish/Stockfish/pull/3415
No functional change
2021-03-31 07:47:15 +02:00
mstembera
62a0b65ff8
Simplify and unify FRC cornered bishop.
...
tested locally as fishtest doesn't support FRC:
STC NNUE
9646 - 9647 - 20707 [0.500] 40000 -0.0 +/- 2.4, LOS: 49.7 %, DrawRatio: 51.8 %
STC classical
9678 - 9609 - 20713 [0.501] 40000 0.6 +/- 2.4, LOS: 69.0 %, DrawRatio: 51.8 %
and verified independently:
Score of master vs patch: 6463 - 6580 - 34957 [0.499] 48000
closes https://github.com/official-stockfish/Stockfish/pull/3413
bench: 4321677
2021-03-27 17:03:10 +01:00
Tomasz Sobczyk
f28303d214
Allow using Intel SDE for PGO builds.
...
The software development emulator (SDE) allows to run binaries compiled
for architectures not supported by the actual CPU. This is useful to
do PGO builds for newer architectures. The SDE can currently be obtained from
https://software.intel.com/content/www/us/en/develop/articles/intel-software-development-emulator.html
This patch introduces a new optional makefile argument SDE_PATH.
If not empty it should contain the path to the sde executable
closes https://github.com/official-stockfish/Stockfish/pull/3373
No functional change.
2021-03-27 16:56:05 +01:00
Tomasz Sobczyk
876902070d
Add optional warmup step for training.
...
Specified with `warmup_epochs`, uses `warmup_lr`.
The purpose is to put the net into a somewhat stable state so that the gradients are not as high during the early stages of the training and don't "accidentally" break the net.
2021-03-26 00:26:41 +09:00
Tomasz Sobczyk
bbe338b9fc
Add random move accuracy for comparison.
2021-03-25 22:06:46 +09:00
Stéphane Nicolet
83eac08e75
Small cleanups (march 2021)
...
With help of @BM123499, @mstembera, @gvreuls, @noobpwnftw and @Fanael
Thanks!
Closes https://github.com/official-stockfish/Stockfish/pull/3405
No functional change
2021-03-24 17:11:06 +01:00
Guy Vreuls
ec42154ef2
Use reference instead of pointer for pop_lsb() signature
...
This patch changes the pop_lsb() signature from Square pop_lsb(Bitboard*) to
Square pop_lsb(Bitboard&). This is more idomatic for C++ style signatures.
Passed a non-regression STC test:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 21280 W: 1928 L: 1847 D: 17505
Ptnml(0-2): 71, 1427, 7558, 1518, 66
https://tests.stockfishchess.org/tests/view/6053a1e22433018de7a38e2f
We have verified that the generated binary is identical on gcc-10.
Closes https://github.com/official-stockfish/Stockfish/pull/3404
No functional change.
2021-03-19 20:28:57 +01:00
Vizvezdenec
ace9632c67
Add a specific FRC correction from classical to NNUE
...
our net currently is not trained on FRC games, and so doesn't know about the important pattern of a bishop that is cornered in FRC.
This patch introduces a term we have in the classical evaluation for this case, and adds it to the NNUE eval.
Since fishtest doesn't support FRC right now, the patch was tested locally at STC conditions,
starting from the book of FRC starting positions.
Score of master vs patch: 993 - 2226 - 6781 [0.438] 10000
Which corresponds to approximately 40 Elo
The patch passes non-regression testing for traditional chess (where it adds one branch).
passed STC:
https://tests.stockfishchess.org/tests/view/604fa2532433018de7a38b67
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 30560 W: 2701 L: 2636 D: 25223
Ptnml(0-2): 88, 2056, 10921, 2133, 82
passed STC also in an earlier version:
https://tests.stockfishchess.org/tests/view/604f61282433018de7a38b4d
closes https://github.com/official-stockfish/Stockfish/pull/3398
No functional change
2021-03-19 11:58:17 +01:00