fairystockfish.git
4 years agoFix NNUE index for commoners
Fabian Fichter [Fri, 16 Jul 2021 17:19:34 +0000]
Fix NNUE index for commoners

4 years agoMerge official-stockfish/master
Fabian Fichter [Fri, 16 Jul 2021 10:11:09 +0000]
Merge official-stockfish/master

bench: 4850077

4 years agoUpdate js makefile
Fabian Fichter [Fri, 2 Jul 2021 08:06:24 +0000]
Update js makefile

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 1 Jul 2021 22:28:57 +0000]
Merge official-stockfish/master

bench: 4835554

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 1 Jul 2021 22:20:42 +0000]
Merge official-stockfish/master

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 1 Jul 2021 22:11:00 +0000]
Merge official-stockfish/master

bench: 4806948

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 1 Jul 2021 21:58:55 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Thu, 1 Jul 2021 21:42:05 +0000]
Merge official-stockfish/master

bench: 5885720

4 years agoAdd missing include
Fabian Fichter [Sat, 26 Jun 2021 20:44:43 +0000]
Add missing include

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 26 Jun 2021 18:26:01 +0000]
Merge official-stockfish/master

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 26 Jun 2021 14:04:59 +0000]
Merge official-stockfish/master

bench: 5173306

4 years agoReplace CI badge
Fabian Fichter [Sun, 20 Jun 2021 09:15:25 +0000]
Replace CI badge

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 19 Jun 2021 14:03:25 +0000]
Merge official-stockfish/master

No functional change.

4 years agoAdd variants.ini testing to CI
Fabian Fichter [Sat, 19 Jun 2021 08:21:34 +0000]
Add variants.ini testing to CI

4 years agoRevert Makefile change
Fabian Fichter [Sat, 19 Jun 2021 07:12:04 +0000]
Revert Makefile change

4 years agoIgnore copy assignment warning
Fabian Fichter [Sat, 19 Jun 2021 06:49:19 +0000]
Ignore copy assignment warning

4 years agoFix compiler warning
Fabian Fichter [Sat, 19 Jun 2021 06:09:33 +0000]
Fix compiler warning

4 years agoAdd workflow for variants
Fabian Fichter [Sat, 19 Jun 2021 05:55:05 +0000]
Add workflow for variants

4 years agoAdd basic github workflow
Tomasz Sobczyk [Fri, 18 Jun 2021 10:03:03 +0000]
Add basic github workflow

move to github actions to replace travis CI.

First version, testing on linux using gcc and clang.
gcc build with sanitizers and valgrind.

No functional change

4 years agoUpdate Travis CI URLs
Fabian Fichter [Fri, 11 Jun 2021 11:18:09 +0000]
Update Travis CI URLs

4 years agoSupport Opulent chess
Fabian Fichter [Sun, 6 Jun 2021 19:28:13 +0000]
Support Opulent chess

4 years agoSupport Sho shogi
Fabian Fichter [Sun, 6 Jun 2021 19:01:31 +0000]
Support Sho shogi

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 6 Jun 2021 17:10:05 +0000]
Merge official-stockfish/master

bench: 5068534

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 agoNew NNUE architecture and net
Tomasz Sobczyk [Tue, 18 May 2021 15:36:26 +0000]
New NNUE architecture and net

Introduces a new NNUE network architecture and associated network parameters,
as obtained by a new pytorch trainer.

The network is already very strong at short TC, without regression at longer TC,
and has potential for further improvements.

https://tests.stockfishchess.org/tests/view/60a159c65085663412d0921d
TC: 10s+0.1s, 1 thread
ELO: 21.74 +-3.4 (95%) LOS: 100.0%
Total: 10000 W: 1559 L: 934 D: 7507
Ptnml(0-2): 38, 701, 2972, 1176, 113

https://tests.stockfishchess.org/tests/view/60a187005085663412d0925b
TC: 60s+0.6s, 1 thread
ELO: 5.85 +-1.7 (95%) LOS: 100.0%
Total: 20000 W: 1381 L: 1044 D: 17575
Ptnml(0-2): 27, 885, 7864, 1172, 52

https://tests.stockfishchess.org/tests/view/60a2beede229097940a03806
TC: 20s+0.2s, 8 threads
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 34272 W: 1610 L: 1452 D: 31210
Ptnml(0-2): 30, 1285, 14350, 1439, 32

https://tests.stockfishchess.org/tests/view/60a2d687e229097940a03c72
TC: 60s+0.6s, 8 threads
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 45544 W: 1262 L: 1214 D: 43068
Ptnml(0-2): 12, 1129, 20442, 1177, 12

The network has been trained (by vondele) using the https://github.com/glinscott/nnue-pytorch/ trainer (started by glinscott),
specifically the branch https://github.com/Sopel97/nnue-pytorch/tree/experiment_56.
The data used are in 64 billion positions (193GB total) generated and scored with the current master net
d8: https://drive.google.com/file/d/1hOOYSDKgOOp38ZmD0N4DV82TOLHzjUiF/view?usp=sharing
d9: https://drive.google.com/file/d/1VlhnHL8f-20AXhGkILujnNXHwy9T-MQw/view?usp=sharing
d10: https://drive.google.com/file/d/1ZC5upzBYMmMj1gMYCkt6rCxQG0GnO3Kk/view?usp=sharing
fishtest_d9: https://drive.google.com/file/d/1GQHt0oNgKaHazwJFTRbXhlCN3FbUedFq/view?usp=sharing

This network also contains a few architectural changes with respect to the current master:

    Size changed from 256x2-32-32-1 to 512x2-16-32-1
        ~15-20% slower
        ~2x larger
        adds a special path for 16 valued ClippedReLU
        fixes affine transform code for 16 inputs/outputs, buy using InputDimensions instead of PaddedInputDimensions
            this is safe now because the inputs are processed in groups of 4 in the current affine transform code
    The feature set changed from HalfKP to HalfKAv2
        Includes information about the kings like HalfKA
        Packs king features better, resulting in 8% size reduction compared to HalfKA
    The board is flipped for the black's perspective, instead of rotated like in the current master
    PSQT values for each feature
        the feature transformer now outputs a part that is fowarded directly to the output and allows learning piece values more directly than the previous network architecture. The effect is visible for high imbalance positions, where the current master network outputs evaluations skewed towards zero.
        8 PSQT values per feature, chosen based on (popcount(pos.pieces()) - 1) / 4
        initialized to classical material values on the start of the training
    8 subnetworks (512x2->16->32->1), chosen based on (popcount(pos.pieces()) - 1) / 4
        only one subnetwork is evaluated for any position, no or marginal speed loss

A diagram of the network is available: https://user-images.githubusercontent.com/8037982/118656988-553a1700-b7eb-11eb-82ef-56a11cbebbf2.png
A more complete description: https://github.com/glinscott/nnue-pytorch/blob/master/docs/nnue.md

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

Bench: 3806488

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 agoSmall clean-ups
Stéphane Nicolet [Mon, 17 May 2021 07:13:34 +0000]
Small clean-ups

- Comment for Countemove pruning -> Continuation history
- Fix comment in input_slice.h
- Shorter lines in Makefile
- Comment for scale factor
- Fix comment for pinners in see_ge()
- Change Thread.id() signature to size_t
- Trailing space in reprosearch.sh
- Add Douglas Matos Gomes to the AUTHORS file
- Introduce comment for undo_null_move()
- Use Stockfish coding style for export_net()
- Change date in AUTHORS file

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

No functional change

4 years agoSimplification for countermoves based pruning
Vizvezdenec [Fri, 14 May 2021 21:55:45 +0000]
Simplification for countermoves based pruning

Simplify away two extra conditions in countermoves based pruning.
These conditions (both of them) were introduced quite a long time ago
via speculative LTCs and seem to no longer bring any benefit.

passed STC
https://tests.stockfishchess.org/tests/view/609e81f35085663412d08f31
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 28488 W: 2487 L: 2382 D: 23619
Ptnml(0-2): 87, 1919, 10123, 2032, 83

passed LTC
https://tests.stockfishchess.org/tests/view/609e9c085085663412d08f59
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 33176 W: 1219 L: 1155 D: 30802
Ptnml(0-2): 13, 1036, 14423, 1106, 10

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

Bench: 4749514

4 years agoSimplify LMR rules for statScore
bmc4 [Fri, 14 May 2021 02:47:41 +0000]
Simplify LMR rules for statScore

We simplify two parts of LMR which seem not to bring strength anymore.

---

Individual Tests:
https://tests.stockfishchess.org/tests/view/609d1cc15085663412d0856a
https://tests.stockfishchess.org/tests/view/609cb0cc7746e3dc74ffae8d
https://tests.stockfishchess.org/tests/view/609d1c9f5085663412d08568

---

LTC:
LLR: 2.97 (-2.94,2.94) <-2.50,0.50>
Total: 84184 W: 3093 L: 3066 D: 78025
Ptnml(0-2): 47, 2755, 36458, 2788, 44
https://tests.stockfishchess.org/tests/view/609d84615085663412d08e2f

---

While at it, we also update the Elo estimate of the previous rule in LMR, see:
https://tests.stockfishchess.org/tests/view/609a933c3a33eb67a844f7ca
https://tests.stockfishchess.org/tests/view/609a959c3a33eb67a844f7d5
https://tests.stockfishchess.org/tests/view/609afff73a33eb67a844f870

---

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

Bench: 4156523

4 years agoRemove early return in Probcut code
bmc4 [Thu, 13 May 2021 14:12:56 +0000]
Remove early return in Probcut code

We simplify away early return in ProbCut, as it seems not to bring any strength anymore.

STC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 42632 W: 3705 L: 3617 D: 35310
Ptnml(0-2): 123, 2947, 15110, 2991, 145
https://tests.stockfishchess.org/tests/view/609c49da7746e3dc74ffae02

LTC:
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 35384 W: 1314 L: 1251 D: 32819
Ptnml(0-2): 11, 1130, 15355, 1177, 19
https://tests.stockfishchess.org/tests/view/609c71467746e3dc74ffae47

---

While at it, we also update the Elo estimate of ProbCut
(see https://tests.stockfishchess.org/tests/view/609bfb597746e3dc74ffabe3).

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

bench: 3764662

4 years agoRemove BoolConditions from tuning code
Unai Corzo [Fri, 14 May 2021 15:35:32 +0000]
Remove BoolConditions from tuning code

Remove BoolConditions from tuning code, as the feature does not work
and the code has not be touched in years.

No functional change

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 agoSimplify LMR rule for non-checking captures
bmc4 [Wed, 12 May 2021 12:38:26 +0000]
Simplify LMR rule for non-checking captures

We simplify away the complicated rule in LMR for "non-checking captures
likely to be bad", as it seems not to bring any strength anymore.

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 55256 W: 4972 L: 4897 D: 45387
Ptnml(0-2): 177, 3976, 19234, 4077, 164
https://tests.stockfishchess.org/tests/view/609adf3b3a33eb67a844f842

LTC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 10344 W: 437 L: 353 D: 9554
Ptnml(0-2): 1, 322, 4449, 392, 8
https://tests.stockfishchess.org/tests/view/609b3dfa3a33eb67a844f88e

--

While at it, we also update the Elo estimate of the previous rule in LMR
(see https://tests.stockfishchess.org/tests/view/609af2a63a33eb67a844f867).

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

Bench: 3840688

4 years agoE2K: added support for MCST Elbrus 2000 CPU architecture
EntityFX [Mon, 12 Apr 2021 10:42:35 +0000]
E2K: added support for MCST Elbrus 2000 CPU architecture

e2k (Elbrus 2000) - this is a VLIW/EPIC architecture,
the like Intel Itanium (IA-64) architecture.
The architecture has half native / half software support
for most Intel/AMD SIMD (e.g. MMX/SSE/SSE2/SSE3/SSSE3/SSE4.1/SSE4.2/AES/AVX/AVX2 & 3DNow!/SSE4a/XOP/FMA4) via intrinsics.

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

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

No functional change

4 years agoRemove coordination between searching threads
bmc4 [Sun, 9 May 2021 19:33:41 +0000]
Remove coordination between searching threads

In summary, this revert #2204, as it seems not to bring any strength anymore, so it's no long needed.

STC (5+0.05 @ 8 threads):
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 105728 W: 6406 L: 6393 D: 92929
Ptnml(0-2): 154, 5479, 41599, 5464, 168
https://tests.stockfishchess.org/tests/view/6096994095e7f1852abd3154

LTC (20+0.2 @ 8 threads):
LLR: 2.96 (-2.94,2.94) <-2.50,0.50>
Total: 26336 W: 774 L: 712 D: 24850
Ptnml(0-2): 9, 641, 11810, 695, 13
https://tests.stockfishchess.org/tests/view/6097c62995e7f1852abd31e8

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

No functional change.

4 years agoSimplify LMR
bmc4 [Tue, 11 May 2021 14:04:02 +0000]
Simplify LMR

as it seems not to bring any strength and thus is no longer needed.

Tests for updating elo estimates:
https://tests.stockfishchess.org/tests/view/6099ff123a33eb67a844f789
https://tests.stockfishchess.org/tests/view/60953e6695e7f1852abd305b

Individual simplification tests:
https://tests.stockfishchess.org/tests/view/6098cfc73a33eb67a844f6a1
https://tests.stockfishchess.org/tests/view/6095539495e7f1852abd308b

LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 96984 W: 3624 L: 3608 D: 89752
Ptnml(0-2): 45, 3222, 41939, 3244, 42
https://tests.stockfishchess.org/tests/view/6099921a3a33eb67a844f74f

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

bench: 3836428

4 years agoExporting the currently loaded network file
Tomasz Sobczyk [Fri, 7 May 2021 10:24:12 +0000]
Exporting the currently loaded network file

This PR adds an ability to export any currently loaded network.
The export_net command now takes an optional filename parameter.
If the loaded net is not the embedded net the filename parameter is required.

Two changes were required to support this:

* the "architecture" string, which is really just a some kind of description in the net, is now saved into netDescription on load and correctly saved on export.
* the AffineTransform scrambles weights for some architectures and sparsifies them, such that retrieving the index is hard. This is solved by having a temporary scrambled<->unscrambled index lookup table when loading the network, and the actual index is saved for each individual weight that makes it to canSaturate16. This increases the size of the canSaturate16 entries by 6 bytes.

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

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 agoCleanup of likelyFailLow logic
Vizvezdenec [Wed, 5 May 2021 16:03:20 +0000]
Cleanup of likelyFailLow logic

This patch broadens and simplifies definition of PvNode that is likely to fail low.
New definition can be described as following "If node was already researched
at depth >= current depth and failed low there" which is more logical than the
previous version and takes less space + allows to not recompute it every time during move loop.

Passed simplification STC
https://tests.stockfishchess.org/tests/view/609148bf95e7f1852abd2e82
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 20128 W: 1865 L: 1751 D: 16512
Ptnml(0-2): 63, 1334, 7165, 1430, 72

Passed simplification LTC
https://tests.stockfishchess.org/tests/view/6091691295e7f1852abd2e8b
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 95128 W: 3498 L: 3481 D: 88149
Ptnml(0-2): 41, 2956, 41549, 2981, 37

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

Bench: 3933037

4 years agoAdd an UCI level command "export_net".
Tomasz Sobczyk [Sun, 2 May 2021 16:50:09 +0000]
Add an UCI level command "export_net".

This command writes the embedded net to the file `EvalFileDefaultName`.
If there is no embedded net the command does nothing.

fixes #3453

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

No functional change

4 years agoSimplify check extension
Unai Corzo [Sat, 1 May 2021 08:18:57 +0000]
Simplify check extension

Simplify check extension, as it seems not to bring any strength and thus is no longer needed.

STC https://tests.stockfishchess.org/tests/view/608c18e995e7f1852abd2b81
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 54544 W: 4891 L: 4815 D: 44838
Ptnml(0-2): 186, 3889, 19081, 3895, 221

LTC https://tests.stockfishchess.org/tests/view/608c6ab195e7f1852abd2bc6
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 51008 W: 1845 L: 1794 D: 47369
Ptnml(0-2): 31, 1591, 22206, 1648, 28

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

bench: 3993071

4 years agoAdd some more information on the UCI protocol
Joost VandeVondele [Thu, 29 Apr 2021 06:18:37 +0000]
Add some more information on the UCI protocol

Improve README.md: provide a link to the protocol,
and document some non-standard options.

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

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

No functional change

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 agoChange tempo with time and threads
xoto10 [Sat, 24 Apr 2021 13:46:01 +0000]
Change tempo with time and threads

Introduce variable tempo for nnue depending on logarithm of estimated
strength, where strength is the product of time and number of threads.

The original idea here was that NNUE is best with a slightly different
tempo value to classical, since its style of play is slightly different.
It turns out that the best tempo for NNUE varies with strength of play,
so a formula is used which gives about 19 for STC and 24 for LTC under
current fishtest settings.

STC 10+0.1:
LLR: 2.94 (-2.94,2.94) {-0.20,1.10}
Total: 120816 W: 11155 L: 10861 D: 98800
Ptnml(0-2): 406, 8728, 41933, 8848, 493
https://tests.stockfishchess.org/tests/view/60735b3a8141753378960534

LTC 60+0.6:
LLR: 2.94 (-2.94,2.94) {0.20,0.90}
Total: 35688 W: 1392 L: 1234 D: 33062
Ptnml(0-2): 23, 1079, 15473, 1255, 14
https://tests.stockfishchess.org/tests/view/6073ffbc814175337896057f

Passed non-regression SMP test at LTC 20+0.2 (8 threads):
LLR: 2.95 (-2.94,2.94) {-0.70,0.20}
Total: 11008 W: 317 L: 267 D: 10424
Ptnml(0-2): 2, 245, 4962, 291, 4
https://tests.stockfishchess.org/tests/view/60749ea881417533789605a4

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

Bench 4075325

4 years agoSimplify pawn moves generator
bmc4 [Tue, 27 Apr 2021 22:59:46 +0000]
Simplify pawn moves generator

This patch simplifies QUIET_CHECKS pawn move generator by merging discovery check
move generator with direct check move generator. It also simplifies emptySquares
instantiation. In addition, I added a comment in generate_moves() to clarify Check
branches.

STC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 112648 W: 9952 L: 9945 D: 92751
Ptnml(0-2): 369, 7682, 40195, 7729, 349
https://tests.stockfishchess.org/tests/view/6088226895e7f1852abd2978

LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 74656 W: 2797 L: 2765 D: 69094
Ptnml(0-2): 38, 2328, 32554, 2380, 28
https://tests.stockfishchess.org/tests/view/60884e5095e7f1852abd2994

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

No functional change

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 agoMore extensions if SE search is very low.
lonfom169 [Sun, 25 Apr 2021 00:37:47 +0000]
More extensions if SE search is very low.

More extensions for non-PV nodes if value from singular extension search is significantly below singularBeta.

Passed STC:
LLR: 2.97 (-2.94,2.94) <-0.50,2.50>
Total: 25064 W: 2334 L: 2162 D: 20568
Ptnml(0-2): 82, 1720, 8768, 1868, 94
https://tests.stockfishchess.org/tests/view/6084ba7995e7f1852abd27e3

Passed LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 67136 W: 2644 L: 2450 D: 62042
Ptnml(0-2): 46, 2134, 28990, 2376, 22
https://tests.stockfishchess.org/tests/view/6084d79195e7f1852abd27ee

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

Bench: 4075325

4 years agoThread based reduction tweak.
Stefan Geschwentner [Sun, 25 Apr 2021 05:09:35 +0000]
Thread based reduction tweak.

For PV nodes at the first two plies no reductions are done for each fourth thread.

STC (8 threads):
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 53992 W: 3334 L: 3167 D: 47491
Ptnml(0-2): 64, 2713, 21285, 2860, 74
https://tests.stockfishchess.org/tests/view/6083b2d695e7f1852abd277a

LTC (8 threads):
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 64888 W: 1888 L: 1725 D: 61275
Ptnml(0-2): 14, 1556, 29146, 1709, 19
https://tests.stockfishchess.org/tests/view/6084249595e7f1852abd2795

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

No functional change (for one thread)

4 years agoCleanup and simplify NNUE code.
Tomasz Sobczyk [Sat, 24 Apr 2021 13:08:11 +0000]
Cleanup and simplify NNUE code.

A lot of optimizations happend since the NNUE was introduced
and since then some parts of the code were left unused. This
got to the point where asserts were have to be made just to
let people know that modifying something will not have any
effects or may even break everything due to the assumptions
being made. Removing these parts removes those inexisting
"false dependencies". Additionally:

 * append_changed_indices now takes the king pos and stateinfo
   explicitly, no more misleading pos parameter
 * IndexList is removed in favor of a generic ValueList.
   Feature transformer just instantiates the type it needs.
 * The update cost and refresh requirement is deferred to the
   feature set once again, but now doesn't go through the whole
   FeatureSet machinery and just calls HalfKP directly.
 * accumulator no longer has a singular dimension.
 * The PS constants and the PieceSquareIndex array are made local
   to the HalfKP feature set because they are specific to it and
   DO differ for other feature sets.
 * A few names are changed to more descriptive

Passed STC non-regression:
https://tests.stockfishchess.org/tests/view/608421dd95e7f1852abd2790
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 180008 W: 16186 L: 16258 D: 147564
Ptnml(0-2): 587, 12593, 63725, 12503, 596

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

No functional change

4 years agoMerge all move generators
bmc4 [Thu, 22 Apr 2021 17:07:37 +0000]
Merge all move generators

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

verified to yield correct perft results, even though bench changes due to different order of generated moves.

No regresion playing games:

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

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

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

Bench: 4536129

4 years agoUnify naming convention of the NNUE code
Tomasz Sobczyk [Mon, 19 Apr 2021 17:50:19 +0000]
Unify naming convention of the NNUE code

matches the rest of the stockfish code base

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

No functional change

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 agoUse classical eval for Bishop vs Pawns
dsmsgms [Mon, 12 Apr 2021 15:06:22 +0000]
Use classical eval for Bishop vs Pawns

NNUE evaluation is incapable of recognizing trivially drawn bishop endgames
(the wrong-colored rook pawn), which are in fact ubiquitous and stock standard
in chess analysis. Switching off NNUE evaluation in KBPs vs KPs endgames is
a measure that stops Stockfish from trading down to a drawn version of these
endings when we presumably have advantage. The patch is able to edge over master
in endgame positions.

Patch tested for Elo gain with the "endgame.epd" book, and verified for
non-regression with our usual book (see the pull request for details).

STC:
LLR: 2.93 (-2.94,2.94) {-0.20,1.10}
Total: 33232 W: 6655 L: 6497 D: 20080
Ptnml(0-2): 4, 2342, 11769, 2494, 7
https://tests.stockfishchess.org/tests/view/6074a52981417533789605b8

LTC:
LLR: 2.93 (-2.94,2.94) {0.20,0.90}
Total: 159056 W: 29799 L: 29378 D: 99879
Ptnml(0-2): 7, 9004, 61085, 9425, 7
https://tests.stockfishchess.org/tests/view/6074c39a81417533789605ca

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

Bench: 4503918

blah

4 years agoDocumentation patch: AppendChangedIndices
Tomasz Sobczyk [Tue, 13 Apr 2021 18:02:28 +0000]
Documentation patch: AppendChangedIndices

Clarify the assumptions on the position passed to the AppendChangedIndices().

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

No functional change

4 years agoSimplification: last capture extension
Vizvezdenec [Wed, 14 Apr 2021 18:25:18 +0000]
Simplification: last capture extension

The code for last capture extension can be removed in current master.

Passed STC
LLR: 2.95 (-2.94,2.94) {-1.00,0.20}
Total: 85024 W: 7754 L: 7707 D: 69563
Ptnml(0-2): 293, 5991, 29914, 6004, 310
https://tests.stockfishchess.org/tests/view/607690f1814175337896068f

Passed LTC
LLR: 2.96 (-2.94,2.94) {-0.70,0.20}
Total: 39880 W: 1503 L: 1453 D: 36924
Ptnml(0-2): 17, 1281, 17293, 1333, 16
https://tests.stockfishchess.org/tests/view/6076ccbe814175337896069e

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

Bench: 4202264

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