fairystockfish.git
5 years agoFix NNUE for large-board version (#199)
Fabian Fichter [Sat, 31 Oct 2020 10:56:15 +0000]
Fix NNUE for large-board version (#199)

5 years agoReset move repetition on checks
Fabian Fichter [Sat, 31 Oct 2020 08:45:20 +0000]
Reset move repetition on checks

5 years agoAdd FEN validation to pyffish (#87)
Fabian Fichter [Fri, 30 Oct 2020 23:10:38 +0000]
Add FEN validation to pyffish (#87)

5 years agoRemove highlight of passing move in CECP
Fabian Fichter [Fri, 30 Oct 2020 11:04:39 +0000]
Remove highlight of passing move in CECP

Input of passing by king move is invalid, so remove it (#192).

5 years agoOverwrite setup command for Janggi variants
Fabian Fichter [Thu, 29 Oct 2020 19:25:18 +0000]
Overwrite setup command for Janggi variants

Improve compatibility with most recent XBoard version
supporting Janggi as a built-in variant (see #192).

5 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 29 Oct 2020 10:42:31 +0000]
Merge official-stockfish/master

bench: 4282417

5 years agoDo not skip non-recapture ttMove when in check
syzygy1 [Tue, 27 Oct 2020 18:22:41 +0000]
Do not skip non-recapture ttMove when in check

The qsearch() MovePicker incorrectly skips a non-recapture ttMove
when in check (if depth <= DEPTH_QS_RECAPTURES). This is clearly not
intended and can cause qsearch() to return a mate score when there
is no mate. Introduced in cad300c and 6596f0e, as observed by
joergoster in #3171 and #3198.

This PR fixes the bug by not skipping the non-recapture ttMove when in check.

Passed non-regression STC:
https://tests.stockfishchess.org/tests/view/5f9867ea6a2c112b60691b10
LLR: 2.98 (-2.94,2.94) {-1.25,0.25}
Total: 27112 W: 2943 L: 2842 D: 21327
Ptnml(0-2): 127, 2170, 8878, 2237, 144

Passed non-regression LTC:
https://tests.stockfishchess.org/tests/view/5f9967326a2c112b60691bb0
LLR: 2.99 (-2.94,2.94) {-0.75,0.25}
Total: 18392 W: 807 L: 738 D: 16847
Ptnml(0-2): 9, 655, 7802, 718, 12

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

Bench: 3870606

5 years agoChange CECP pass move to "@@@@"
Fabian Fichter [Wed, 28 Oct 2020 17:33:00 +0000]
Change CECP pass move to "@@@@"

5 years agoFix CECP error message for illegal moves
Fabian Fichter [Wed, 28 Oct 2020 17:20:58 +0000]
Fix CECP error message for illegal moves

Closes #203.

5 years agoUpdate default net to nn-2eb2e0707c2b.nnue
SFisGOD [Tue, 27 Oct 2020 20:24:55 +0000]
Update default net to nn-2eb2e0707c2b.nnue

Optimization of the net weights of the 32 x 32 layer (1024 parameters) and net biases of the 512 x 32 layer (32 parameters) using SPSA.

Tuning of 32 x 32 Layer (800,000 games, 5 seconds time control):
https://tests.stockfishchess.org/tests/view/5f942040d3978d7e86f1aa05

Tuning of 512 x 32 Layer (80,000 games, 20 seconds time control):
https://tests.stockfishchess.org/tests/view/5f8f926d2c92c7fe3a8c608b

STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 17336 W: 1918 L: 1754 D: 13664
Ptnml(0-2): 79, 1344, 5672, 1480, 93
https://tests.stockfishchess.org/tests/view/5f9882346a2c112b60691b34

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 37304 W: 1822 L: 1651 D: 33831
Ptnml(0-2): 27, 1461, 15501, 1640, 23
https://tests.stockfishchess.org/tests/view/5f98a4b36a2c112b60691b40

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

Bench: 3403528

5 years agoBishop Pawns based on Files
FauziAkram [Fri, 23 Oct 2020 23:01:04 +0000]
Bishop Pawns based on Files

Passed STC:
https://tests.stockfishchess.org/tests/view/5f8cc8145a4eacb45305da3c
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 132544 W: 27795 L: 27328 D: 77421
Ptnml(0-2): 2756, 15558, 29272, 15835, 2851

Passed LTC:
https://tests.stockfishchess.org/tests/view/5f8df614bacb75a4f9a4721e
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 169608 W: 23257 L: 22622 D: 123729
Ptnml(0-2): 1408, 16316, 48758, 16877, 1445

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

Bench: 4067106

5 years agoSupport Kakao Janggi repetition rules
Fabian Fichter [Tue, 27 Oct 2020 18:29:36 +0000]
Support Kakao Janggi repetition rules

Closes #198 and #142.

5 years agoTweak horde space bonus
Fabian Fichter [Mon, 26 Oct 2020 07:51:30 +0000]
Tweak horde space bonus

horde STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 464 W: 283 L: 175 D: 6
http://www.variantfishtest.org:6543/tests/view/5f954c276e23db221d9e9394

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 969 W: 540 L: 424 D: 5
http://www.variantfishtest.org:6543/tests/view/5f9574466e23db221d9e9397

5 years agoDisable scale factor for Janggi
Fabian Fichter [Sun, 25 Oct 2020 17:10:47 +0000]
Disable scale factor for Janggi

janggi
LLR: 3.00 (-2.94,2.94) [0.00,10.00]
Total: 1304 W: 693 L: 573 D: 38

5 years agoTweak horde chess evaluation
Fabian Fichter [Sat, 24 Oct 2020 16:00:50 +0000]
Tweak horde chess evaluation

horde STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5975 W: 3049 L: 2861 D: 65
http://www.variantfishtest.org:6543/tests/view/5f92cb296e23db221d9e936b

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3220 W: 1671 L: 1523 D: 26
http://www.variantfishtest.org:6543/tests/view/5f935c4e6e23db221d9e9381

5 years agoTweak NMP depth for losing chess
Fabian Fichter [Sat, 24 Oct 2020 09:37:10 +0000]
Tweak NMP depth for losing chess

giveaway STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1259 W: 523 L: 424 D: 312
http://www.variantfishtest.org:6543/tests/view/5f93432e6e23db221d9e9373

giveaway LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1092 W: 430 L: 337 D: 325
http://www.variantfishtest.org:6543/tests/view/5f93603b6e23db221d9e9384

5 years agoIncrease NMP margin for slow variants
Fabian Fichter [Sat, 24 Oct 2020 09:29:46 +0000]
Increase NMP margin for slow variants

makruk STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 1864 W: 182 L: 118 D: 1564
http://www.variantfishtest.org:6543/tests/view/5f8e86a46e23db221d9e9312

makruk LTC
LLR: 2.99 (-2.94,2.94) [0.00,10.00]
Total: 1277 W: 108 L: 49 D: 1120
http://www.variantfishtest.org:6543/tests/view/5f92a9756e23db221d9e9356

shatranj STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1688 W: 195 L: 130 D: 1363
http://www.variantfishtest.org:6543/tests/view/5f8dfcbf6e23db221d9e9306

shatranj LTC
LLR: 3.53 (-2.94,2.94) [0.00,10.00]
Total: 1293 W: 134 L: 63 D: 1096
http://www.variantfishtest.org:6543/tests/view/5f912df66e23db221d9e9335

losalamos STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2926 W: 731 L: 634 D: 1561
http://www.variantfishtest.org:6543/tests/view/5f8fd6d06e23db221d9e9322

5 years agoBreakthrough bonus for horde chess
Fabian Fichter [Fri, 23 Oct 2020 10:07:20 +0000]
Breakthrough bonus for horde chess

horde STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 783 W: 443 L: 330 D: 10
http://www.variantfishtest.org:6543/tests/view/5f91d5366e23db221d9e9342

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 644 W: 375 L: 264 D: 5
http://www.variantfishtest.org:6543/tests/view/5f91ee7f6e23db221d9e9345

5 years agoEvaluate horde imbalance
Fabian Fichter [Fri, 23 Oct 2020 10:04:43 +0000]
Evaluate horde imbalance

horde STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 570 W: 337 L: 227 D: 6
http://www.variantfishtest.org:6543/tests/view/5f91bada6e23db221d9e933c

horde LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 592 W: 347 L: 237 D: 8
http://www.variantfishtest.org:6543/tests/view/5f91cf096e23db221d9e9340

5 years agoMore incremental accumulator updates
syzygy1 [Tue, 20 Oct 2020 19:06:06 +0000]
More incremental accumulator updates

This patch was inspired by c065abd which updates the accumulator,
if possible, based on the accumulator of two plies back if
the accumulator of the preceding ply is not available.

With this patch we look back even further in the position history
in an attempt to reduce the number of complete recomputations.
When we find a usable accumulator for the position N plies back,
we also update the accumulator of the position N-1 plies back
because that accumulator is most likely to be helpful later
when evaluating positions in sibling branches.
By not updating all intermediate accumulators immediately,
we avoid doing too much work that is not certain to be useful.
Overall, roughly 2-3% speedup.

This patch makes the code more specific to the net architecture,
changing input features of the net will require additional changes
to the incremental update code as discussed in the PR #3193 and #3191.

Passed STC:
https://tests.stockfishchess.org/tests/view/5f9056712c92c7fe3a8c60d0
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 10040 W: 1116 L: 968 D: 7956
Ptnml(0-2): 42, 722, 3365, 828, 63

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

No functional change.

5 years agoAdd net as dependency of config
Joost VandeVondele [Sun, 18 Oct 2020 13:01:19 +0000]
Add net as dependency of config

cleaner output and error message if the server is down and the net is not available.

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

No functional change

5 years agoReduce big time spikes by reducing PV re-searches.
xoto10 [Wed, 21 Oct 2020 13:52:13 +0000]
Reduce big time spikes by reducing PV re-searches.

Save time by reducing PV re-searches above original depth. Instead use 5% extra time on every move.

STC 10+0.1 th 1 :
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 90688 W: 9702 L: 9436 D: 71550
Ptnml(0-2): 408, 7252, 29792, 7450, 442
https://tests.stockfishchess.org/tests/view/5f8df807bacb75a4f9a47223

LTC 60+0.6 th 1 :
LLR: 2.97 (-2.94,2.94) {0.25,1.25}
Total: 97856 W: 4602 L: 4303 D: 88951
Ptnml(0-2): 53, 3757, 41057, 3960, 101
https://tests.stockfishchess.org/tests/view/5f8ec4872c92c7fe3a8c602d

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

Bench 3943959

5 years agoUpgrade ffish.js to 0.4.4 and add validate_fen
Johannes Czech [Wed, 21 Oct 2020 22:51:47 +0000]
Upgrade ffish.js to 0.4.4 and add validate_fen

* Upgraded ffish.js to 0.4.4
+ validate_fen(const std::string& fen, const Variant* v) (Closes #87)
+ ffish.validate_fen(fen)
+ ffish.validate_fen(fen, uciVariant)
+ ffish.startingFen(uciVariant)
+ board.pocket(turn)

Refactoring
+ replaced bool first = true by save_pop_back(string& s)
+ replaced string = " " + s; by string += " "; string += s;

updated README.md
+ simplified memory specification

* Added C++17 specification for building ffish.js
+ updated ffish.js to 0.4.4

* Added more checks to validate_fen()
+ FEN_TOUCHING_KINGS
+ replaced FEN_INVALID_CHECK_COUNTER by FEN_INVALID_NUMBER_OF_KINGS
+ combined FEN_FILE_SIZE_MISMATCH and FEN_INVALID_NUMBER_OF_RANKS into
FEN_INVALID_BOARD_GEOMETRY
+ added more checks for FEN_INVALID_CASTLING_INFO

added struct CharSquare
added class CharBoard (for geometry checks)
refactored different checks into separate functions

5 years agoCleaner definition of piece types
Fabian Fichter [Tue, 20 Oct 2020 16:58:48 +0000]
Cleaner definition of piece types

No functional change.

5 years agoRevert wrong extern constexpr
Fabian Fichter [Sun, 18 Oct 2020 21:22:11 +0000]
Revert wrong extern constexpr

5 years agoFix NNUE piece indeces
Fabian Fichter [Sun, 18 Oct 2020 20:50:54 +0000]
Fix NNUE piece indeces

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Oct 2020 18:40:07 +0000]
Merge official-stockfish/master

- Updates language standard to C++17.
- Includes merge of NNUE code.
  - NNUE embedding is disabled by default
  - Variant name is matched against NN file name to detect support

bench: 4170106

5 years agoDo more reductions for late quiet moves in case of consecutive fail highs.
Vizvezdenec [Sat, 17 Oct 2020 11:40:10 +0000]
Do more reductions for late quiet moves in case of consecutive fail highs.

Idea of this patch can be described as following - in case we have consecutive fail highs and we reach late enough moves at root node probability of remaining quiet moves being able to produce even bigger value than moves that produced previous cutoff (so ones that should be high in move ordering but now they fail to produce beta cutoff because we actually reached high move count) should be quiet small so we can reduce them more.

passed STC
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 53392 W: 5681 L: 5474 D: 42237
Ptnml(0-2): 214, 4104, 17894, 4229, 255
https://tests.stockfishchess.org/tests/view/5f88501adcdad978fe8c527e

passed LTC
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 59136 W: 2773 L: 2564 D: 53799
Ptnml(0-2): 30, 2117, 25078, 2300, 43
https://tests.stockfishchess.org/tests/view/5f884dbfdcdad978fe8c527a

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

Bench: 4066972

5 years agoUpdate default net to nn-eba324f53044.nnue
mstembera [Sun, 18 Oct 2020 11:23:28 +0000]
Update default net to nn-eba324f53044.nnue

The new net is based on the previous net 04cf2b4ed1da but with the biases
for the 1st hidden layer tuned SPSA, see the SPSA session on fishtest there:
https://tests.stockfishchess.org/tests/view/5f875213dcdad978fe8c5211

Thanks to @vondele for writing out the net, see discussion in this thread:
https://github.com/mstembera/Stockfish/commit/432da86721647dff1d9426a7cdcfd2dbada8155e

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 15000 W: 1640 L: 1483 D: 11877
Ptnml(0-2): 50, 1183, 4908, 1278, 81
https://tests.stockfishchess.org/tests/view/5f8955e20fea1a44ec4f0a5d

Passed LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 81272 W: 3948 L: 3682 D: 73642
Ptnml(0-2): 64, 3194, 33856, 3456, 66
https://tests.stockfishchess.org/tests/view/5f89e8efeae8a6e60644d6e7

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

Bench: 3762411

5 years agoFix compiler warning
Fabian Fichter [Sat, 17 Oct 2020 22:56:19 +0000]
Fix compiler warning

No functional change.

5 years agoSupport Chaturanga
Fabian Fichter [Sat, 17 Oct 2020 22:23:21 +0000]
Support Chaturanga

https://en.wikipedia.org/wiki/Chaturanga

The exact historic rules of this game are unknown.
This implementations follows the rules from chess.com.

5 years agoScale factor tweak
Unai Corzo [Mon, 12 Oct 2020 07:03:49 +0000]
Scale factor tweak

Add !pawnsOnBothFlanks heuristic to scale factor.

STC https://tests.stockfishchess.org/tests/view/5f8080575b3847b5d41f9134
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 250960 W: 49779 L: 49168 D: 152013
Ptnml(0-2): 4224, 28822, 58802, 29383, 4249

LTC https://tests.stockfishchess.org/tests/view/5f832f498ea73fb8ddf83ddb
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 88584 W: 11827 L: 11388 D: 65369
Ptnml(0-2): 585, 8079, 26578, 8412, 638

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

bench: 3834252

5 years agoRookOnQueenFile Removal
FauziAkram [Tue, 6 Oct 2020 19:43:48 +0000]
RookOnQueenFile Removal

Removing Rook On Queen File looks beneficial, and it might even bring some ELO.
I will try to reintroduce it with a different method later on.

Passed STC:
https://tests.stockfishchess.org/tests/view/5f7cea204389873867eb10cb
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 18624 W: 3800 L: 3568 D: 11256
Ptnml(0-2): 308, 2131, 4257, 2253, 363

Passed LTC:
https://tests.stockfishchess.org/tests/view/5f7d76a4e936c6892bf50598
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 117864 W: 15515 L: 15340 D: 87009
Ptnml(0-2): 926, 11127, 34671, 11262, 946

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

Bench: 3756191

5 years agoUpdate default net to nn-04cf2b4ed1da.nnue
Joost VandeVondele [Wed, 14 Oct 2020 08:23:30 +0000]
Update default net to nn-04cf2b4ed1da.nnue

Further tune the net parameters, now the last but one layer (32x32).
To limit the number of parameters optimized, the network layer was
decomposed using SVD, and the singular values were treated
as parameters and tuned.

Tuning branch: https://github.com/vondele/Stockfish/tree/svdTune
Tuner: https://github.com/vondele/nevergrad4sf

passed STC:
https://tests.stockfishchess.org/tests/view/5f83e82f8ea73fb8ddf83e4e
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 8488 W: 944 L: 795 D: 6749
Ptnml(0-2): 39, 609, 2811, 734, 51

passed LTC:
https://tests.stockfishchess.org/tests/view/5f83f4118ea73fb8ddf83e66
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 169016 W: 8043 L: 7589 D: 153384
Ptnml(0-2): 133, 6623, 70538, 7085, 129

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

Bench: 3945198

5 years agoAdd sponsor button
Fabian Fichter [Mon, 12 Oct 2020 22:02:33 +0000]
Add sponsor button

5 years agoFix typo in error message
Fabian Fichter [Fri, 9 Oct 2020 21:13:00 +0000]
Fix typo in error message

5 years agoPawn Tuning
FauziAkram [Fri, 2 Oct 2020 12:32:19 +0000]
Pawn Tuning

Tuning of pawns, for classical evaluation:

Passed STC:
https://tests.stockfishchess.org/tests/view/5f771f0e52560f5fc78559ec
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 252696 W: 50321 L: 49692 D: 152683
Ptnml(0-2): 4614, 29845, 57049, 29978, 4862

Passed LTC:
https://tests.stockfishchess.org/tests/view/5f77cfef090dcf9aaa16d38b
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 48184 W: 6556 L: 6193 D: 35435
Ptnml(0-2): 335, 4516, 14100, 4733, 408

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

bench: 4016121

5 years agoSimplify away futility pruning for captures
Unai Corzo [Fri, 2 Oct 2020 20:00:55 +0000]
Simplify away futility pruning for captures

Remove futility pruning for captures.

STC https://tests.stockfishchess.org/tests/view/5f749bfed930428c36d34c56
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 38064 W: 4011 L: 3929 D: 30124
Ptnml(0-2): 192, 3004, 12567, 3068, 201

LTC https://tests.stockfishchess.org/tests/view/5f74d99bf18675b1ce2f7412
LLR: 2.94 (-2.94,2.94) {-0.75,0.25}
Total: 184984 W: 8567 L: 8610 D: 167807
Ptnml(0-2): 146, 7593, 77058, 7548, 147

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

bench: 3890648

5 years agoSchedule threads fairly under valgrind
Joost VandeVondele [Wed, 30 Sep 2020 19:22:36 +0000]
Schedule threads fairly under valgrind

fixes a rare case that can cause CI to fail when running multithreaded under valgrind.

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

No functional change.

5 years agoSupport parsing variant config string in pyffish
Fabian Fichter [Sat, 3 Oct 2020 20:47:23 +0000]
Support parsing variant config string in pyffish

5 years agoRemove blocked shogi pawns from mobility area
Fabian Fichter [Fri, 2 Oct 2020 09:34:06 +0000]
Remove blocked shogi pawns from mobility area

shogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 10872 W: 5545 L: 5286 D: 41
http://www.variantfishtest.org:6543/tests/view/5f6253786e23db221d9e91b8

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 17489 W: 8874 L: 8520 D: 95
http://www.variantfishtest.org:6543/tests/view/5f645f406e23db221d9e91c1

5 years agoTweak shogi piece promotion bonus
Fabian Fichter [Fri, 2 Oct 2020 09:31:14 +0000]
Tweak shogi piece promotion bonus

shogi STC (failed)
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 7135 W: 3552 L: 3552 D: 31
http://www.variantfishtest.org:6543/tests/view/5f51377b6e23db221d9e9065

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 14354 W: 7294 L: 6985 D: 75
http://www.variantfishtest.org:6543/tests/view/5f65a4de6e23db221d9e91cc

5 years agoUpdated ffish.js to 0.4.2 (Closes #185)
QueensGambit [Wed, 30 Sep 2020 08:40:06 +0000]
Updated ffish.js to 0.4.2 (Closes #185)
+ board.moveStack()
+ board.pushSan(sanMove, notation)
+ board.pushMoves(uciMoves)
+ board.pushSanMoves(sanMoves)
+ board.pushSanMoves(sanMoves, notation)
+ ffish.readGamePGN(pgn)
+ game.headerKeys()
+ game.headers(key)
+ game.mainlineMoves()
+ ffish.variants()
+ ffish.loadVariantConfig()

Added parse_istream()
+ to allow reading a variant configuration file via a stringstream

Added NO_THREADS #define
+ to disable threads usage for build

Added custom variants info to README.md

Changed ordering for ffish.loadVariantsConfig() in test.js

5 years agoInclude pawns in NNUE scaling
Stéphane Nicolet [Mon, 28 Sep 2020 20:32:55 +0000]
Include pawns in NNUE scaling

We now include the total pawn count in the scaling factor for the output
of the NNUE evaluation network. This should have the effect of trying to
keep more pawns when SF has the advantage, but exchange them when she
is defending.

Thanks to Alexander Pagel (Lolligerhans) for the idea of using the
value of pawns to ease the comparison with the rest of the material
estimation.

Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 15072 W: 1700 L: 1539 D: 11833
Ptnml(0-2): 65, 1202, 4845, 1355, 69
https://tests.stockfishchess.org/tests/view/5f7235a63b22d6afa50699b3

Passed LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 25880 W: 1270 L: 1124 D: 23486
Ptnml(0-2): 23, 980, 10788, 1126, 23
https://tests.stockfishchess.org/tests/view/5f723b483b22d6afa5069a99

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

Bench: 3776081

5 years agoTweak reduction formula.
Stefan Geschwentner [Mon, 28 Sep 2020 20:21:14 +0000]
Tweak reduction formula.

Replace log(i) with log(i + 0.25 * log(i)). This increases especially for low values the reductions. But for bigger values there are nearly no changes.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 49640 W: 5505 L: 5289 D: 38846
Ptnml(0-2): 270, 4074, 15924, 4274, 278
https://tests.stockfishchess.org/tests/view/5f71f04d3b22d6afa5069478

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 43856 W: 2209 L: 2021 D: 39626
Ptnml(0-2): 32, 1776, 18128, 1956, 36
https://tests.stockfishchess.org/tests/view/5f7232ee3b22d6afa50699a2

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

Bench: 3555769

5 years agoUpdate default net to nn-baeb9ef2d183.nnue
SFisGOD [Mon, 28 Sep 2020 18:24:26 +0000]
Update default net to nn-baeb9ef2d183.nnue

Further optimization of Sergio's nn-03744f8d56d8.nnue
This patch is the result of collaboration with Joost VandeVondele.

STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 37000 W: 4145 L: 3947 D: 28908
Ptnml(0-2): 191, 3016, 11912, 3166, 215
https://tests.stockfishchess.org/tests/view/5f71e7983b22d6afa5069475

LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 60224 W: 2992 L: 2769 D: 54463
Ptnml(0-2): 48, 2420, 24956, 2637, 51
https://tests.stockfishchess.org/tests/view/5f722bb83b22d6afa506998f

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

Bench: 3720073

5 years agoTweaking Mobility and Safe Check
FauziAkram [Mon, 28 Sep 2020 19:09:43 +0000]
Tweaking Mobility and Safe Check

Passed STC:
https://tests.stockfishchess.org/tests/view/5f70d86d3b22d6afa50693b9
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 100368 W: 20323 L: 19914 D: 60131
Ptnml(0-2): 1927, 11641, 22605, 12118, 1893

Passed LTC:
https://tests.stockfishchess.org/tests/view/5f71bb553b22d6afa5069457
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 77648 W: 10613 L: 10181 D: 56854
Ptnml(0-2): 634, 7280, 22594, 7652, 664

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

Bench: 3861984

5 years agoAdjust null move pruning constants
Vizvezdenec [Mon, 28 Sep 2020 17:20:06 +0000]
Adjust null move pruning constants

Idea is that division by fraction of 2 is slightly faster than by other numbers so parameters are adjusted in a way that division in null move pruning depth reduction features dividing by 256 instead of dividing by 213.
Other than this patch is almost non-functional - difference starts to exist by depth 133.

passed STC
https://tests.stockfishchess.org/tests/view/5f70dd943b22d6afa50693c5
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 57048 W: 6616 L: 6392 D: 44040
Ptnml(0-2): 304, 4583, 18531, 4797, 309

passed LTC
https://tests.stockfishchess.org/tests/view/5f7180db3b22d6afa506941f
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 45960 W: 2419 L: 2229 D: 41312
Ptnml(0-2): 43, 1779, 19137, 1987, 34

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

bench 3789924

5 years agoUpdate default net to nn-04a843f8932e.nnue
Joost VandeVondele [Sat, 26 Sep 2020 15:47:52 +0000]
Update default net to nn-04a843f8932e.nnue

an optimization of Sergio's nn-03744f8d56d8.nnue tuning the output layer (33 parameters) on game play.

WIP code to make layer parameters tunable is https://github.com/vondele/Stockfish/tree/optionOutput
Optimization itself is using https://github.com/vondele/nevergrad4sf
Writing of the modified net using WIP code based on the learner code https://github.com/vondele/Stockfish/tree/evalWrite

Most parameters in the output layer are changed only little (~5 for int8_t).

passed STC:
https://tests.stockfishchess.org/tests/view/5f716f6b3b22d6afa506941a
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 15488 W: 1859 L: 1689 D: 11940
Ptnml(0-2): 79, 1260, 4917, 1388, 100

passed LTC:
https://tests.stockfishchess.org/tests/view/5f71908e3b22d6afa506942e
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 8728 W: 518 L: 400 D: 7810
Ptnml(0-2): 7, 338, 3556, 456, 7

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

Bench: 3789924

5 years agoUse incremental updates more often
noobpwnftw [Sun, 27 Sep 2020 18:29:21 +0000]
Use incremental updates more often

Use incremental updates for accumulators for up to 2 plies.
Do not copy accumulator. About 2% speedup.

Passed STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 21752 W: 2583 L: 2403 D: 16766
Ptnml(0-2): 128, 1761, 6923, 1931, 133
https://tests.stockfishchess.org/tests/view/5f7150cf3b22d6afa5069412

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

No functional change

5 years agoTweak nnue scaling to keep more material
Stéphane Nicolet [Sat, 26 Sep 2020 21:19:53 +0000]
Tweak nnue scaling to keep more material

Current master uses a constant scale factor of 5/4 = 1.25 for the output
of the NNUE network, for compatibility with search and classical evaluation.
We modify this scale factor to make it dependent on the phase of the game,
going from about 1.5 in the opening to 1.0 for pure pawn endgames.

This helps Stockfish to avoid exchanges of pieces (heavy pieces in particular)
when she has the advantage, keeping more material on the board when attacking.

Passed STC:
LLR: 2.95 (-2.94,2.94) {-0.25,1.25}
Total: 14744 W: 1771 L: 1599 D: 11374
Ptnml(0-2): 87, 1184, 4664, 1344, 93
https://tests.stockfishchess.org/tests/view/5f6fb0a63b22d6afa506904f

Passed LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 8912 W: 512 L: 393 D: 8007
Ptnml(0-2): 7, 344, 3637, 459, 9
https://tests.stockfishchess.org/tests/view/5f6fcf533b22d6afa5069066

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

Bench: 3943952

5 years agoAdd more moderate variants to variants.ini
Fabian Fichter [Sat, 26 Sep 2020 10:43:42 +0000]
Add more moderate variants to variants.ini

5 years agoAdjust endgame evaluation for KSSK
Fabian Fichter [Sat, 26 Sep 2020 09:43:54 +0000]
Adjust endgame evaluation for KSSK

makruk
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 12891 W: 944 L: 932 D: 11015
http://www.variantfishtest.org:6543/tests/view/5f5ded636e23db221d9e9184

5 years agoSwitch to NNUE eval probabilistically for OCB
SFisGOD [Wed, 23 Sep 2020 06:00:42 +0000]
Switch to NNUE eval probabilistically for OCB

Introduce a small chance of switching to NNUE if PSQ imbalance is large but we have opposite colored bishops and the classical eval is struggling to win.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 25304 W: 3179 L: 2983 D: 19142
Ptnml(0-2): 172, 2171, 7781, 2345, 183
https://tests.stockfishchess.org/tests/view/5f6b14dec7759d4ee307cfe3

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 84680 W: 4846 L: 4556 D: 75278
Ptnml(0-2): 89, 3933, 34011, 4213, 94
https://tests.stockfishchess.org/tests/view/5f6b3fb6c7759d4ee307cff9

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

Bench: 3865413

5 years agoSuppress info strings before 'uci'
Stéphane Nicolet [Thu, 24 Sep 2020 09:38:35 +0000]
Suppress info strings before 'uci'

On Windows, Stockfish wouldn't launch in some GUI because we output some
info strings (about the use of large pages) before sending the 'uci'
command. It seems more robust to suppress these info strings, and instead
to add a proper section section in the Readme about large pages use.

fixes https://github.com/official-stockfish/Stockfish/issues/3052
closes https://github.com/official-stockfish/Stockfish/pull/3147

No functional change

5 years agoReturn to development version
Fabian Fichter [Thu, 24 Sep 2020 10:38:05 +0000]
Return to development version

5 years agoFairy-Stockfish 11.2
Fabian Fichter [Wed, 23 Sep 2020 07:39:22 +0000]
Fairy-Stockfish 11.2

bench: 4262221

5 years agoIncrease reductions with the number of threads
Stéphane Nicolet [Tue, 22 Sep 2020 20:43:41 +0000]
Increase reductions with the number of threads

Passed STC with 8 threads:
LLR: 2.92 (-2.94,2.94) {-0.25,1.25}
Total: 13520 W: 1135 L: 1012 D: 11373
Ptnml(0-2): 39, 815, 4929, 938, 39
https://tests.stockfishchess.org/tests/view/5f68e274ded68c240be73f41

Passed LTC with 8 threads:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 48384 W: 2183 L: 1994 D: 44207
Ptnml(0-2): 28, 1777, 20402, 1948, 37
https://tests.stockfishchess.org/tests/view/5f68f068ded68c240be747e9

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

No functional change (for one thread)

5 years agoFix move time for CECP
Fabian Fichter [Mon, 21 Sep 2020 15:22:13 +0000]
Fix move time for CECP

Ensure full usage of time specified by `st`.

5 years agoSmall cleanups 12
Stéphane Nicolet [Wed, 9 Sep 2020 08:49:31 +0000]
Small cleanups 12

- Clean signature of functions in namespace NNUE
- Add comment for countermove based pruning
- Remove bestMoveCount variable
- Add const qualifier to kpp_board_index array
- Fix spaces in get_best_thread()
- Fix indention in capture LMR code in search.cpp
- Rename TtmemDeleter to LargePageDeleter

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

No functional change

5 years agoAdd large page support for NNUE weights and simplify TT mem management
Sami Kiminki [Sun, 30 Aug 2020 16:41:30 +0000]
Add large page support for NNUE weights and simplify TT mem management

Use TT memory functions to allocate memory for the NNUE weights. This
should provide a small speed-up on systems where large pages are not
automatically used, including Windows and some Linux distributions.

Further, since we now have a wrapper for std::aligned_alloc(), we can
simplify the TT memory management a bit:

- We no longer need to store separate pointers to the hash table and
  its underlying memory allocation.
- We also get to merge the Linux-specific and default implementations
  of aligned_ttmem_alloc().

Finally, we'll enable the VirtualAlloc code path with large page
support also for Win32.

STC: https://tests.stockfishchess.org/tests/view/5f66595823a84a47b9036fba
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 14896 W: 1854 L: 1686 D: 11356
Ptnml(0-2): 65, 1224, 4742, 1312, 105

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

No functional change.

5 years agoTweak hybrid treshold.
Stefan Geschwentner [Sun, 20 Sep 2020 20:25:19 +0000]
Tweak hybrid treshold.

Increase the first hybrid threshold with more material.
Rewrite the hybrid rules for clarity.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 24416 W: 3039 L: 2848 D: 18529
Ptnml(0-2): 135, 2136, 7503, 2271, 163
https://tests.stockfishchess.org/tests/view/5f6451efbb0cae038ca8f4dc

LTC;
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 65016 W: 3702 L: 3455 D: 57859
Ptnml(0-2): 66, 2991, 26157, 3218, 76
https://tests.stockfishchess.org/tests/view/5f64b143bb0cae038ca8f51f

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

Bench: 3973739

5 years agoSimplify reduced depth search
Unai Corzo [Sun, 20 Sep 2020 07:03:37 +0000]
Simplify reduced depth search

Simplification in reduced depth search.

STC https://tests.stockfishchess.org/tests/view/5f64c72fbb0cae038ca8f531
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 28320 W: 3475 L: 3359 D: 21486
Ptnml(0-2): 170, 2485, 8773, 2523, 209

LTC https://tests.stockfishchess.org/tests/view/5f650cfabb0cae038ca8f585
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 58392 W: 3354 L: 3285 D: 51753
Ptnml(0-2): 74, 2826, 23336, 2877, 83

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

bench: 4201295

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 20 Sep 2020 12:10:42 +0000]
Merge official-stockfish/master

bench: 4262221

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 20 Sep 2020 11:55:24 +0000]
Merge official-stockfish/master

No functional change.

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 20 Sep 2020 11:17:16 +0000]
Merge official-stockfish/master

bench: 4629236

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 20 Sep 2020 10:20:05 +0000]
Merge official-stockfish/master

No functional change.

5 years agoTweak shogi piece values
Fabian Fichter [Sat, 19 Sep 2020 16:41:31 +0000]
Tweak shogi piece values

shogi STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5572 W: 2865 L: 2682 D: 2
http://www.variantfishtest.org:6543/tests/view/5f6110aa6e23db221d9e919c

shogi LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5586 W: 2867 L: 2684 D: 35
http://www.variantfishtest.org:6543/tests/view/5f62fc106e23db221d9e91bb

5 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 19 Sep 2020 12:49:12 +0000]
Merge official-stockfish/master

bench: 4665603

5 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 19 Sep 2020 12:45:56 +0000]
Merge official-stockfish/master

No functional change.

5 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 19 Sep 2020 11:41:08 +0000]
Merge official-stockfish/master

bench: 5113210

5 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 19 Sep 2020 09:36:55 +0000]
Merge official-stockfish/master

No functional change.

5 years agoUse tiling to speed up accumulator refreshes and updates
syzygy1 [Wed, 16 Sep 2020 15:39:11 +0000]
Use tiling to speed up accumulator refreshes and updates

Perform the update and refresh operations tile by tile in a local
array of vectors. By selecting the array size carefully, we
achieve that the compiler keeps the whole array in vector registers.

Idea and original implementation by @sf-x.

STC: https://tests.stockfishchess.org/tests/view/5f623eec912c15f19854b855
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 4872 W: 623 L: 477 D: 3772
Ptnml(0-2): 14, 350, 1585, 450, 37

LTC: https://tests.stockfishchess.org/tests/view/5f62434e912c15f19854b860
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 25808 W: 1565 L: 1401 D: 22842
Ptnml(0-2): 23, 1186, 10332, 1330, 33

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

No functional change

5 years agoSimplify futility pruning for captures
Unai Corzo [Wed, 16 Sep 2020 18:42:38 +0000]
Simplify futility pruning for captures

STC https://tests.stockfishchess.org/tests/view/5f61f0e4b91f2ec371e429c2
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 75512 W: 8747 L: 8704 D: 58061
Ptnml(0-2): 440, 6589, 23683, 6576, 468

LTC https://tests.stockfishchess.org/tests/view/5f6215d3912c15f19854b801
LLR: 2.95 (-2.94,2.94) {-0.75,0.25}
Total: 92912 W: 5030 L: 4992 D: 82890
Ptnml(0-2): 88, 4363, 37532, 4369, 104

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

bench: 3856086

5 years agoRemove castling extension
Unai Corzo [Wed, 16 Sep 2020 17:14:32 +0000]
Remove castling extension

STC https://tests.stockfishchess.org/tests/view/5f5fa5348fbc1c8a3f476eca
LLR: 2.94 (-2.94,2.94) {-1.25,0.25}
Total: 38520 W: 4713 L: 4610 D: 29197
Ptnml(0-2): 233, 3486, 11734, 3559, 248

LTC https://tests.stockfishchess.org/tests/view/5f62166a912c15f19854b806
LLR: 2.93 (-2.94,2.94) {-0.75,0.25}
Total: 48024 W: 2673 L: 2600 D: 42751
Ptnml(0-2): 64, 2247, 19316, 2322, 63

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

bench: 3818400

5 years agoAdded FEN string to bench output
GoldenRare [Thu, 10 Sep 2020 04:24:40 +0000]
Added FEN string to bench output

fixes https://github.com/official-stockfish/Stockfish/pull/3117

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

No functional change

5 years agoRevise palace attacks for rook
Fabian Fichter [Wed, 16 Sep 2020 20:13:01 +0000]
Revise palace attacks for rook

janggi
Total: 500 W: 268 L: 221 D: 11

5 years agoImprove NDK section in Makefile
syzygy1 [Sun, 13 Sep 2020 18:16:52 +0000]
Improve NDK section in Makefile

This PR sets the "comp" variable simply to "clang",
which seems to be more consistent and allows a small simplification.

The PR also moves the section that sets "profile_make" and "profile_use" to after the NDK section,
which ensures that these variables are now set correctly for NDK/clang.

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

No functional change

5 years agoUse 2 * bestMoveChanges.
xoto10 [Thu, 10 Sep 2020 20:10:57 +0000]
Use 2 * bestMoveChanges.

NNUE appears to provide a more stable eval than the classic eval,
so the time use dependencies on bestMoveChanges, fallingEval,
etc may need to change to make the best use of available time.
This change doubles the effect of totBestMoveChanges when giving
more time because the choice of best move is unstable.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 101928 W: 11995 L: 11698 D: 78235 Elo +0.78
Ptnml(0-2): 592, 8707, 32103, 8936, 626
https://tests.stockfishchess.org/tests/view/5f538a462d02727c56b36cec

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 186392 W: 10383 L: 9877 D: 166132 Elo +0.81
Ptnml(0-2): 207, 8370, 75539, 8870, 210
https://tests.stockfishchess.org/tests/view/5f54a9712d02727c56b36d5a

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

Bench 4222126

5 years agoBonus for connected soldiers
Fabian Fichter [Tue, 15 Sep 2020 21:51:18 +0000]
Bonus for connected soldiers

janggi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 644 W: 369 L: 259 D: 16

5 years agoUpdate default net to nn-03744f8d56d8.nnue
Sergio Vieri [Mon, 14 Sep 2020 09:24:05 +0000]
Update default net to nn-03744f8d56d8.nnue

Equivalent to 20200914-1520

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

Bench: 4222126

5 years agoSimplify StatSCore Initialization
mckx00 [Mon, 14 Sep 2020 02:28:32 +0000]
Simplify StatSCore Initialization

No need to initialize StatScore at rootNode. Current Logic is redundant because at subsequent levels the grandchildren statScore is initialized to zero.

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

Non functional change.

5 years agoPenalty for undroppable shogi pawns
Fabian Fichter [Mon, 14 Sep 2020 19:32:15 +0000]
Penalty for undroppable shogi pawns

shogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 5265 W: 2710 L: 2532 D: 23
http://www.variantfishtest.org:6543/tests/view/5f5a95fa6e23db221d9e9120

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 3730 W: 1932 L: 1776 D: 22
http://www.variantfishtest.org:6543/tests/view/5f5c8fec6e23db221d9e9154

5 years agoScale evaluation for material counting
Fabian Fichter [Sun, 13 Sep 2020 18:15:56 +0000]
Scale evaluation for material counting

janggi
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1658 W: 873 L: 749 D: 36

5 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 13 Sep 2020 17:24:30 +0000]
Merge official-stockfish/master

No functional change.

5 years agoAdjust king PSQT based on pawn rank
Fabian Fichter [Sat, 12 Sep 2020 08:49:09 +0000]
Adjust king PSQT based on pawn rank

shogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 865 W: 489 L: 374 D: 2
http://www.variantfishtest.org:6543/tests/view/5f5b2c286e23db221d9e9135

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1244 W: 678 L: 558 D: 8
http://www.variantfishtest.org:6543/tests/view/5f5b5cf86e23db221d9e9145

5 years agoSoft limit on king danger
Fabian Fichter [Thu, 10 Sep 2020 19:49:11 +0000]
Soft limit on king danger

chess STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 3531 W: 759 L: 732 D: 2040
http://www.variantfishtest.org:6543/tests/view/5f51e87b6e23db221d9e907f

crazyhouse STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 1630 W: 810 L: 756 D: 64
http://www.variantfishtest.org:6543/tests/view/5f51e8e06e23db221d9e9084

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 2750 W: 1346 L: 1300 D: 104
http://www.variantfishtest.org:6543/tests/view/5f57249f6e23db221d9e9102

3check STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 2896 W: 1369 L: 1325 D: 202
http://www.variantfishtest.org:6543/tests/view/5f51e8c36e23db221d9e9082

3check LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 6016 W: 2783 L: 2762 D: 471
http://www.variantfishtest.org:6543/tests/view/5f5724ab6e23db221d9e9104

bench: 4779259

5 years agoIncrease bonus for leapers in hand
Fabian Fichter [Thu, 10 Sep 2020 06:39:27 +0000]
Increase bonus for leapers in hand

shogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2062 W: 1091 L: 959 D: 12
http://www.variantfishtest.org:6543/tests/view/5f520b616e23db221d9e90a7

shogi LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2069 W: 1095 L: 963 D: 11
http://www.variantfishtest.org:6543/tests/view/5f563b0e6e23db221d9e90f8

crazyhouse STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3850 W: 1930 L: 1776 D: 144
http://www.variantfishtest.org:6543/tests/view/5f403e706e23db221d9e903c

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 6821 W: 3352 L: 3156 D: 313
http://www.variantfishtest.org:6543/tests/view/5f520be76e23db221d9e90a9

5 years agoAdded functionality to ffish.js (closes #177)
QueensGambit [Tue, 8 Sep 2020 21:45:05 +0000]
Added functionality to ffish.js (closes #177)
+ board.fullmoveNumber()
+ board.isCheck()
+ board.isBikjang()
+ board.sanMove(notation)
+ board.variationSan(uciMoves)
+ board.variationSan(uciMoves, notation)
+ board.variationSan(uciMoves, notation, moveNumbers)
+ enum ffish.Notation
+ ffish.setOption()
+ ffish.setOptionInt()
+ ffish.setOptionBool()
+ ES6 module export

5 years agoDouble probability of using classical eval
SFisGOD [Sun, 6 Sep 2020 20:54:26 +0000]
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

5 years agoAlways re-enable NNUE after "bench".
Gian-Carlo Pascutto [Tue, 8 Sep 2020 13:37:53 +0000]
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.

5 years agoBug fix in do_null_move() and NNUE simplification.
syzygy1 [Sun, 6 Sep 2020 15:29:12 +0000]
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

5 years agoEvaluate ungatable pieces in Seirawan
alwey [Sat, 5 Sep 2020 07:23:12 +0000]
Evaluate ungatable pieces in Seirawan

5 years agoAlways evaluate space bonus for slow variants
Fabian Fichter [Sun, 6 Sep 2020 09:02:38 +0000]
Always evaluate space bonus for slow variants

makruk STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 908 W: 111 L: 51 D: 746
http://www.variantfishtest.org:6543/tests/view/5f5203ed6e23db221d9e90a2

makruk LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 839 W: 82 L: 25 D: 732
http://www.variantfishtest.org:6543/tests/view/5f5387446e23db221d9e90e6

shatranj STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1180 W: 143 L: 81 D: 956
http://www.variantfishtest.org:6543/tests/view/5f5204066e23db221d9e90a5

shatranj LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1026 W: 113 L: 53 D: 860
http://www.variantfishtest.org:6543/tests/view/5f53ab6a6e23db221d9e90ea

losalamos STC
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 1171 W: 312 L: 272 D: 587
http://www.variantfishtest.org:6543/tests/view/5f5295db6e23db221d9e90bd

5 years agoRevert repetition handling for janggimodern
Fabian Fichter [Sat, 5 Sep 2020 11:15:57 +0000]
Revert repetition handling for janggimodern

For better compatibility with rules in Kakao Janggi,
revert the repetition handling for janggimodern.

This does not affect the other Janggi rulesets.

5 years agoUse classical eval more often
SFisGOD [Fri, 4 Sep 2020 09:14:50 +0000]
Use classical eval more often

If there is a moderate imbalance, use classical eval with small probability (1/16),
as derived from the node counter.

STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32320 W: 3562 L: 3377 D: 25381
Ptnml(0-2): 144, 2609, 10478, 2776, 153
https://tests.stockfishchess.org/tests/view/5f520615ba100690c5cc5f80

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 21032 W: 1116 L: 974 D: 18942
Ptnml(0-2): 20, 837, 8664, 971, 24
https://tests.stockfishchess.org/tests/view/5f522eaaba100690c5cc5f8c

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

Bench: 4109324

5 years agoAdjust penalty on refuted early quiet moves
Vizvezdenec [Fri, 4 Sep 2020 12:53:59 +0000]
Adjust penalty on refuted early quiet moves

This patch changes how previous early moves are penalized in case
search finds a best move. Here, the first quiet move that was not
a transposition table move is penalized.

passed STC
https://tests.stockfishchess.org/tests/view/5f51d839ba100690c5cc5f69
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 10088 W: 1150 L: 997 D: 7941
Ptnml(0-2): 41, 772, 3278, 899, 54

passed LTC
https://tests.stockfishchess.org/tests/view/5f51e435ba100690c5cc5f76
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 30808 W: 1564 L: 1405 D: 27839
Ptnml(0-2): 19, 1245, 12717, 1404, 19

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

bench 3983758

5 years agoUpdate default net to nn-308d71810dff.nnue
Sergio Vieri [Thu, 3 Sep 2020 12:22:51 +0000]
Update default net to nn-308d71810dff.nnue

equivalent to 20200903-1739

Net trained from scratch, so it has quite different features extracted compared to the previous net (82215d0fd0df).

STC:
LLR: 2.98 (-2.94,2.94) {-0.25,1.25}
Total: 108328 W: 14048 L: 13719 D: 80561
Ptnml(0-2): 842, 10039, 32062, 10390, 831
https://tests.stockfishchess.org/tests/view/5f50e053ba100690c5cc5f00

LTC:
LLR: 2.96 (-2.94,2.94) {0.25,1.25}
Total: 13872 W: 1059 L: 890 D: 11923
Ptnml(0-2): 30, 724, 5270, 871, 41
https://tests.stockfishchess.org/tests/view/5f51821fba100690c5cc5f36

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

Bench: 3832716

5 years agoLMR Simplification
VoyagerOne [Wed, 2 Sep 2020 20:58:44 +0000]
LMR Simplification

remove reduction at non-check cut nodes for second move at low depths

STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 61712 W: 6594 L: 6543 D: 48575
Ptnml(0-2): 293, 5085, 20082, 5070, 326
https://tests.stockfishchess.org/tests/view/5f5007d6ba100690c5cc5ea9

LTC:
LLR: 2.94 (-2.94,2.94) {-0.75,0.25}
Total: 57544 W: 2983 L: 2925 D: 51636
Ptnml(0-2): 47, 2568, 23495, 2604, 58
https://tests.stockfishchess.org/tests/view/5f50c597ba100690c5cc5ef7

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

Bench: 3952302

5 years agoSimplify singularQuietLMR
Unai Corzo [Thu, 3 Sep 2020 10:18:42 +0000]
Simplify singularQuietLMR

remove formerPV dependence

STC https://tests.stockfishchess.org/tests/view/5f4cb922ba100690c5cc5d35
LLR: 2.96 (-2.94,2.94) {-1.25,0.25}
Total: 113672 W: 12347 L: 12368 D: 88957
Ptnml(0-2): 566, 9537, 36699, 9420, 614

LTC https://tests.stockfishchess.org/tests/view/5f4e8474ba100690c5cc5e12
LLR: 2.93 (-2.94,2.94) {-0.75,0.25}
Total: 43032 W: 2298 L: 2227 D: 38507
Ptnml(0-2): 45, 1940, 17475, 2011, 45

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

bench: 3290084