1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00
Commit graph

5120 commits

Author SHA1 Message Date
joergoster
145e4c2a10 Add SSE41 switch.
This allows building modern compiles with SSE41 enabled,
which gives a nice speedup on my Bulldozer CPU.

For example:
make nnue ARCH=x86-64-modern sse41=yes -j
2020-07-02 16:15:39 +09:00
Joost VandeVondele
110068808b Provide WDL statistics
A number of engines, GUIs and tournaments start to report WDL estimates
along or instead of scores. This patch enables reporting of those stats
in a more or less standard way (http://www.talkchess.com/forum3/viewtopic.php?t=72140)

The model this reporting uses is based on data derived from a few million fishtest LTC games,
given a score and a game ply, a win rate is provided that matches rather closely,
especially in the intermediate range [0.05, 0.95] that data. Some data is shown at
https://github.com/glinscott/fishtest/wiki/UsefulData#win-loss-draw-statistics-of-ltc-games-on-fishtest
Making the conversion game ply dependent is important for a good fit, and is in line
with experience that a +1 score in the early midgame is more likely a win than in the late endgame.

Even when enabled, the printing of the info causes no significant overhead.

Passed STC:
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 197112 W: 37226 L: 37347 D: 122539
Ptnml(0-2): 2591, 21025, 51464, 20866, 2610
https://tests.stockfishchess.org/tests/view/5ef79ef4f993893290cc146b

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

No functional change
2020-07-01 07:33:05 +02:00
nodchip
c8262f8aec Fixed a compile error. 2020-06-30 15:58:51 +09:00
tttak
486f72af54 バグ修正(learn convert_bin_from_pgn-extract) 2020-06-30 14:01:04 +09:00
tttak
fda3945c07 learn convert_bin_from_pgn-extractコマンドを追加
http://rebel13.nl/download/data.html
Download Selected Lichess games
pgn-extract --fencomments -Wlalg --nochecks --nomovenumbers --noresults -w500000 -N -V -o comp-2019-06.txt comp-2019-06.pgn
stockfish.exe
learn convert_bin_from_pgn-extract pgn_eval_side_to_move 0 output_file_name fens_comp-2019-06.bin comp-2019-06.txt

https://github.com/glinscott/fishtest/wiki/PGN-files-of-games-played-on-fishtest
pgn-extract --fencomments -Wlalg --nochecks --nomovenumbers --noresults -w500000 -N -V -o fishtest.txt fishtest.pgn
stockfish.exe
learn convert_bin_from_pgn-extract pgn_eval_side_to_move 1 output_file_name fens_fishtest.bin fishtest.txt
2020-06-30 14:01:04 +09:00
Stefan Geschwentner
69d3be42a1 Tweak single queen endgame scaling.
Increase scaling factor for each minor of the opponent side of the queen.

STC:
LLR: 2.94 (-2.94,2.94) {-0.50,1.50}
Total: 14528 W: 2860 L: 2653 D: 9015
Ptnml(0-2): 217, 1632, 3408, 1741, 266
https://tests.stockfishchess.org/tests/view/5ef98384020eec13834a96a0

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.75}
Total: 34584 W: 4371 L: 4111 D: 26102
Ptnml(0-2): 205, 3080, 10501, 3262, 244
https://tests.stockfishchess.org/tests/view/5ef99972020eec13834a96c9

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

Bench: 4523573
2020-06-29 20:02:58 +02:00
FireFather
8f31d74cf6 More comment translation
including 11 files in /src
2020-06-30 00:45:32 +09:00
FireFather
f5cc77bc7c EOL
add eol at eof
2020-06-29 08:27:41 +09:00
Stéphane Nicolet
c7194bd924 Scale down eval for queen imbalance
We lower the endgame value of the evaluation when we detect that there
is only one queen left on the board (more precisely, we use a scale
factor of 37/64, or about 0.58, for the endgame part of the evaluation).
Hopefully this helps a little bit for the assessment of positions with
queen imbalance, which are one of the well-known Stockfish weaknesses.

STC:
LLR: 2.94 (-2.94,2.94) {-0.50,1.50}
Total: 21600 W: 4176 L: 3955 D: 13469
Ptnml(0-2): 351, 2457, 5003, 2598, 391
https://tests.stockfishchess.org/tests/view/5ef871b6020eec13834a94e8

LTC:
LLR: 2.97 (-2.94,2.94) {0.25,1.75}
Total: 248328 W: 30596 L: 29720 D: 188012
Ptnml(0-2): 1544, 22345, 75665, 22911, 1699
https://tests.stockfishchess.org/tests/view/5ef87aec020eec13834a94fe

Closes https://github.com/official-stockfish/Stockfish/pull/2781

Bench: 4441323
2020-06-28 22:42:43 +02:00
Stefan Geschwentner
16836f39b2 Scale down eval for drawish rook endgames.
STC:
LLR: 2.96 (-2.94,2.94) {-0.50,1.50}
Total: 82136 W: 15694 L: 15407 D: 51035
Ptnml(0-2): 1076, 8960, 20767, 9131, 1134
https://tests.stockfishchess.org/tests/view/5ef86cf8020eec13834a94dd

LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.75}
Total: 70200 W: 8787 L: 8440 D: 52973
Ptnml(0-2): 325, 5983, 22170, 6264, 358
https://tests.stockfishchess.org/tests/view/5ef88225020eec13834a950a

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

Bench: 4478869
2020-06-28 22:05:09 +02:00
Stéphane Nicolet
2810a1ea85 Increase value of pawns on fifth rank
This patch increases the endgame value of pawns on the fifth rank.
The increase is very small (+1 evaluation point, about 0.005 pawn)
for the pawns on external columns (a-b-c-f-g-h) and a bit bigger
(+7 evaluation points, about 0.033 pawn) for the pawns on d5/e5.

STC:
LLR: 2.93 (-2.94,2.94) {-0.50,1.50}
Total: 79864 W: 15331 L: 15027 D: 49506
Ptnml(0-2): 1336, 9284, 18433, 9498, 1381
https://tests.stockfishchess.org/tests/view/5ef73e2ef993893290cc0c47

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.75}
Total: 47240 W: 5927 L: 5630 D: 35683
Ptnml(0-2): 320, 4133, 14440, 4384, 343
https://tests.stockfishchess.org/tests/view/5ef7c0c4f993893290cc14b7

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

Bench: 4794633
2020-06-28 22:03:10 +02:00
mstembera
547c4a216a Remove old zobrist trick for castling rights
Removes an 8 year old micro optimization aimed at 32-bit architectures
because back then doing an xor of a Key could not be done in one instruction.
See original commit here 821e1c7

STC https://tests.stockfishchess.org/tests/view/5ef5833dde213bf647527d0c
LLR: 2.94 (-2.94,2.94) {-1.50,0.50}
Total: 162648 W: 31053 L: 31097 D: 100498
Ptnml(0-2): 2841, 18966, 37715, 19000, 2802

LTC https://tests.stockfishchess.org/tests/view/5ef7b1bbf993893290cc1489
LLR: 2.93 (-2.94,2.94) {-1.50,0.50}
Total: 62360 W: 7617 L: 7586 D: 47157
Ptnml(0-2): 423, 5662, 18994, 5663, 438

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

bench: 4591425
2020-06-28 22:00:19 +02:00
mstembera
de24fcebc8 Fix fragile code to use proper random 64 bit keys.
This fixes an old issue where we want to make a position unique but only
change a small number of bits in the key instead of all 64 of them randomly.
This is fragile and can lead to non uniqueness issues in the TT.

Key make_key(uint64_t seed) takes any integer and produces a unique random 64 bit key.
It is computationally efficient and is based on a congruential pseudo random number
generator using well tested constants by Donald Knuth
(see https://en.wikipedia.org/wiki/Linear_congruential_generator)

STC https://tests.stockfishchess.org/tests/view/5ef6c78f761b685b4c724bb6
LLR: 2.95 (-2.94,2.94) {-1.50,0.50}
Total: 154320 W: 29343 L: 29376 D: 95601
Ptnml(0-2): 2543, 18170, 35891, 17889, 2667

LTC https://tests.stockfishchess.org/tests/view/5ef7d1a9020eec13834a940e
LLR: 2.95 (-2.94,2.94) {-1.50,0.50}
Total: 53488 W: 6629 L: 6584 D: 40275
Ptnml(0-2): 372, 4878, 16183, 4955, 356

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

bench: 4626776
2020-06-28 21:57:37 +02:00
nodchip
9dc62809c8
Merge pull request #24 from FireFather/master
Comment translation
2020-06-28 11:43:53 +09:00
nodchip
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
6324c2de75
Merge pull request #23 from joergoster/linux_sse41
Linux sse41
2020-06-28 10:29:14 +09:00
FireFather
aea08de018 Translation
Files in /eval, /extra, & /learn - comments translated from Japanese to English
2020-06-28 03:12:55 +02:00
FireFather
2f8c692caa
Merge pull request #2 from nodchip/master
merge
2020-06-28 01:37:01 +02:00
joergoster
96f2541191 Fix compilation under Linux with -DUSE_SSE41. 2020-06-27 19:41:13 +02: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
joergoster
32c204fb56 Merge branch 'master' into sf-nnue-nodchip 2020-06-27 10:57:09 +02:00
Joost VandeVondele
ca41ee6632 Revert LTO for mingw on windows.
LTO with static linking is still only working with the latest versions of gcc,
causing problems for some devs.

on a modern mingw toolchain LTO optimizations can still be enabled as:

```
CXXFLAGS='-flto' make -j ARCH=x86-64-modern COMP=mingw profile-build
```

fixes https://github.com/official-stockfish/Stockfish/issues/2769

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

No functional change.
2020-06-27 10:22:27 +02:00
Niklas Fiekas
aecfca2dc2 support popcnt on armv8
* Supports popcnt (thanks @daylen)
* bits = 64 is now the default

Tested with g++ (Ubuntu/Linaro 7.5.0-3ubuntu1~18.04) 7.5.0 on ThunderX CN8890,
yields about 9% speedup.

Also tested with clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final).

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

No functional change.
2020-06-27 10:19:29 +02:00
Niklas Fiekas
a84e3ac287 Simplify use_time_management() and allow composing
like other `go` commands wtime/btime can now be composed.

`go depth 10 wtime 100`

will let the engine use standard time management but stop if depth 10 is reached.

fixes https://github.com/official-stockfish/Stockfish/issues/2767

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

No functional change
2020-06-27 10:06:05 +02:00
tttak
e229015127 learn convert_bin_from_pgn-extractコマンドを追加
http://rebel13.nl/download/data.html
Download Selected Lichess games
pgn-extract --fencomments -Wlalg --nochecks --nomovenumbers --noresults -w500000 -N -V -o comp-2019-06.txt comp-2019-06.pgn
stockfish.exe
setoption name SkipLoadingEval value true
isready
learn convert_bin_from_pgn-extract output_file_name fens_comp-2019-06.bin comp-2019-06.txt
2020-06-27 16:33:36 +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
rqs
4c926b8eb4 add pgn_to_plain 2020-06-27 13:17:54 +09:00
rqs
0761d9504e add convert_bin and option for draw positions 2020-06-27 13:17:54 +09:00
joergoster
2af46deede Fix include. 2020-06-26 09:12:24 +09:00
joergoster
a5fb69008c Bugfix. No legal move is either mate or stalemate. 2020-06-26 09:12:24 +09:00
nodchip
1c8a931309
Merge pull request #18 from joergoster/sf-nnue-nodchip
Update to SF master
2020-06-25 23:09:45 +09:00
joergoster
151a0dda91 Merge branch 'master' into sf-nnue-nodchip 2020-06-25 15:10:12 +02:00
FireFather
8c8a30233c Update evaluate_nnue.cpp 2020-06-25 12:41:32 +09:00
FireFather
86e3fedf7e Update evaluate_nnue.cpp 2020-06-25 04:38:39 +02:00
FireFather
7a3c3eacdf added header guards
5 include files in \eval\nnue\architectures
2020-06-25 10:39:29 +09:00
nodchip
ff31d92b94
Merge pull request #14 from joergoster/sf-nnue-nodchip
Update to SF master
2020-06-25 10:38:16 +09:00
FireFather
08d8adbade added header guards
5 include files in \eval\nnue\architectures
2020-06-24 22:41:00 +02:00
Joost VandeVondele
ab5cd8340f Small cleanups
closes https://github.com/official-stockfish/Stockfish/pull/2756

No functional change
2020-06-24 22:20:04 +02:00
UnaiCorzo
11483fe6d9 Makefile: support lto on mingw, default to 64bits
Clean and organize uppercase and spaces

fixes https://github.com/official-stockfish/Stockfish/issues/2731

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

No functional change
2020-06-24 22:14:25 +02:00
Joost VandeVondele
208c53df0f Remove 'Minimum Thinking Time' UCI option.
the option was, since at least 2014, not correctly implemented,
ignoring all dynamic adjustments to optimum time in search.
Instead of fixing it, remove it, no need to expose an option that
will influence time management negatively.

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

No functional change.
2020-06-24 22:02:17 +02:00
Niklas Fiekas
527d832a6d Support ARCH=armv8 in Makefile (#2355)
Tested with bench run after compiling with

- g++ (Debian 6.3.0-18+deb9u1) 6.3.0 20170516
- clang version 3.8.1-24

on ThunderX CN8890.

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

fixes https://github.com/official-stockfish/Stockfish/issues/2355

No functional change.
2020-06-24 21:59:57 +02:00
Vizvezdenec
bbe9857684 Do less futility pruning for captures.
The idea of this patch is that if capture can be described as
"less valuable piece takes more valuable piece" it's not really correct
to add only piece value of captured piece to static evaluation
since there can be more threats in other places and opponent can't really
do much but recapture our capturing piece which leaves us space for
more captures thus winning more material and increasing static eval.

passed STC
https://tests.stockfishchess.org/tests/view/5ef0167b122d6514328d760f
LLR: 2.96 (-2.94,2.94) {-0.50,1.50}
Total: 24736 W: 4838 L: 4607 D: 15291
Ptnml(0-2): 438, 2812, 5648, 3021, 449

passed LTC
https://tests.stockfishchess.org/tests/view/5ef073bc122d6514328d7693
LLR: 2.93 (-2.94,2.94) {0.25,1.75}
Total: 46152 W: 5865 L: 5567 D: 34720
Ptnml(0-2): 312, 4160, 13886, 4354, 364

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

bench 4789930
2020-06-24 21:56:11 +02:00
joergoster
5e119f5139 Finally. 2020-06-24 20:22:56 +02:00
joergoster
0e932757e5 Re-enable increment operator for Piece.
No functional change.
2020-06-24 20:18:32 +02:00
joergoster
8ef6c837b7 Fix.
Bench: 4471740
2020-06-24 18:04:28 +02:00
joergoster
89bbe86800 Merge branch 'master' of https://github.com/nodchip/Stockfish into sf-nnue-nodchip 2020-06-24 17:47:55 +02:00
nodchip
7818d23afb
Merge pull request #13 from zz4032/linux-identifier
Linux identifier corrected.
2020-06-24 09:35:44 +09:00