bmc4
84b42b3ab3
Simplify pawn moves generator
...
This patch simplifies QUIET_CHECKS pawn move generator by merging discovery check
move generator with direct check move generator. It also simplifies emptySquares
instantiation. In addition, I added a comment in generate_moves() to clarify Check
branches.
STC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 112648 W: 9952 L: 9945 D: 92751
Ptnml(0-2): 369, 7682, 40195, 7729, 349
https://tests.stockfishchess.org/tests/view/6088226895e7f1852abd2978
LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 74656 W: 2797 L: 2765 D: 69094
Ptnml(0-2): 38, 2328, 32554, 2380, 28
https://tests.stockfishchess.org/tests/view/60884e5095e7f1852abd2994
closes https://github.com/official-stockfish/Stockfish/pull/3447
No functional change
2021-04-28 13:38:28 +02:00
lonfom169
33a858eaa1
More extensions if SE search is very low.
...
More extensions for non-PV nodes if value from singular extension search is significantly below singularBeta.
Passed STC:
LLR: 2.97 (-2.94,2.94) <-0.50,2.50>
Total: 25064 W: 2334 L: 2162 D: 20568
Ptnml(0-2): 82, 1720, 8768, 1868, 94
https://tests.stockfishchess.org/tests/view/6084ba7995e7f1852abd27e3
Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 67136 W: 2644 L: 2450 D: 62042
Ptnml(0-2): 46, 2134, 28990, 2376, 22
https://tests.stockfishchess.org/tests/view/6084d79195e7f1852abd27ee
closes https://github.com/official-stockfish/Stockfish/pull/3445
Bench: 4075325
2021-04-25 13:26:22 +02:00
Stefan Geschwentner
c0ff241464
Thread based reduction tweak.
...
For PV nodes at the first two plies no reductions are done for each fourth thread.
STC (8 threads):
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 53992 W: 3334 L: 3167 D: 47491
Ptnml(0-2): 64, 2713, 21285, 2860, 74
https://tests.stockfishchess.org/tests/view/6083b2d695e7f1852abd277a
LTC (8 threads):
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 64888 W: 1888 L: 1725 D: 61275
Ptnml(0-2): 14, 1556, 29146, 1709, 19
https://tests.stockfishchess.org/tests/view/6084249595e7f1852abd2795
closes https://github.com/official-stockfish/Stockfish/pull/3443
No functional change (for one thread)
2021-04-25 13:21:57 +02:00
Tomasz Sobczyk
b748b46714
Cleanup and simplify NNUE code.
...
A lot of optimizations happend since the NNUE was introduced
and since then some parts of the code were left unused. This
got to the point where asserts were have to be made just to
let people know that modifying something will not have any
effects or may even break everything due to the assumptions
being made. Removing these parts removes those inexisting
"false dependencies". Additionally:
* append_changed_indices now takes the king pos and stateinfo
explicitly, no more misleading pos parameter
* IndexList is removed in favor of a generic ValueList.
Feature transformer just instantiates the type it needs.
* The update cost and refresh requirement is deferred to the
feature set once again, but now doesn't go through the whole
FeatureSet machinery and just calls HalfKP directly.
* accumulator no longer has a singular dimension.
* The PS constants and the PieceSquareIndex array are made local
to the HalfKP feature set because they are specific to it and
DO differ for other feature sets.
* A few names are changed to more descriptive
Passed STC non-regression:
https://tests.stockfishchess.org/tests/view/608421dd95e7f1852abd2790
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 180008 W: 16186 L: 16258 D: 147564
Ptnml(0-2): 587, 12593, 63725, 12503, 596
closes https://github.com/official-stockfish/Stockfish/pull/3441
No functional change
2021-04-25 13:16:30 +02:00
bmc4
32d781769d
Merge all move generators
...
Merging `generate<EVASIONS>` and `generate<QUIET_CHECKS>` into `generate_all()`.
verified to yield correct perft results, even though bench changes due to different order of generated moves.
No regresion playing games:
passed 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
passed 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
closes https://github.com/official-stockfish/Stockfish/pull/3418
Bench: 4536129
2021-04-24 12:55:33 +02:00
Tomasz Sobczyk
fbbd4adc3c
Unify naming convention of the NNUE code
...
matches the rest of the stockfish code base
closes https://github.com/official-stockfish/Stockfish/pull/3437
No functional change
2021-04-24 12:49:29 +02:00
Tomasz Sobczyk
6b24954738
Merge pull request #323 from Sopel97/tools_after_merge_2
...
Tools after merge 2
2021-04-19 19:06:51 +02:00
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