fairystockfish.git
4 years agoAdd Fairy-Stockfish contributor list
Fabian Fichter [Mon, 8 Mar 2021 19:39:41 +0000]
Add Fairy-Stockfish contributor list

4 years agoTweak atomic pawn value
Fabian Fichter [Mon, 8 Mar 2021 18:23:34 +0000]
Tweak atomic pawn value

atomic STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 14941 W: 5277 L: 5004 D: 4660
http://www.variantfishtest.org:6543/tests/view/60432e216e23db669974e9f5

atomic LTC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 1915 W: 676 L: 575 D: 664
http://www.variantfishtest.org:6543/tests/view/6045d4176e23db669974ea0b

4 years agoPrecalculate endgameEval flag
Fabian Fichter [Sun, 7 Mar 2021 17:42:06 +0000]
Precalculate endgameEval flag

This supersedes manual definition of the endgame evalution flag.

For a few variants the automatically calculated flag now enables
endgame evaluation where before it was explicitly disabled.

losalamos STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 1151 W: 292 L: 253 D: 606
http://www.variantfishtest.org:6543/tests/view/6044ea416e23db669974ea05

Closes #271.

4 years agoSupport shogi NNUE evaluation (#199)
Fabian Fichter [Sat, 6 Mar 2021 15:19:33 +0000]
Support shogi NNUE evaluation (#199)

Refactor variant NNUE handling in order to support
shogi NNUE evaluation and to improve maintainability.

Credits to @tttak for the initial implementation of this feature.

4 years agoFix parsing of player time in USI protocol
Fabian Fichter [Sat, 6 Mar 2021 09:52:50 +0000]
Fix parsing of player time in USI protocol

Since white and black are interchanged in the USI protocol,
the parsing of the player time needs to consider that.

Closes #269.

4 years agoFurther increase atomic PSQT bonus
Fabian Fichter [Sat, 6 Mar 2021 07:18:32 +0000]
Further increase atomic PSQT bonus

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 5823 W: 2030 L: 1878 D: 1915
http://www.variantfishtest.org:6543/tests/view/6042003b6e23db669974e9da

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2639 W: 878 L: 771 D: 990
http://www.variantfishtest.org:6543/tests/view/6042044d6e23db669974e9e0

4 years agoGeneralize doubled pawn drop setting
Fabian Fichter [Fri, 5 Mar 2021 15:33:16 +0000]
Generalize doubled pawn drop setting

Allow to prohibit dropping a doubled piece of any type,
not only restricted to shogi pawns.

Closes #266.

4 years agoFurther increase atomic PSQT bonus
Fabian Fichter [Fri, 5 Mar 2021 09:54:11 +0000]
Further increase atomic PSQT bonus

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3903 W: 1340 L: 1214 D: 1349
http://www.variantfishtest.org:6543/tests/view/60412a806e23db669974e9d0

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3286 W: 1074 L: 959 D: 1253
http://www.variantfishtest.org:6543/tests/view/60413a0b6e23db669974e9d6

4 years agoUpdated ffish.js to 0.6.1
QueensGambit [Thu, 4 Mar 2021 22:55:36 +0000]
Updated ffish.js to 0.6.1
+ added unit test for atomic(960) castling rights from @gbtami

4 years agoOnly download NNUE net if required
Fabian Fichter [Thu, 4 Mar 2021 21:58:47 +0000]
Only download NNUE net if required

Closes #257.

4 years agoTweak atomic PSQT bonus
Fabian Fichter [Thu, 4 Mar 2021 18:40:52 +0000]
Tweak atomic PSQT bonus

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 17388 W: 5929 L: 5630 D: 5829
http://www.variantfishtest.org:6543/tests/view/603fe73c6e23db669974e9c8

atomic LTC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 1756 W: 598 L: 501 D: 657
http://www.variantfishtest.org:6543/tests/view/6040982f6e23db669974e9cc

4 years agoBonus for advanced pieces in atomic
Fabian Fichter [Wed, 3 Mar 2021 19:39:49 +0000]
Bonus for advanced pieces in atomic

atomic STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 2361 W: 814 L: 708 D: 839
http://www.variantfishtest.org:6543/tests/view/603e83ab6e23db669974e9b6

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2720 W: 904 L: 796 D: 1020
http://www.variantfishtest.org:6543/tests/view/603ec8a26e23db669974e9bb

4 years agoBump pyffish version
Fabian Fichter [Sun, 28 Feb 2021 12:43:30 +0000]
Bump pyffish version

4 years agoUpdate readme
Fabian Fichter [Sun, 28 Feb 2021 12:41:44 +0000]
Update readme

4 years agoSupport pseudo-royal pieces
Fabian Fichter [Sun, 28 Feb 2021 11:27:27 +0000]
Support pseudo-royal pieces

This implements support for pseudo-royal pieces,
which allows to now fully support some new variants:
- lichess atomic rules
- coregal chess
- maharajah and the sepoys

Closes #81.

No functional change for other variants.

4 years agoTweak singular extension for horde
Fabian Fichter [Sat, 27 Feb 2021 23:20:07 +0000]
Tweak singular extension for horde

horde STC
LLR: -2.95 (-2.94,2.94) [0.00,10.00]
Total: 4108 W: 2008 L: 2050 D: 50
http://www.variantfishtest.org:6543/tests/view/60291c396e23db669974e90c

horde LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 9687 W: 4917 L: 4676 D: 94
http://www.variantfishtest.org:6543/tests/view/6029a4e46e23db669974e910

horde VLTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 11750 W: 5938 L: 5667 D: 145
http://www.variantfishtest.org:6543/tests/view/602e57606e23db669974e923

4 years agoBumb pyffish version (#263)
Bajusz Tamás [Sat, 27 Feb 2021 21:06:58 +0000]
Bumb pyffish version (#263)

4 years agoFix assertion for atomic
Fabian Fichter [Sat, 27 Feb 2021 10:26:02 +0000]
Fix assertion for atomic

No functional change.

4 years agoSupport atomic NNUE
Fabian Fichter [Fri, 26 Feb 2021 17:33:40 +0000]
Support atomic NNUE

4 years agoSpeed up move generation
Fabian Fichter [Fri, 26 Feb 2021 16:52:49 +0000]
Speed up move generation

standard STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 7654 W: 1715 L: 1705 D: 4234
http://www.variantfishtest.org:6543/tests/view/60341b906e23db669974e955

seirawan STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 7286 W: 2480 L: 2464 D: 2342
http://www.variantfishtest.org:6543/tests/view/6034b1936e23db669974e962

minishogi STC
LLR: -2.96 (-2.94,2.94) [0.00,10.00]
Total: 9644 W: 4840 L: 4804 D: 0
http://www.variantfishtest.org:6543/tests/view/6034b1796e23db669974e960

bench: 4387985

4 years agoSpeed up slider blockers
Fabian Fichter [Fri, 26 Feb 2021 16:31:15 +0000]
Speed up slider blockers

standard STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1370 W: 361 L: 280 D: 729
http://www.variantfishtest.org:6543/tests/view/603423e96e23db669974e95c

seirawan STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2789 W: 1023 L: 908 D: 858
http://www.variantfishtest.org:6543/tests/view/603423f56e23db669974e95e

4 years agoEnable faster attack calculation for more variants
Fabian Fichter [Fri, 19 Feb 2021 19:34:34 +0000]
Enable faster attack calculation for more variants

seirawan STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 311 W: 160 L: 75 D: 76
http://www.variantfishtest.org:6543/tests/view/602ff3976e23db669974e93f

capablanca STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 285 W: 151 L: 66 D: 68
http://www.variantfishtest.org:6543/tests/view/603000616e23db669974e943

shogi STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 635 W: 373 L: 261 D: 1
http://www.variantfishtest.org:6543/tests/view/602ff24e6e23db669974e93c

4 years agoFix attackers calculation for cambodian
Fabian Fichter [Fri, 19 Feb 2021 16:27:40 +0000]
Fix attackers calculation for cambodian

Use slow attackers calculation to consider special moves.

4 years agoSimplify fast attackers_to
Fabian Fichter [Fri, 19 Feb 2021 16:20:04 +0000]
Simplify fast attackers_to

dobutsu STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 12830 W: 4730 L: 4640 D: 3460
http://www.variantfishtest.org:6543/tests/view/602c34f06e23db669974e914

standard STC
LLR: 3.01 (-2.94,2.94) [-10.00,5.00]
Total: 5190 W: 1157 L: 1138 D: 2895
http://www.variantfishtest.org:6543/tests/view/602cc4366e23db669974e91c

makruk STC
LLR: 3.02 (-2.94,2.94) [-10.00,5.00]
Total: 12761 W: 978 L: 966 D: 10817
http://www.variantfishtest.org:6543/tests/view/602d5ab46e23db669974e920

4 years agoUse faster attackers generation for more variants
Fabian Fichter [Tue, 16 Feb 2021 21:09:45 +0000]
Use faster attackers generation for more variants

makruk STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 1175 W: 127 L: 66 D: 982
http://www.variantfishtest.org:6543/tests/view/6026a0606e23db669974e8f7

minishogi STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 3706 W: 1931 L: 1775 D: 0
http://www.variantfishtest.org:6543/tests/view/6026a0516e23db669974e8f4

standard STC
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 31166 W: 6843 L: 6953 D: 17370
http://www.variantfishtest.org:6543/tests/view/6026a0686e23db669974e8f9

4 years agoAdd atomic hybrid variants to variants.ini
Fabian Fichter [Fri, 12 Feb 2021 08:52:30 +0000]
Add atomic hybrid variants to variants.ini

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 11 Feb 2021 22:29:23 +0000]
Merge official-stockfish/master

bench: 4387592

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 11 Feb 2021 22:20:23 +0000]
Merge official-stockfish/master

No functional change.

4 years agoSimplify LMR for losers chess
Fabian Fichter [Wed, 10 Feb 2021 19:42:20 +0000]
Simplify LMR for losers chess

losers STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 1844 W: 823 L: 775 D: 246
http://www.variantfishtest.org:6543/tests/view/602303586e23db669974e8ca

losers LTC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 1579 W: 711 L: 661 D: 207
http://www.variantfishtest.org:6543/tests/view/602389266e23db669974e8d5

4 years agoTweak move count pruning for atomic
Fabian Fichter [Tue, 9 Feb 2021 20:52:19 +0000]
Tweak move count pruning for atomic

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2093 W: 793 L: 686 D: 614
http://www.variantfishtest.org:6543/tests/view/601c78c06e23db669974e7c5

atomic LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 4343 W: 1478 L: 1347 D: 1518
http://www.variantfishtest.org:6543/tests/view/601d0bc96e23db669974e7ee

atomic VLTC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 1722 W: 594 L: 497 D: 631
http://www.variantfishtest.org:6543/tests/view/601e71686e23db669974e813

4 years agoSpeedup for variants with commoners
Fabian Fichter [Tue, 9 Feb 2021 20:39:59 +0000]
Speedup for variants with commoners

No functional change.

4 years agoSimplify antichess move picking
Fabian Fichter [Tue, 9 Feb 2021 20:13:52 +0000]
Simplify antichess move picking

No functional change.

4 years agoImprove caching of must capture state
Fabian Fichter [Tue, 9 Feb 2021 19:30:22 +0000]
Improve caching of must capture state

giveaway STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 473 W: 222 L: 167 D: 84
http://www.variantfishtest.org:6543/tests/view/6021b77b6e23db669974e884

giveaway LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 361 W: 168 L: 114 D: 79
http://www.variantfishtest.org:6543/tests/view/6021ba026e23db669974e893

losers STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 387 W: 204 L: 144 D: 39
http://www.variantfishtest.org:6543/tests/view/6021b78d6e23db669974e887

losers LTC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 690 W: 329 L: 273 D: 88
http://www.variantfishtest.org:6543/tests/view/6021b9fb6e23db669974e891

4 years agoRemove redundant legality check
Fabian Fichter [Mon, 8 Feb 2021 21:50:15 +0000]
Remove redundant legality check

No functional change.

4 years agoSimplify shallow depth pruning for anti variants
Fabian Fichter [Mon, 8 Feb 2021 21:35:16 +0000]
Simplify shallow depth pruning for anti variants

giveaway STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1787 W: 698 L: 655 D: 434
http://www.variantfishtest.org:6543/tests/view/601e7a7a6e23db669974e823

giveaway LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1501 W: 550 L: 507 D: 444
http://www.variantfishtest.org:6543/tests/view/601ecee96e23db669974e834

losers STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 14506 W: 6366 L: 6407 D: 1733
http://www.variantfishtest.org:6543/tests/view/601e7a8f6e23db669974e827

losers LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 3939 W: 1740 L: 1707 D: 492
http://www.variantfishtest.org:6543/tests/view/601fbb036e23db669974e846

4 years agoFix ambiguous 960 castling
Fabian Fichter [Sun, 7 Feb 2021 16:37:06 +0000]
Fix ambiguous 960 castling

In case there is more than one "king" piece type that could
represent the castling piece, resolve this ambiguity in the FEN,
e.g., EAH means that an e-file king has a- and h-file rooks
with which it can perform castling.

For non-960 games disambiguation is achieved via configuration.

Closes #239.

4 years agoReduce futility pruning depth for atomic
Fabian Fichter [Sun, 7 Feb 2021 15:58:17 +0000]
Reduce futility pruning depth for atomic

atomic STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 6107 W: 2232 L: 2072 D: 1803
http://www.variantfishtest.org:6543/tests/view/601c7c016e23db669974e7da

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2860 W: 987 L: 875 D: 998
http://www.variantfishtest.org:6543/tests/view/601e6e5a6e23db669974e803

4 years agoUpdated ffish.js to 0.6.0
QueensGambit [Tue, 2 Feb 2021 22:14:29 +0000]
Updated ffish.js to 0.6.0
* made validate_fen() more robust (allows '-' for variants which do not
have no-progress counter or castling rights)
* added is_move_none() check to board.push(), board.push_san(),
board.san_move(), board.variation_san()
* added board.variant()
* bug fix: Added ++curIdx after parsing comment in read_game_pgn()
* ffish.js supports now "atomic" as it has been integrated into Fairy-
Stockfish

4 years agoUse variant piece values in atomic SEE
Fabian Fichter [Tue, 2 Feb 2021 21:14:08 +0000]
Use variant piece values in atomic SEE

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 18161 W: 6652 L: 6332 D: 5177
http://www.variantfishtest.org:6543/tests/view/60152b936e23db669974e670

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 6817 W: 2308 L: 2145 D: 2364
http://www.variantfishtest.org:6543/tests/view/601842176e23db669974e71d

4 years agoTweak futility pruning for racing kings
Fabian Fichter [Mon, 1 Feb 2021 17:57:28 +0000]
Tweak futility pruning for racing kings

racingkings STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1610 W: 544 L: 450 D: 616
http://www.variantfishtest.org:6543/tests/view/6016cb9b6e23db669974e6ce

racingkings LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 3787 W: 1113 L: 998 D: 1676
http://www.variantfishtest.org:6543/tests/view/6016d1186e23db669974e6d4

4 years agoSimplify futility pruning condition
Fabian Fichter [Sun, 31 Jan 2021 15:16:40 +0000]
Simplify futility pruning condition

No functional change.

4 years agoTune ordering of moves at internal nodes
bmc4 [Sun, 31 Jan 2021 03:05:39 +0000]
Tune ordering of moves at internal nodes

We change the relative weights of the function used to order
quiet moves in our MovePicker class.

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32184 W: 2936 L: 2773 D: 26475
Ptnml(0-2): 115, 2196, 11328, 2317, 136
https://tests.stockfishchess.org/tests/view/60161ee1735dd7f0f03530f8

Passed LTC:
LLR: 2.93 (-2.94,2.94) {0.25,1.25}
Total: 33088 W: 1292 L: 1149 D: 30647
Ptnml(0-2): 14, 1030, 14318, 1163, 19
https://tests.stockfishchess.org/tests/view/60163146735dd7f0f03530ff

The new weight were chosen after the following SPSA session:
https://tests.stockfishchess.org/tests/view/60136857735dd7f0f0352f6c

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

Bench: 4398803

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 31 Jan 2021 13:59:24 +0000]
Merge official-stockfish/master

bench: 4622210

4 years agoSimplify Chess 960 castling
bmc4 [Sun, 17 Jan 2021 18:21:45 +0000]
Simplify Chess 960 castling

a little cleanup, and small speedup (about 0.3%) for Chess 960.

Verified with perft on a large set of chess960 positions.

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

No functional change

4 years agoSpeed Up Perft Search
bmc4 [Tue, 19 Jan 2021 12:21:59 +0000]
Speed Up Perft Search

It speeds up generate<LEGAL>, and thus perft, roughly by 2-3%.

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

No functional change

4 years agoClean Up Castling in gives_check
bmc4 [Mon, 18 Jan 2021 20:03:43 +0000]
Clean Up Castling in gives_check

There is no need to add rto or kto on the Bitboard which represents the pieces.

STC:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 57064 W: 5096 L: 5067 D: 46901
Ptnml(0-2): 202, 3862, 20355, 3931, 182
https://tests.stockfishchess.org/tests/view/6005ea2c6019e097de3efa55

LTC:
LLR: 2.92 (-2.94,2.94) {-0.75,0.25}
Total: 30088 W: 1094 L: 1052 D: 27942
Ptnml(0-2): 10, 882, 13217, 926, 9
https://tests.stockfishchess.org/tests/view/6006115a6019e097de3efa6e

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

No functional change.

4 years agoAvoid more expensive legality check
bmc4 [Sat, 16 Jan 2021 04:44:11 +0000]
Avoid more expensive legality check

speedup of the code, enough to pass STC, failed LTC.

Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 68928 W: 6334 L: 6122 D: 56472
Ptnml(0-2): 233, 4701, 24369, 4943, 218
https://tests.stockfishchess.org/tests/view/6002747f6019e097de3ef8dc

Failed LTC:
LLR: -2.96 (-2.94,2.94) {0.25,1.25}
Total: 44560 W: 1702 L: 1675 D: 41183
Ptnml(0-2): 25, 1383, 19438, 1408, 26
https://tests.stockfishchess.org/tests/view/6002a4836019e097de3ef8e3

About 1% speedup:

Result of  50 runs
==================
base (...kfish.master) =    2237500  +/- 7428
test (...ckfish.patch) =    2267003  +/- 7017
diff                   =     +29503  +/- 4774

speedup        = +0.0132
P(speedup > 0) =  1.0000

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

No functional change.

4 years agoTweak probcut margin for extinction variants
Fabian Fichter [Sat, 30 Jan 2021 22:45:01 +0000]
Tweak probcut margin for extinction variants

shatranj STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1753 W: 212 L: 146 D: 1395
http://www.variantfishtest.org:6543/tests/view/601473246e23db669974e64a

shatranj LTC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 2653 W: 205 L: 173 D: 2275
http://www.variantfishtest.org:6543/tests/view/60148af66e23db669974e65e

horde LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1249 W: 648 L: 589 D: 12
http://www.variantfishtest.org:6543/tests/view/60148b226e23db669974e660

4 years agoTweak probcut margin for drop variants
Fabian Fichter [Sat, 30 Jan 2021 22:42:29 +0000]
Tweak probcut margin for drop variants

crazyhouse STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 5437 W: 2728 L: 2550 D: 159
http://www.variantfishtest.org:6543/tests/view/60152dce6e23db669974e678

crazyhouse LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 7747 W: 3821 L: 3611 D: 315
http://www.variantfishtest.org:6543/tests/view/601545596e23db669974e69a

4 years agoSmall cleanups
Lolligerhans [Tue, 12 Jan 2021 13:59:51 +0000]
Small cleanups

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

No functional change

4 years agoImprove play for closed positions
Stéphane Nicolet [Thu, 21 Jan 2021 17:53:29 +0000]
Improve play for closed positions

This patch give a small bonus to incite the attacking side to keep more
pawns on the board.

A consequence of this bonus is that Stockfish will tend to play positions
slightly more closed on average than master, especially when it believes
that it has an advantage.

To lower the risk of blockades where Stockfish start shuffling without
progress, we also implement a progressive decrease of the evaluation
value with the 50 moves counter (along with the necessary aging of the
transposition table to reduce the impact of the Graph History Interaction
problem): since the evaluation decreases during shuffling phases, the
engine will tend to examine the consequences of pawn breaks faster during
the search.

Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 26184 W: 2406 L: 2252 D: 21526
Ptnml(0-2): 85, 1784, 9223, 1892, 108
https://tests.stockfishchess.org/tests/view/600cc08b735dd7f0f0352c06

Passed LCT:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 199768 W: 7695 L: 7191 D: 184882
Ptnml(0-2): 85, 6478, 86269, 6952, 100
https://tests.stockfishchess.org/tests/view/600ccd28735dd7f0f0352c10

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

Bench: 3988915

4 years agoAdd .gitignore
Rod Johnson [Mon, 4 Jan 2021 11:59:55 +0000]
Add .gitignore

add files produced during the build to a newly added .gitignore

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

No functional change

4 years agoChange lock type
Krystian Kuzniarek [Thu, 31 Dec 2020 16:00:39 +0000]
Change lock type

No additional features of std::unique_lock has been previously used
so it's better to use a lighter lock.

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

No functional change.

4 years agoTweak futility pruning for extinction variants
Fabian Fichter [Fri, 29 Jan 2021 20:33:17 +0000]
Tweak futility pruning for extinction variants

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2994 W: 1118 L: 999 D: 877
http://www.variantfishtest.org:6543/tests/view/6014099b6e23db669974e628

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 4099 W: 1416 L: 1287 D: 1396
http://www.variantfishtest.org:6543/tests/view/601425556e23db669974e63a

extinction STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 496 W: 279 L: 177 D: 40
http://www.variantfishtest.org:6543/tests/view/601409d26e23db669974e62f

extinction LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 794 W: 410 L: 305 D: 79
http://www.variantfishtest.org:6543/tests/view/601445566e23db669974e643

kinglet STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1223 W: 587 L: 479 D: 157
http://www.variantfishtest.org:6543/tests/view/601441fc6e23db669974e641

kinglet LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 994 W: 480 L: 376 D: 138
http://www.variantfishtest.org:6543/tests/view/601445906e23db669974e645

4 years agoEnable futility pruning for atomic
Fabian Fichter [Fri, 29 Jan 2021 11:20:21 +0000]
Enable futility pruning for atomic

atomic STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 3266 W: 1256 L: 1131 D: 879
http://www.variantfishtest.org:6543/tests/view/601344bc6e23db077dd6628e

atomic LTC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 3826 W: 1349 L: 1222 D: 1255
http://www.variantfishtest.org:6543/tests/view/601345cf6e23db077dd66295

4 years agoRemove NMP reduction evaluation scaling
Fabian Fichter [Wed, 27 Jan 2021 18:08:42 +0000]
Remove NMP reduction evaluation scaling

for atomic and losing chess variants.

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 5957 W: 2213 L: 2054 D: 1690
http://www.variantfishtest.org:6543/tests/view/60106a3b6e23db077dd6623f

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2864 W: 1019 L: 905 D: 940
http://www.variantfishtest.org:6543/tests/view/60109d7b6e23db077dd6624d

giveaway STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2571 W: 1026 L: 909 D: 636
http://www.variantfishtest.org:6543/tests/view/60106a286e23db077dd6623c

giveaway LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 4502 W: 1652 L: 1514 D: 1336
http://www.variantfishtest.org:6543/tests/view/60109d1c6e23db077dd66241

4 years agoTweak NMP for atomic
Fabian Fichter [Tue, 26 Jan 2021 07:57:47 +0000]
Tweak NMP for atomic

atomic STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1896 W: 747 L: 641 D: 508
http://www.variantfishtest.org:6543/tests/view/600d9fe46e23db077dd66209

atomic LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1793 W: 659 L: 558 D: 576
http://www.variantfishtest.org:6543/tests/view/600f454c6e23db077dd66213

4 years agoTweak NMP for losing chess variants
Fabian Fichter [Mon, 25 Jan 2021 22:23:15 +0000]
Tweak NMP for losing chess variants

giveaway STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1258 W: 535 L: 434 D: 289
http://www.variantfishtest.org:6543/tests/view/600d9fc86e23db077dd66206

giveaway LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1975 W: 756 L: 650 D: 569
http://www.variantfishtest.org:6543/tests/view/600daa4d6e23db077dd6620f

4 years agoMinor cleanup
Fabian Fichter [Mon, 25 Jan 2021 18:55:02 +0000]
Minor cleanup

No functional change.

4 years agoTweak nCheck piece values
Fabian Fichter [Sun, 24 Jan 2021 09:06:55 +0000]
Tweak nCheck piece values

3check STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 9174 W: 4389 L: 4161 D: 624
http://www.variantfishtest.org:6543/tests/view/600aaacb6e23db077dd6614b

3check LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 8971 W: 4250 L: 4026 D: 695
http://www.variantfishtest.org:6543/tests/view/600ac78c6e23db077dd66153

4 years agoIncrease racing kings endgame piece values
Fabian Fichter [Fri, 22 Jan 2021 10:26:09 +0000]
Increase racing kings endgame piece values

racingkings STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 7351 W: 2363 L: 2198 D: 2790
http://www.variantfishtest.org:6543/tests/view/6009fa716e23db077dd66137

racingkings LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 6810 W: 1992 L: 1841 D: 2977
http://www.variantfishtest.org:6543/tests/view/6009fe5e6e23db077dd66145

4 years agoIncrease atomic endgame piece values
Fabian Fichter [Thu, 21 Jan 2021 21:56:29 +0000]
Increase atomic endgame piece values

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 9879 W: 3714 L: 3501 D: 2664
http://www.variantfishtest.org:6543/tests/view/6008747f6e23db077dd66107

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 9223 W: 3259 L: 3061 D: 2903
http://www.variantfishtest.org:6543/tests/view/60092b296e23db077dd66121

4 years agoReduce knight-pawn material imbalance for atomic
Fabian Fichter [Thu, 21 Jan 2021 17:51:37 +0000]
Reduce knight-pawn material imbalance for atomic

atomic STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 14756 W: 5451 L: 5175 D: 4130
http://www.variantfishtest.org:6543/tests/view/600876446e23db077dd6610d

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3112 W: 1095 L: 978 D: 1039
http://www.variantfishtest.org:6543/tests/view/60092b306e23db077dd66123

4 years agoSupport atomic chess without checks (#81)
Fabian Fichter [Tue, 19 Jan 2021 19:09:15 +0000]
Support atomic chess without checks (#81)

Add variant nocheckatomic which implements a modified version
of atomic chess where check and check-/stalemate do not apply,
which is very similar to the rules used on ICC.

The variant atomic is an incomplete implementation of
lichess atomic chess rules, added for easier usage in GUIs.
It will occasionally play illegal moves in this variant.

4 years agoAdd penalty for doubled pawns in agile structure
Lolligerhans [Tue, 12 Jan 2021 13:30:25 +0000]
Add penalty for doubled pawns in agile structure

Give an additional penalty of S(20, 10) for any doubled pawn if none of
the opponent's pawns is facing any of our
 - pawns or
 - pawn attacks;
that means, each of their pawns can push at least one square without
being captured.
This ignores their non-pawns pieces and attacks.

One possible justification: Their pawns' ability to push freely provides
options to react to our threats by changing their pawn structure. Our
doubled pawns however will likely lead to an exploitable weakness, even
if the pawn structure is not yet fixed.

Note that the notion of "their pawns not being fixed" is symmetric for
both players: If all of their pawns can push freely so can ours. All
pawns being freely pushable might just be an early-game-indicator.
However, it can trigger during endgame pawns races, where doubled pawns
are especially hindering, too.

LTC
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 134976 W: 17964 L: 17415 D: 99597
Ptnml(0-2): 998, 12702, 39619, 13091, 1078
https://tests.stockfishchess.org/tests/view/5ffdd5316019e097de3ef281

STC
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 35640 W: 7219 L: 6904 D: 21517
Ptnml(0-2): 645, 4096, 8084, 4289, 706
https://tests.stockfishchess.org/tests/view/5ffda4a16019e097de3ef265

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

Bench: 4363873

4 years agoSupport UCI-cyclone protocol
Fabian Fichter [Thu, 14 Jan 2021 21:51:01 +0000]
Support UCI-cyclone protocol

Closes #194.

4 years agoDecrease NMP reduction for racing kings
Fabian Fichter [Thu, 14 Jan 2021 20:01:22 +0000]
Decrease NMP reduction for racing kings

racingkings STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 17973 W: 5768 L: 5471 D: 6734
http://www.variantfishtest.org:6543/tests/view/5ff074b96e23db221d9e9841

racingkings LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 14105 W: 4073 L: 3838 D: 6194
http://www.variantfishtest.org:6543/tests/view/5ff9b9186e23db3b42517580

4 years agoRemove spaces from USI option names
Fabian Fichter [Thu, 14 Jan 2021 19:35:59 +0000]
Remove spaces from USI option names

USI does not allow spaces in option names:
http://hgm.nubati.net/usi.html

Some GUIs seem to rely on that and do not display options containing
spaces, so spaces in option names are now replaced by underscores.

Closes #237.

4 years agoOptimize generate_moves
Tomasz Sobczyk [Sun, 10 Jan 2021 06:30:40 +0000]
Optimize generate_moves

This change simplifies control flow in the generate_moves function which ensures the compiler doesn't duplicate work due to possibly not resolving pureness of the function calls. Also the biggest change is the removal of the unnecessary condition checking for empty b in a convoluted way. The rationale for removal of this condition is that computing attacks_bb with occupancy is not much more costly than computing pseudo attacks and overall the condition (also being likely unpredictable) is a pessimisation.

This is inspired by previous changes by @BM123499.

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 88040 W: 8172 L: 7931 D: 71937
Ptnml(0-2): 285, 6128, 30957, 6361, 289
https://tests.stockfishchess.org/tests/view/5ffc28386019e097de3ef1c7

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

No functional change.

4 years agoEvaluate shogi pawn promotion checks
Fabian Fichter [Wed, 13 Jan 2021 18:22:48 +0000]
Evaluate shogi pawn promotion checks

shogi STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 11377 W: 5693 L: 5632 D: 52
http://www.variantfishtest.org:6543/tests/view/5fe9debf6e23db221d9e9705

shogi LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 17659 W: 8964 L: 8608 D: 87
http://www.variantfishtest.org:6543/tests/view/5fef28506e23db221d9e9812

4 years agoBad Outpost Pawn Scale
FauziAkram [Sat, 9 Jan 2021 23:31:09 +0000]
Bad Outpost Pawn Scale

Changed name from Bad Outpost to Uncontested Outpost
Scale Uncontested Outpost with number of pawns + Decrease Bishop PSQT values and general tuning

Credits for the decrease of the Bishop PSQT values: Fauzi
Credits for scaling Uncontested Outpost with number of pawns: Lolligerhans
Credits for the tunings: Fauzi

Passed STC:
LLR: 2.94 (-2.94,2.94) {-0.25,1.25}
Total: 32040 W: 6593 L: 6281 D: 19166
Ptnml(0-2): 596, 3713, 7095, 4015, 601
https://tests.stockfishchess.org/tests/view/5ffa43026019e097de3ef0f2

Passed LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 84376 W: 11395 L: 10950 D: 62031
Ptnml(0-2): 652, 7930, 24623, 8287, 696
https://tests.stockfishchess.org/tests/view/5ffa6e7b6019e097de3ef0fd

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

Bench: 4287509

4 years agoRefine stat based reductions
Vizvezdenec [Sat, 9 Jan 2021 14:42:58 +0000]
Refine stat based reductions

This patch separates stat based reductions for quiet moves in case of being in check and in case of not being in check.
We will be using sum of first continuation history and main history (similar to movepicker) instead of statScore for the first case.

passed STC
https://tests.stockfishchess.org/tests/view/5ff87b2f6019e097de3ef09b
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 63992 W: 5887 L: 5678 D: 52427
Ptnml(0-2): 201, 4561, 22305, 4686, 243

passed LTC
https://tests.stockfishchess.org/tests/view/5ff8b6206019e097de3ef0b2
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 81216 W: 3127 L: 2880 D: 75209
Ptnml(0-2): 46, 2544, 35176, 2801, 41

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

bench 4395984

4 years agoRethink En Passant Evasion Capture
BM123499 [Fri, 8 Jan 2021 17:03:26 +0000]
Rethink En Passant Evasion Capture

It now checks if it were a discovery attack instead of the attacking piece is the double-moved pawn.

As a side effect, certain illegal fens have different, and slightly more logical move generation.
There is no intend to maintain particular behavior for such non-reachable fens.

Passed STC:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 47912 W: 4327 L: 4285 D: 39300
Ptnml(0-2): 144, 3312, 17012, 3334, 154
https://tests.stockfishchess.org/tests/view/5ff890946019e097de3ef0a5

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

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

No functional change

4 years agoFix static_assert.
Dieter Dobbelaere [Sun, 10 Jan 2021 11:22:52 +0000]
Fix static_assert.

With a hard-coded true, this declaration has no effect.

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

No functional change.

4 years agoUse correct chess terms + fix spelling.
Dieter Dobbelaere [Sat, 9 Jan 2021 15:46:06 +0000]
Use correct chess terms + fix spelling.

  - "discovered check" (instead of "discovery check")
  - "en passant" (instead of "en-passant")
  - "pseudo-legal" before a noun (instead of "pseudo legal")
  - "3-fold" (instead of "3fold")

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

No functional change.

4 years agoSmall code cleanup in LMR
Vizvezdenec [Sun, 10 Jan 2021 17:24:37 +0000]
Small code cleanup in LMR

In a recent patch we added comparing capture history to a number for LMR of captures.
Calling it via thisThread-> is not needed since capture history was already declared by this time -
so removing makes code slightly shorter and easier to follow.

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

No functional change.

4 years agoAffine transform robust implementation
MaximMolchanov [Mon, 11 Jan 2021 05:49:41 +0000]
Affine transform robust implementation

Size of the weights in the last layer is less than 512 bits. It leads to wrong data access for AVX512. There is no error because in current implementation it is guaranteed that there is an array of zeros after weights so zero multiplied by something is returned and sum is correct. It is a mistake that can lead to unexpected bugs in the future. Used AVX2 instructions for smaller input size.

No measurable slowdown on avx512.

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

No functional change.

4 years agoRemove Condition from Generate_Move Loop
bmc4 [Sun, 10 Jan 2021 06:30:40 +0000]
Remove Condition from Generate_Move Loop

it seems it's faster to handle blockers_for_king(~Us) outside loops

Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 22184 W: 2063 L: 1919 D: 18202
Ptnml(0-2): 63, 1485, 7855, 1623, 66
https://tests.stockfishchess.org/tests/view/5ffbee2f6019e097de3ef18d

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

No functional change

4 years agoUpdate copyright years
Joost VandeVondele [Fri, 8 Jan 2021 16:04:23 +0000]
Update copyright years

No functional change

4 years agoReorder conditions in LMR and pruning
Vizvezdenec [Fri, 1 Jan 2021 09:59:35 +0000]
Reorder conditions in LMR and pruning

Make code logic somewhat easier to follow.

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

No functional change.

4 years agoAffine transform refactoring.
MaximMolchanov [Wed, 6 Jan 2021 03:29:32 +0000]
Affine transform refactoring.

Reordered weights in such a way that accumulated sum fits to output.
Weights are grouped in blocks of four elements because four
int8 (weight type) corresponds to one int32 (output type).
No horizontal additions.
Grouped AVX512, AVX2 and SSSE3 implementations.
Repeated code was removed.

An earlier version passed STC:

LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 15336 W: 1495 L: 1355 D: 12486
Ptnml(0-2): 44, 1054, 5350, 1158, 62
https://tests.stockfishchess.org/tests/view/5ff60e106019e097de3eefd5

Speedup depends on the architecture, up to 4% measured on a NNUE only bench.

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

No functional change

4 years agoAdd workflow for ffishjs
Fabian Fichter [Thu, 7 Jan 2021 16:20:34 +0000]
Add workflow for ffishjs

- Add Makefile for easier compilation
- Run js unit tests as part of CI
- Increase test timeout to work with unoptimized builds

4 years agoUpdated ffish.js to 0.5.1
QueensGambit [Thu, 7 Jan 2021 00:41:12 +0000]
Updated ffish.js to 0.5.1
* added fix when alternative move sequence breaks to new line
* added .split(' ').sort().join() to unit tests for board.legalMoves()
and board.legalMovesSan() because move generation ordering has changed
in FairyStockfish

4 years agoUpdated ffish.js to 0.5.0
QueensGambit [Wed, 6 Jan 2021 23:41:37 +0000]
Updated ffish.js to 0.5.0
* fixed parsing PGN mainline_moves() with nested atlernative lines and
glyphs
* mapped variant "standard" or "Standard" to "chess"
* updated README.md
+ added board.toString()
+ added board.toVerboseString()
+ added "Syrov - Dgebuadze.pgn" as unit test pgn-file

4 years agoConsider soldiers for semi-open files
Fabian Fichter [Tue, 5 Jan 2021 23:52:50 +0000]
Consider soldiers for semi-open files

xiangqi STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 946 W: 310 L: 227 D: 409

janggi STC
ELO: 7.30 +-21.4 (95%) LOS: 74.9%
Total: 1000 W: 502 L: 481 D: 17

minixiangqi STC
ELO: 19.48 +-26.8 (95%) LOS: 92.3%
Total: 500 W: 207 L: 179 D: 114

4 years agoIntroduce variant piece values
Fabian Fichter [Mon, 4 Jan 2021 10:45:51 +0000]
Introduce variant piece values

For future improvements.

No functional change.

4 years agoTweak losing chess NMP reduction
Fabian Fichter [Sun, 3 Jan 2021 12:20:57 +0000]
Tweak losing chess NMP reduction

giveaway STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2636 W: 1055 L: 937 D: 644
http://www.variantfishtest.org:6543/tests/view/5ff074aa6e23db221d9e983e

giveaway LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1224 W: 503 L: 405 D: 316
http://www.variantfishtest.org:6543/tests/view/5ff0d5056e23db221d9e9847

losers STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1856 W: 882 L: 763 D: 211
http://www.variantfishtest.org:6543/tests/view/5ff08fe96e23db221d9e9843

losers LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 2315 W: 1067 L: 943 D: 305
http://www.variantfishtest.org:6543/tests/view/5ff0d4f66e23db221d9e9845

4 years agoIncrease king proximity for drop games
Fabian Fichter [Fri, 1 Jan 2021 11:43:33 +0000]
Increase king proximity for drop games

shogi STC
LLR: -2.96 (-2.94,2.94) [0.00,10.00]
Total: 13787 W: 6904 L: 6808 D: 75
http://www.variantfishtest.org:6543/tests/view/5fe9d8b56e23db221d9e96fc

shogi LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 7870 W: 4019 L: 3804 D: 47
http://www.variantfishtest.org:6543/tests/view/5fed8f3d6e23db221d9e97cd

crazyhouse STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 5057 W: 2468 L: 2438 D: 151
http://www.variantfishtest.org:6543/tests/view/5feda0aa6e23db221d9e97d3

crazyhouse LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 4781 W: 2325 L: 2293 D: 163
http://www.variantfishtest.org:6543/tests/view/5feda3ba6e23db221d9e97db

minishogi STC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 10080 W: 5061 L: 5019 D: 0
http://www.variantfishtest.org:6543/tests/view/5fea062b6e23db221d9e9714

minishogi LTC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 3575 W: 1809 L: 1766 D: 0
http://www.variantfishtest.org:6543/tests/view/5feda1c26e23db221d9e97d6

4 years agoWeakUnopposed penalty for backwards on file A or H
FauziAkram [Fri, 25 Dec 2020 14:19:04 +0000]
WeakUnopposed penalty for backwards on file A or H

Do not give the WeakUnopposed penalty for backwards on file A or H

The original idea comes from Lolligerhans, and a series of tunings and tests done by Fauzi.

Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 140864 W: 28127 L: 27660 D: 85077
Ptnml(0-2): 2529, 16660, 31735, 16831, 2677
https://tests.stockfishchess.org/tests/view/5fe39dec3932f79192d39673

Passed LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 67568 W: 8993 L: 8590 D: 49985
Ptnml(0-2): 523, 6176, 19983, 6579, 523
https://tests.stockfishchess.org/tests/view/5fe3dd1b3932f79192d39693

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

Bench: 4109336

4 years agoRemove razoring
Unai Corzo [Sat, 26 Dec 2020 12:48:04 +0000]
Remove razoring

has become ineffective now.

STC https://tests.stockfishchess.org/tests/view/5fe653403932f79192d3981a
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 63448 W: 5965 L: 5934 D: 51549
Ptnml(0-2): 230, 4738, 21769, 4745, 242

LTC https://tests.stockfishchess.org/tests/view/5fe6f0f03932f79192d39856
LLR: 2.93 (-2.94,2.94) {-0.75,0.25}
Total: 65368 W: 2485 L: 2459 D: 60424
Ptnml(0-2): 33, 2186, 28230, 2192, 43

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

bench: 4493379

4 years agoSimplify away late irreversible move extension
Unai Corzo [Sun, 27 Dec 2020 20:19:19 +0000]
Simplify away late irreversible move extension

Late irreversible move extension seems to be useless now.

STC https://tests.stockfishchess.org/tests/view/5fe75c5c3932f79192d398ca
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 196192 W: 18111 L: 18278 D: 159803
Ptnml(0-2): 681, 14097, 68652, 14040, 626

LTC https://tests.stockfishchess.org/tests/view/5fe875e23932f79192d39952
LLR: 2.96 (-2.94,2.94) {-0.75,0.25}
Total: 28080 W: 1105 L: 1053 D: 25922
Ptnml(0-2): 13, 904, 12158, 948, 17

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

bench: 4144640

4 years agoAssorted parameter tweak
Unai Corzo [Wed, 30 Dec 2020 14:38:25 +0000]
Assorted parameter tweak

Parameter tweak from various tunes and patches.

STC https://tests.stockfishchess.org/tests/view/5fec2ae36019e097de3ee94a
LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 41976 W: 4032 L: 3848 D: 34096
Ptnml(0-2): 147, 3086, 14341, 3264, 150

LTC https://tests.stockfishchess.org/tests/view/5fec5c3c6019e097de3ee973
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 23936 W: 970 L: 844 D: 22122
Ptnml(0-2): 14, 749, 10319, 869, 17

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

bench: 4354546

4 years agoTweak capture LMR.
Stefan Geschwentner [Thu, 31 Dec 2020 00:45:37 +0000]
Tweak capture LMR.

Apply the recently added LMR condition for captures at nodes which are not PV or former PV nodes only if capture history is not too good.

STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 95296 W: 8917 L: 8660 D: 77719
Ptnml(0-2): 323, 6871, 33045, 7044, 365
https://tests.stockfishchess.org/tests/view/5feca7f46019e097de3ee9ae

LTC:
LLR: 2.95 (-2.94,2.94) {0.25,1.25}
Total: 29216 W: 1172 L: 1034 D: 27010
Ptnml(0-2): 11, 946, 12568, 1060, 23
https://tests.stockfishchess.org/tests/view/5fecf1786019e097de3ee9d5

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

Bench: 4006138

4 years agoDo not apply pawn bonus to shatranj
Fabian Fichter [Thu, 31 Dec 2020 11:35:01 +0000]
Do not apply pawn bonus to shatranj

Fix previous commit to not accidentally apply to shatranj.

4 years agoIncrease horde pawn endgame value
Fabian Fichter [Thu, 31 Dec 2020 11:17:55 +0000]
Increase horde pawn endgame value

horde STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 7249 W: 3673 L: 3467 D: 109
http://www.variantfishtest.org:6543/tests/view/5fea67286e23db221d9e972b

horde LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 6951 W: 3541 L: 3339 D: 71
http://www.variantfishtest.org:6543/tests/view/5fecf25e6e23db221d9e97c9

4 years agoUse negative piece values for codrus
Fabian Fichter [Thu, 31 Dec 2020 10:51:46 +0000]
Use negative piece values for codrus

codrus STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 181 W: 143 L: 38 D: 0
http://www.variantfishtest.org:6543/tests/view/5feda3686e23db221d9e97d8

codrus LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 244 W: 175 L: 69 D: 0
http://www.variantfishtest.org:6543/tests/view/5feda5176e23db221d9e97dd

4 years agoSkip king safety evaluation for losers chess
Fabian Fichter [Wed, 30 Dec 2020 16:42:46 +0000]
Skip king safety evaluation for losers chess

losers STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 926 W: 468 L: 362 D: 96
http://www.variantfishtest.org:6543/tests/view/5fec4f466e23db221d9e97a3

losers LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1257 W: 608 L: 498 D: 151
http://www.variantfishtest.org:6543/tests/view/5fec53896e23db221d9e97ae

4 years agoFix compiler error for MSVC
Fabian Fichter [Wed, 30 Dec 2020 09:50:13 +0000]
Fix compiler error for MSVC

4 years agoSkip mobility danger for drop variants
Fabian Fichter [Wed, 30 Dec 2020 08:47:35 +0000]
Skip mobility danger for drop variants

shogi STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1223 W: 671 L: 551 D: 1
http://www.variantfishtest.org:6543/tests/view/5feb75826e23db221d9e978d

shogi LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1463 W: 788 L: 665 D: 10
http://www.variantfishtest.org:6543/tests/view/5feb876b6e23db221d9e979d

crazyhouse STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 2044 W: 1019 L: 967 D: 58
http://www.variantfishtest.org:6543/tests/view/5feb78aa6e23db221d9e9790

crazyhouse LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 2570 W: 1260 L: 1212 D: 98
http://www.variantfishtest.org:6543/tests/view/5febb3ab6e23db221d9e979f

minishogi STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 1559 W: 808 L: 751 D: 0
http://www.variantfishtest.org:6543/tests/view/5feb793c6e23db221d9e9793

minishogi LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 1724 W: 890 L: 834 D: 0
http://www.variantfishtest.org:6543/tests/view/5febb3c26e23db221d9e97a1

4 years agoReduce material imbalance for drop variants
Fabian Fichter [Mon, 28 Dec 2020 11:52:12 +0000]
Reduce material imbalance for drop variants

crazyhouse STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 6889 W: 3445 L: 3246 D: 198
http://www.variantfishtest.org:6543/tests/view/5fe880736e23db221d9e96db

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 10937 W: 5394 L: 5138 D: 405
http://www.variantfishtest.org:6543/tests/view/5fe886dc6e23db221d9e96de

minishogi STC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 2499 W: 1275 L: 1224 D: 0
http://www.variantfishtest.org:6543/tests/view/5fe8d0296e23db221d9e96e0