fairystockfish.git
4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 6 Jun 2021 17:03:54 +0000]
Merge official-stockfish/master

No change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 6 Jun 2021 16:55:34 +0000]
Merge official-stockfish/master

bench: 5392690

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 6 Jun 2021 16:34:46 +0000]
Merge official-stockfish/master

No functional change.

4 years agoUpdate variants.ini
Fabian Fichter [Wed, 2 Jun 2021 07:08:59 +0000]
Update variants.ini

4 years agoAdd Betza notation for built-in pieces
Fabian Fichter [Tue, 1 Jun 2021 19:51:41 +0000]
Add Betza notation for built-in pieces

4 years agoSupport lower UCI Elo levels
Fabian Fichter [Sat, 29 May 2021 21:08:04 +0000]
Support lower UCI Elo levels

Extends UCI_Elo range to support negative Skill Levels
also via corresponding UCI_Elo values.

4 years agoImplement negation for 128bit Bitboard
Fabian Fichter [Sat, 22 May 2021 12:49:20 +0000]
Implement negation for 128bit Bitboard

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 22 May 2021 12:21:58 +0000]
Merge official-stockfish/master

bench: 5199018

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 22 May 2021 12:00:27 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 22 May 2021 11:48:31 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 18 May 2021 13:34:32 +0000]
Merge official-stockfish/master

bench: 5269468

4 years agoReturn to development version
Fabian Fichter [Tue, 18 May 2021 13:26:05 +0000]
Return to development version

4 years agoFairy-Stockfish 13.1
Fabian Fichter [Thu, 13 May 2021 13:14:24 +0000]
Fairy-Stockfish 13.1

bench: 4039197

4 years agoMinor updates for variants.ini
Fabian Fichter [Thu, 13 May 2021 13:10:53 +0000]
Minor updates for variants.ini

No functional change.

4 years agoSupport mobility region config for custom pieces
Fabian Fichter [Sat, 8 May 2021 12:26:06 +0000]
Support mobility region config for custom pieces

4 years agoSimplify rider type assertions
Fabian Fichter [Sat, 1 May 2021 20:23:01 +0000]
Simplify rider type assertions

No functional change.

4 years agoAllow to skip pocket in FEN validation
Fabian Fichter [Sat, 1 May 2021 19:47:31 +0000]
Allow to skip pocket in FEN validation

Part of #288.

4 years agoConsider custom pieces in insufficient material
Fabian Fichter [Sat, 1 May 2021 19:24:58 +0000]
Consider custom pieces in insufficient material

Consider all custom pieces to have mating potential
in order to avoid false positive insufficient material calls.

Temporary solution for #294.

4 years agoTurn Grasshopper into a built-in variant
Fabian Fichter [Sat, 1 May 2021 17:13:22 +0000]
Turn Grasshopper into a built-in variant

4 years agoMake precalculated magics constexpr
Fabian Fichter [Sat, 1 May 2021 13:57:01 +0000]
Make precalculated magics constexpr

No functional change.

4 years agoFix perft test
Fabian Fichter [Sat, 1 May 2021 13:56:20 +0000]
Fix perft test

4 years agoFix Tori shogi
Fabian Fichter [Sat, 1 May 2021 13:13:38 +0000]
Fix Tori shogi

4 years agoSupport Tori shogi
Fabian Fichter [Sat, 1 May 2021 13:02:01 +0000]
Support Tori shogi

4 years agoSupport Grasshopper
Fabian Fichter [Sat, 1 May 2021 10:18:06 +0000]
Support Grasshopper

Credits to @yoav-rozin for the initial implementation.

Closes #292.

4 years agoSimplify piece initialization
Fabian Fichter [Sat, 1 May 2021 09:02:34 +0000]
Simplify piece initialization

No functional change.

4 years agoSupport limited distance sliders
Fabian Fichter [Fri, 30 Apr 2021 22:36:54 +0000]
Support limited distance sliders

4 years agoSupport Nightrider
Fabian Fichter [Fri, 30 Apr 2021 19:42:40 +0000]
Support Nightrider

4 years agoSupport diagonal cannon movements
Fabian Fichter [Fri, 30 Apr 2021 14:50:29 +0000]
Support diagonal cannon movements

4 years agoComplete variant descriptions
Fabian Fichter [Sun, 25 Apr 2021 14:25:17 +0000]
Complete variant descriptions

Add brief descriptions and references to all remaining variants.

Closes #248.

4 years agoFix ambiguous castling notation
Fabian Fichter [Fri, 23 Apr 2021 15:49:44 +0000]
Fix ambiguous castling notation

Use chess960 castling notation when castling move would be ambiguous.

Closes #295.

4 years agoAdd more variant descriptions
Fabian Fichter [Fri, 23 Apr 2021 11:03:08 +0000]
Add more variant descriptions

4 years agoSpeed up piece evaluation
Fabian Fichter [Fri, 23 Apr 2021 09:29:46 +0000]
Speed up piece evaluation

standard STC
ELO: 16.27 +-4.6 (95%) LOS: 100.0%
Total: 10000 W: 2492 L: 2024 D: 5484

No functional change.

4 years agoSpeed up pocket evaluation
Fabian Fichter [Thu, 22 Apr 2021 20:33:39 +0000]
Speed up pocket evaluation

crazyhouse STC
ELO: 23.77 +-6.7 (95%) LOS: 100.0%
Total: 10000 W: 5176 L: 4493 D: 331

No functional change.

4 years agoUpdate Variants.ini (#290)
Belzedar94 [Wed, 21 Apr 2021 18:33:26 +0000]
Update Variants.ini (#290)

Add support for the following variants:

4x5 Chess // https://greenchess.net/rules.php?v=4x5-chess --> Solved draw
4x6 Chess // https://greenchess.net/rules.php?v=4x6-chess --> Solved draw
5x6 chess // https://greenchess.net/rules.php?v=5x6-chess
Active chess // https://greenchess.net/rules.php?v=active
Advanced Pawn chess // https://greenchess.net/rules.php?v=advanced-pawn
Capture-all Chess // https://greenchess.net/rules.php?v=capture-all
Capture chess // https://vchess.club/#/variants/Capture
Checkless 6x6 Atomic // Checkless atomic on a 6x6 board
Corner Rook Chess // https://greenchess.net/rules.php?v=corner-rook
Crossing chess // https://vchess.club/#/variants/Crossing
Diana Chess // https://greenchess.net/rules.php?v=diana (Kingside castling not working)
Double Army chess // https://vchess.club/#/variants/Doublearmy
Empire // https://vchess.club/#/variants/Empire
Goth House // Gothic Chess + Crazyhouse
Maharajah 2 // https://vchess.club/#/variants/Maharajah (Balanced version of Maharajah and the Sepoys)
Microchess // https://greenchess.net/rules.php?v=microchess
Pawn Massacre chess // https://vchess.club/#/variants/Pawnmassacre
Screen chess // https://vchess.club/#/variants/Screen (This version assumes 1 drop per turn instead of the whole blind setup as in vchess)
Shinobi // https://vchess.club/#/variants/Shinobi
Synochess // https://www.pychess.org/variant/synochess
Wildebeest // https://vchess.club/#/variants/Wildebeest

4 years agoBump pyffish version (#297)
Bajusz Tamás [Wed, 21 Apr 2021 08:08:16 +0000]
Bump pyffish version (#297)

4 years agoTweak automatic piece value calculation
Fabian Fichter [Mon, 19 Apr 2021 21:57:59 +0000]
Tweak automatic piece value calculation

4 years agoUpdate expected test results
Fabian Fichter [Sun, 18 Apr 2021 20:02:56 +0000]
Update expected test results

4 years agoTweak king PSQT for check and atomic variants
Fabian Fichter [Sun, 18 Apr 2021 19:58:40 +0000]
Tweak king PSQT for check and atomic variants

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1708 W: 617 L: 518 D: 573
http://www.variantfishtest.org:6543/tests/view/606f41666e23db21bb8bcac1

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1519 W: 529 L: 435 D: 555
http://www.variantfishtest.org:6543/tests/view/60701de66e23db21bb8bcad0

3check STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2576 W: 1279 L: 1145 D: 152
http://www.variantfishtest.org:6543/tests/view/606f417d6e23db21bb8bcac6

3check LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2153 W: 1065 L: 938 D: 150
http://www.variantfishtest.org:6543/tests/view/60701dd66e23db21bb8bcacc

karouk STC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 575 W: 293 L: 234 D: 48
http://www.variantfishtest.org:6543/tests/view/6074a1166e23db21bb8bcb07

karouk LTC
LLR: 2.95 (-2.94,2.94) [-10.00,5.00]
Total: 673 W: 323 L: 267 D: 83
http://www.variantfishtest.org:6543/tests/view/607575ee6e23db21bb8bcb1d

4 years agoReplace rarely used pieces by configuration
Fabian Fichter [Sun, 18 Apr 2021 19:52:44 +0000]
Replace rarely used pieces by configuration

4 years agoUse letter 'f' for Falcon piece in Ordamirror (#293)
Bajusz Tamás [Sun, 18 Apr 2021 12:49:38 +0000]
Use letter 'f' for Falcon piece in Ordamirror  (#293)

4 years agoSupport configurable pieces
Fabian Fichter [Sat, 17 Apr 2021 17:01:20 +0000]
Support configurable pieces

* Add >20 slots for user defined pieces
* Parse piece movement from Betza notation
* Precalculate piece values but allow overrides
* Support Tencubed, Yari shogi, and Okisaki shogi

Closes #58 and #146.

bench: 4039197

4 years agoRevert previous patch
Stéphane Nicolet [Thu, 15 Apr 2021 09:18:38 +0000]
Revert previous patch

Revert the previous patch about move generation, as it unexpectedly
changed the bench. Better to take the time to understand the issue.

Bench: 4191632

4 years agoMerge all move generators
bmc4 [Fri, 2 Apr 2021 12:30:14 +0000]
Merge all move generators

Merging `generate<EVASIONS>` and `generate<QUIET_CHECKS>` into `generate_all()`.

STC:
LLR: 2.94 (-2.94,2.94) {-1.00,0.20}
Total: 161800 W: 14585 L: 14624 D: 132591
Ptnml(0-2): 577, 11681, 56451, 11586, 605
https://tests.stockfishchess.org/tests/view/606532732b2df919fd5f026d

LTC:
LLR: 2.98 (-2.94,2.94) {-0.70,0.20}
Total: 188504 W: 6906 L: 6961 D: 174637
Ptnml(0-2): 87, 6272, 81610, 6175, 108
https://tests.stockfishchess.org/tests/view/6065b0772b2df919fd5f02ae

------------

Verified for correctness of `EVASIONS` by running perft:
```
./stockfish b3nch 16 1 6 default perft          (replace 3 by e in b3nch)
Nodes searched  : 71608931810
```

Also tested for correctness on Chess960 with a similar code shown here:
https://github.com/official-stockfish/Stockfish/pull/3418#issuecomment-816630295

```
./stockfish b3nch 16 1 6 fischer.txt perft
Nodes searched  : 506736009395
```

------------

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

No functional change

4 years agoAdd error message for ffishjs start FEN test
Fabian Fichter [Wed, 14 Apr 2021 20:35:34 +0000]
Add error message for ffishjs start FEN test

4 years agoBump pyffish version (#289)
Bajusz Tamás [Tue, 13 Apr 2021 10:22:08 +0000]
Bump pyffish version (#289)

4 years agoSimplify bitboard initialization
Fabian Fichter [Sun, 11 Apr 2021 17:09:18 +0000]
Simplify bitboard initialization

No functional change.

4 years agoDefine piece types using Betza notation
Fabian Fichter [Sun, 11 Apr 2021 14:44:51 +0000]
Define piece types using Betza notation

As preparation for configurable piece types,
simplify definition of piece types by using Betza notation.

No functional change.

4 years agoRefactor FEN validation
Fabian Fichter [Fri, 9 Apr 2021 15:52:57 +0000]
Refactor FEN validation

- Support X-FEN validation
- Support fetching variant list in pyffish
- Use variant configuration properties more consistently
- Fix a few corner cases
- Improve test coverage
- More consistent formatting

Closes #87.

4 years agoReplace distanceFromPv with a better logic
Vizvezdenec [Tue, 6 Apr 2021 13:51:05 +0000]
Replace distanceFromPv with a better logic

This patch removes the recently introduced distanceFromPv logic, and replaces
it with following logic: if reduction of moves with low movecount is really
negative, we search them deeper than the first move.

passed STC:
LLR: 2.95 (-2.94,2.94) {-0.20,1.10}
Total: 153008 W: 13913 L: 13579 D: 125516
Ptnml(0-2): 547, 10811, 53470, 11113, 563
https://tests.stockfishchess.org/tests/view/6069c9d02b2df919fd5f04d2

passed LTC:
LLR: 2.94 (-2.94,2.94) {0.20,0.90}
Total: 101920 W: 3964 L: 3699 D: 94257
Ptnml(0-2): 55, 3279, 44019, 3560, 47
https://tests.stockfishchess.org/tests/view/606a99fd2b2df919fd5f0532

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

Bench: 4191632

4 years agoKeep more pawns
Stéphane Nicolet [Sun, 4 Apr 2021 08:51:45 +0000]
Keep more pawns

This patch increases the weight of pawns in the scale factor applied
to the output of the NNUE evaluation. This has the effect that Stockfish
will try a little bit harder to keep more pawns in position where the
engine has the advantage, and exchange more pawns in bad positions.

STC:
LLR: 2.93 (-2.94,2.94) {-0.20,1.10}
Total: 42552 W: 3858 L: 3668 D: 35026
Ptnml(0-2): 152, 2956, 14876, 3134, 158
https://tests.stockfishchess.org/tests/view/606a06dd2b2df919fd5f0504

LTC:
LLR: 2.95 (-2.94,2.94) {0.20,0.90}
Total: 44328 W: 1703 L: 1531 D: 41094
Ptnml(0-2): 20, 1373, 19207, 1543, 21
https://tests.stockfishchess.org/tests/view/606aa4ec2b2df919fd5f053e

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

Bench: 4310076

4 years agoUpdate readme
Fabian Fichter [Mon, 5 Apr 2021 11:47:52 +0000]
Update readme

4 years agoSimplify evaluation of virtual pieces
Fabian Fichter [Sun, 4 Apr 2021 13:50:15 +0000]
Simplify evaluation of virtual pieces

bughouse STC
ELO: 107.54 +-72.6 (95%) LOS: 99.9%
Total: 100 W: 65 L: 35 D: 0

bughouse LTC
ELO: 138.99 +-75.2 (95%) LOS: 100.0%
Total: 100 W: 69 L: 31 D: 0

4 years agoSupport virtual piece drops (#122)
Fabian Fichter [Sun, 4 Apr 2021 09:08:48 +0000]
Support virtual piece drops (#122)

Support negative piece counts for bughouse,
and allow virtual piece drops under certain conditions.
This enables the engine to consider the effect of future piece flows,
which is required for more sophisticated communication and strategy.

This significantly improves performance against human opponents,
with only a moderate regression in self-play.

4 years agoPrepare for virtual piece drops
Fabian Fichter [Fri, 2 Apr 2021 19:37:51 +0000]
Prepare for virtual piece drops

Make code more robust for negative piece count.

No functional change.

4 years agoSome more variant descriptions
Fabian Fichter [Fri, 2 Apr 2021 18:32:12 +0000]
Some more variant descriptions

No functional change.

4 years agoSimplify piece value calculation
Fabian Fichter [Thu, 1 Apr 2021 17:14:22 +0000]
Simplify piece value calculation

karouk STC
LLR: -2.99 (-2.94,2.94) [-10.00,5.00]
Total: 9432 W: 4175 L: 4305 D: 952
http://www.variantfishtest.org:6543/tests/view/60620a8b6e23db21bb8bca92

karouk LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 4812 W: 2122 L: 2095 D: 595
http://www.variantfishtest.org:6543/tests/view/6062c9c06e23db21bb8bca97

4 years agoSmall clean-up
Stéphane Nicolet [Wed, 24 Mar 2021 20:55:49 +0000]
Small clean-up

Bench: 4321677

4 years agoSimplify King Evasion
bmc4 [Tue, 30 Mar 2021 03:42:45 +0000]
Simplify King Evasion

Simplify away the removal of some illegal `KING`-evasion moves during move
generation. Verified for correctness by running perft on the following positions:

```
./stockfish
bench 16 1 6 default perft
Nodes searched: 71608931810

./stockfish
position fen 4rrk1/1p1nq3/p7/2p1P1pp/3P2bp/3Q1Bn1/PPPB4/1K2R1NR w - - 40 21
go perft 6
Nodes searched: 6136386434
```

Passed STC:
LLR: 2.94 (-2.94,2.94) {-1.00,0.20}
Total: 16072 W: 1473 L: 1349 D: 13250
Ptnml(0-2): 57, 1047, 5710, 1159, 63
https://tests.stockfishchess.org/tests/view/60629e7ef183b42957b423b1

Passed LTC:
LLR: 2.94 (-2.94,2.94) {-0.70,0.20}
Total: 59064 W: 2214 L: 2177 D: 54673
Ptnml(0-2): 26, 1944, 25556, 1979, 27
https://tests.stockfishchess.org/tests/view/6062dce4f183b42957b423de

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

No functional change

4 years agoAdd more comments for variant code
Fabian Fichter [Mon, 29 Mar 2021 19:38:00 +0000]
Add more comments for variant code

No functional change.

4 years agoExtend variant configuration checks
Fabian Fichter [Mon, 29 Mar 2021 19:07:37 +0000]
Extend variant configuration checks

4 years agoAdd more variant documentation comments (#248)
Fabian Fichter [Mon, 29 Mar 2021 18:32:07 +0000]
Add more variant documentation comments (#248)

No functional change.

4 years agoImprove test coverage
Fabian Fichter [Mon, 29 Mar 2021 17:56:27 +0000]
Improve test coverage

Add further tests to cover more variant configuration features.

Closes #279.

No functional change.

4 years agoBetter document piece value calculation
Fabian Fichter [Mon, 29 Mar 2021 10:38:49 +0000]
Better document piece value calculation

No functional change.

4 years agoSimplify and unify FRC cornered bishop.
mstembera [Thu, 25 Mar 2021 20:33:05 +0000]
Simplify and unify FRC cornered bishop.

tested locally as fishtest doesn't support FRC:

STC NNUE
9646 - 9647 - 20707 [0.500] 40000 -0.0 +/- 2.4, LOS: 49.7 %, DrawRatio: 51.8 %

STC classical
9678 - 9609 - 20713 [0.501] 40000 0.6 +/- 2.4, LOS: 69.0 %, DrawRatio: 51.8 %

and verified independently:

Score of master vs patch: 6463 - 6580 - 34957 [0.499] 48000

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

bench: 4321677

4 years agoAllow using Intel SDE for PGO builds.
Tomasz Sobczyk [Sat, 27 Feb 2021 10:52:18 +0000]
Allow using Intel SDE for PGO builds.

The software development emulator (SDE) allows to run binaries compiled
for architectures not supported by the actual CPU. This is useful to
do PGO builds for newer architectures. The SDE can currently be obtained from
https://software.intel.com/content/www/us/en/develop/articles/intel-software-development-emulator.html

This patch introduces a new optional makefile argument SDE_PATH.
If not empty it should contain the path to the sde executable

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

No functional change.

4 years agoSimplify variant piece value adjustments
Fabian Fichter [Sat, 27 Mar 2021 12:39:05 +0000]
Simplify variant piece value adjustments

No functional change.

4 years agoTweak racing kings middlegame values
Fabian Fichter [Fri, 26 Mar 2021 22:51:40 +0000]
Tweak racing kings middlegame values

racingkings STC
LLR: -2.96 (-2.94,2.94) [0.00,10.00]
Total: 60604 W: 19139 L: 18467 D: 22998
http://www.variantfishtest.org:6543/tests/view/605e65a06e23db21bb8bca5c

racingkings LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3390 W: 1026 L: 914 D: 1450
http://www.variantfishtest.org:6543/tests/view/605e78e96e23db21bb8bca5f

4 years agoTweak racing kings endgame piece values
Fabian Fichter [Sat, 27 Mar 2021 10:49:35 +0000]
Tweak racing kings endgame piece values

racingkings STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1035 W: 370 L: 282 D: 383
http://www.variantfishtest.org:6543/tests/view/605e58276e23db21bb8bca56

racingkings LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1886 W: 582 L: 488 D: 816
http://www.variantfishtest.org:6543/tests/view/605e64f66e23db21bb8bca5a

4 years agoSmall cleanups (march 2021)
Stéphane Nicolet [Fri, 19 Mar 2021 18:43:25 +0000]
Small cleanups (march 2021)

With help of @BM123499, @mstembera, @gvreuls, @noobpwnftw and @Fanael
Thanks!

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

No functional change

4 years agoSimplify horde breakthrough bonus
Fabian Fichter [Mon, 22 Mar 2021 19:07:04 +0000]
Simplify horde breakthrough bonus

horde STC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 9409 W: 4643 L: 4643 D: 123
http://www.variantfishtest.org:6543/tests/view/6057234c6e23db669974eb19

horde LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 3083 W: 1546 L: 1500 D: 37
http://www.variantfishtest.org:6543/tests/view/6058449d6e23db669974eb27

4 years agoTweak atomic pawn endgame value
Fabian Fichter [Mon, 22 Mar 2021 19:06:20 +0000]
Tweak atomic pawn endgame value

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 2650 W: 951 L: 839 D: 860
http://www.variantfishtest.org:6543/tests/view/60571eb36e23db669974eb07

atomic LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 5829 W: 1959 L: 1810 D: 2060
http://www.variantfishtest.org:6543/tests/view/60579b976e23db669974eb24

4 years agoFix en passant in FEN for grand in CECP
Fabian Fichter [Fri, 19 Mar 2021 23:44:19 +0000]
Fix en passant in FEN for grand in CECP

Closes #282.

4 years agoMake atomic castling fully compatible with lichess
Fabian Fichter [Fri, 19 Mar 2021 23:38:29 +0000]
Make atomic castling fully compatible with lichess

Closes #281.

4 years agoUse reference instead of pointer for pop_lsb() signature
Guy Vreuls [Sat, 13 Mar 2021 16:40:07 +0000]
Use reference instead of pointer for pop_lsb() signature

This patch changes the pop_lsb() signature from Square pop_lsb(Bitboard*) to
Square pop_lsb(Bitboard&). This is more idomatic for C++ style signatures.

Passed a non-regression STC test:
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 21280 W: 1928 L: 1847 D: 17505
Ptnml(0-2): 71, 1427, 7558, 1518, 66
https://tests.stockfishchess.org/tests/view/6053a1e22433018de7a38e2f

We have verified that the generated binary is identical on gcc-10.

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

No functional change.

4 years agoExtend perft tests (#279)
Fabian Fichter [Fri, 19 Mar 2021 18:52:37 +0000]
Extend perft tests (#279)

4 years agoDouble atomic PSQT bonus
Fabian Fichter [Fri, 19 Mar 2021 12:10:44 +0000]
Double atomic PSQT bonus

atomic STC
LLR: 2.94 (-2.94,2.94) [0.00,10.00]
Total: 2344 W: 840 L: 733 D: 771
http://www.variantfishtest.org:6543/tests/view/605270806e23db669974eac6

atomic LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1767 W: 615 L: 517 D: 635
http://www.variantfishtest.org:6543/tests/view/605300406e23db669974ead2

4 years agoTweak PSQT for pseudo-kings
Fabian Fichter [Fri, 19 Mar 2021 12:09:37 +0000]
Tweak PSQT for pseudo-kings

extinction STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 495 W: 285 L: 181 D: 29
http://www.variantfishtest.org:6543/tests/view/605300756e23db669974ead6

extinction LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 429 W: 253 L: 150 D: 26
http://www.variantfishtest.org:6543/tests/view/605390b36e23db669974eada

atomic STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3389 W: 1195 L: 1074 D: 1120
http://www.variantfishtest.org:6543/tests/view/605271e06e23db669974eacc

atomic LTC
LLR: 2.94 (-2.94,2.94) [0.00,10.00]
Total: 1599 W: 546 L: 452 D: 601
http://www.variantfishtest.org:6543/tests/view/605390e86e23db669974eade

4 years agoAdd a specific FRC correction from classical to NNUE
Vizvezdenec [Mon, 15 Mar 2021 18:05:01 +0000]
Add a specific FRC correction from classical to NNUE

our net currently is not trained on FRC games, and so doesn't know about the important pattern of a bishop that is cornered in FRC.
This patch introduces a term we have in the classical evaluation for this case, and adds it to the NNUE eval.

Since fishtest doesn't support FRC right now, the patch was tested locally at STC conditions,
starting from the book of FRC starting positions.

Score of master vs patch: 993 - 2226 - 6781  [0.438] 10000

Which corresponds to approximately 40 Elo

The patch passes non-regression testing for traditional chess (where it adds one branch).

passed STC:
https://tests.stockfishchess.org/tests/view/604fa2532433018de7a38b67
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 30560 W: 2701 L: 2636 D: 25223
Ptnml(0-2): 88, 2056, 10921, 2133, 82

passed STC also in an earlier version:
https://tests.stockfishchess.org/tests/view/604f61282433018de7a38b4d

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

No functional change

4 years agoChange definition of between_bb()
bmc4 [Mon, 15 Mar 2021 19:06:42 +0000]
Change definition of between_bb()

We remark that in current master, most of our use cases for between_bb() can be
optimized if the second parameter of the function is added to the segment. So we
change the definition of between_bb(s1, s2) such that it excludes s1 but includes s2.

We also use a precomputed array for between_bb() for another small speed gain
(see https://tests.stockfishchess.org/tests/view/604d09f72433018de7a389fb).

Passed STC:
LLR: 2.96 (-2.94,2.94) {-0.25,1.25}
Total: 18736 W: 1746 L: 1607 D: 15383
Ptnml(0-2): 61, 1226, 6644, 1387, 50
https://tests.stockfishchess.org/tests/view/60428c84ddcba5f0627bb6e4

Yellow LTC:
LTC:
LLR: -3.00 (-2.94,2.94) {0.25,1.25}
Total: 39144 W: 1431 L: 1413 D: 36300
Ptnml(0-2): 13, 1176, 17184, 1178, 21
https://tests.stockfishchess.org/tests/view/605128702433018de7a38ca1

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

---------

Verified for correctness by running perft on the following position:

./stockfish
position fen 4rrk1/1p1nq3/p7/2p1P1pp/3P2bp/3Q1Bn1/PPPB4/1K2R1NR w - - 40 21
go perft 6

Nodes searched: 6136386434

--------

No functional change

4 years agoRemove advanced_pawn_push()
Vizvezdenec [Thu, 11 Mar 2021 11:51:20 +0000]
Remove advanced_pawn_push()

Continuation of work by @topologist: we now do futility pruning and movecount
pruning in qsearch() for pawn pushes up to the 7th rank. So the condition to
avoid the pruning is if the move is a promotion or not. This allows to get rid
of the advanced_pawn_push() function in position.h alltogether.

Passed STC
https://tests.stockfishchess.org/tests/view/6048c5842433018de7a387e6
LLR: 2.93 (-2.94,2.94) {-1.25,0.25}
Total: 34424 W: 3081 L: 3015 D: 28328
Ptnml(0-2): 110, 2442, 12052, 2488, 120

Passed LTC
https://tests.stockfishchess.org/tests/view/6048f7d22433018de7a387f0
LLR: 2.94 (-2.94,2.94) {-0.75,0.25}
Total: 142024 W: 5170 L: 5202 D: 131652
Ptnml(0-2): 50, 4678, 61613, 4596, 75

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

Bench: 4339126

4 years agoSimplify move generation (2/2)
bmc4 [Tue, 16 Mar 2021 15:21:24 +0000]
Simplify move generation (2/2)

STC:
LLR: 2.97 (-2.94,2.94) {-1.25,0.25}
Total: 39352 W: 3551 L: 3493 D: 32308
Ptnml(0-2): 143, 2695, 13928, 2781, 129
https://tests.stockfishchess.org/tests/view/6050007a2433018de7a38bbb

LTC:
LLR: 2.96 (-2.94,2.94) {-0.75,0.25}
Total: 44944 W: 1629 L: 1596 D: 41719
Ptnml(0-2): 22, 1319, 19762, 1342, 27
https://tests.stockfishchess.org/tests/view/60500e892433018de7a38bc4

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

No functional change

4 years agoSimplify move generation (1/2)
bmc4 [Mon, 15 Mar 2021 22:52:45 +0000]
Simplify move generation (1/2)

STC:
LLR: 2.95 (-2.94,2.94) {-1.25,0.25}
Total: 29792 W: 2611 L: 2545 D: 24636
Ptnml(0-2): 94, 1982, 10659, 2086, 75
https://tests.stockfishchess.org/tests/view/604fe5b62433018de7a38ba8

LTC:
LLR: 2.92 (-2.94,2.94) {-0.75,0.25}
Total: 22040 W: 826 L: 777 D: 20437
Ptnml(0-2): 8, 646, 9664, 693, 9
https://tests.stockfishchess.org/tests/view/604fec892433018de7a38bac

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

No functional change

4 years agoIntroduce least_significant_square_bb()
bmc4 [Tue, 16 Mar 2021 19:51:31 +0000]
Introduce least_significant_square_bb()

Introducing least_significant_square_bb(). It is a function that returns a value equal
to square_bb(lsb(bb)), but it uses fewer instruction. It should speed up more on older
processors like armv7-a Clang.

Passed STC:
LLR: 2.93 (-2.94,2.94) {-0.25,1.25}
Total: 213200 W: 19171 L: 18753 D: 175276
Ptnml(0-2): 680, 14513, 75831, 14861, 715
https://tests.stockfishchess.org/tests/view/604bc7632433018de7a38982

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

No functional change

4 years agoRestore development version
Fabian Fichter [Sat, 13 Mar 2021 21:58:24 +0000]
Restore development version

4 years agoFairy-Stockfish 13
Fabian Fichter [Sat, 13 Mar 2021 12:41:25 +0000]
Fairy-Stockfish 13

bench: 4257608

4 years agoUpdate readme
Fabian Fichter [Fri, 12 Mar 2021 19:54:33 +0000]
Update readme

4 years agoFurther fix for placement castling
Fabian Fichter [Fri, 12 Mar 2021 18:45:31 +0000]
Further fix for placement castling

Also initialize castling king square on rook drops.

4 years agoFix castling initialization for placement chess
Fabian Fichter [Fri, 12 Mar 2021 18:20:41 +0000]
Fix castling initialization for placement chess

Refactoring of 960 castling broke placement chess castling.
Add initialization of king position to prevent undefined behavior.

4 years agoSuppress variant setup output on protocol change
Fabian Fichter [Fri, 12 Mar 2021 11:44:36 +0000]
Suppress variant setup output on protocol change

Since this might confuse GUIs, skip the variant definition output
whent he variant change is triggered by a protocol change.

4 years agoReset to starting position on protocol change
Fabian Fichter [Fri, 12 Mar 2021 09:48:45 +0000]
Reset to starting position on protocol change

Prevents issues with non-compliant GUIs not sending position command.

4 years agoAdd variant reinitialization on protocol change
Fabian Fichter [Thu, 11 Mar 2021 22:12:46 +0000]
Add variant reinitialization on protocol change

This ensures reinitialization of PSQT when changing the
default variant by switching the protocol via usi/ucci.

No functional change for UCI and CECP usage.

4 years agoSupport red as color in Xiangqi FENs
Fabian Fichter [Thu, 11 Mar 2021 19:52:50 +0000]
Support red as color in Xiangqi FENs

4 years agoChange advanced pawn push threshold
Topologist [Mon, 8 Mar 2021 18:46:41 +0000]
Change advanced pawn push threshold

A pawn push is now considered to be "advanced" if the relative destination
rank is > 6 (previously it was > 5). This affects the search heuristic.

Also remove an assert concerning en passant moves in qsearch().

STC:
LLR: 2.97 (-2.94,2.94) {-0.25,1.25}
Total: 46744 W: 4224 L: 4040 D: 38480
Ptnml(0-2): 165, 3206, 16451, 3380, 170
https://tests.stockfishchess.org/tests/view/604746082433018de7a3872e

LTC:
LLR: 2.94 (-2.94,2.94) {0.25,1.25}
Total: 107840 W: 4198 L: 3892 D: 99750
Ptnml(0-2): 58, 3472, 46557, 3772, 61
https://tests.stockfishchess.org/tests/view/60475eae2433018de7a38737

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

Bench: 4796780

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 9 Mar 2021 20:58:02 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 9 Mar 2021 20:41:09 +0000]
Merge official-stockfish/master

bench: 4257608

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 9 Mar 2021 20:33:44 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 9 Mar 2021 20:27:54 +0000]
Merge official-stockfish/master

bench: 4788083

4 years agoMerge official-stockfish/master
Fabian Fichter [Tue, 9 Mar 2021 20:19:56 +0000]
Merge official-stockfish/master

No functional change.

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