fairystockfish.git
4 years agoSupport time unit switch for UCCI
Fabian Fichter [Sun, 28 Nov 2021 13:30:52 +0000]
Support time unit switch for UCCI

Closes #406.

4 years agoAdd unit test to cover bugfix
Fabian Fichter [Sat, 13 Nov 2021 15:26:29 +0000]
Add unit test to cover bugfix

4 years agoFix castling rights for passing moves
Fabian Fichter [Sat, 13 Nov 2021 12:15:07 +0000]
Fix castling rights for passing moves

4 years agoUpdate variants.ini
Snowmoondaphne [Wed, 10 Nov 2021 01:34:14 +0000]
Update variants.ini

I'm really sorry to tell you this,,,

The positions of Black's Queen and Cardinal have been swapped in Pandemonium. Therefore, the definition has changed and it is necessary to modify it

[pandemonium]
variantTemplate = shogi
pieceToCharTable = PNBRFSA.UV.++++++++.++Kpnbrfsa.uv.++++++++.++k
maxFile = 9
maxRank = 9
pocketSize = 9
startFen = rnbsksbnr/2+f1+u1+a2/p1p1p1p1p/4v4/9/4V4/P1P1P1P1P/2+F1+U1+A2/RNBSKSBNR[] w - - 0 1
customPiece1 = o:NA
customPiece2 = s:WF
customPiece3 = u:D
customPiece4 = w:DWF
cast = false
pieceDrops = true
capturesToHand = true
immobilityIllegal = true
soldier = p
knight = n
bishop = b
rook = r
king = k
queen = q
commoner = g
dragonHorse = h
bers = d
alfil = a
archbishop = c
chancellor = m
fers = f
wazir = v
centaur = t
promotionRank = 7
promotedPieceType = p:g n:o b:h r:d a:c v:m f:q s:w u:t
doubleStep = false
perpetualCheckIllegal = true
nMoveRule = 0
nFoldValue = loss
stalemateValue = loss

Could you please modify the definition like this?

Sorry again for the troublesome request,,,

4 years agoRemove redundancy from S-Chess FEN
Fabian Fichter [Fri, 5 Nov 2021 23:05:38 +0000]
Remove redundancy from S-Chess FEN

Closes #83.

4 years agoUpdate variants.ini
Snowmoondaphne [Tue, 26 Oct 2021 10:02:40 +0000]
Update variants.ini

Add a variant

4 years agoSimplify configuration of custom royal pieces
Fabian Fichter [Sat, 6 Nov 2021 16:59:06 +0000]
Simplify configuration of custom royal pieces

Use the same syntax for custom king as for other custom pieces.

Closes #363.

4 years agoUse tandem pawn notation for double tandems
Fabian Fichter [Sat, 6 Nov 2021 10:14:01 +0000]
Use tandem pawn notation for double tandems

In WXF notation +/- disambiguation can be ambiguous
when there is more than one tandem of pieces/pawns.

Closes #395.

4 years agoSupport validation of lichess 3check FENs
Fabian Fichter [Sat, 6 Nov 2021 14:21:38 +0000]
Support validation of lichess 3check FENs

Closes #288.

4 years agoValidate gating information in FEN (#288)
Fabian Fichter [Sat, 6 Nov 2021 12:59:42 +0000]
Validate gating information in FEN (#288)

4 years agoValidate variants.ini syntax
Fabian Fichter [Fri, 5 Nov 2021 21:25:39 +0000]
Validate variants.ini syntax

Closes #388.

4 years agoMention lishogi fairy stockfish bot in README.md
SriMethan [Wed, 3 Nov 2021 13:06:23 +0000]
Mention lishogi fairy stockfish bot in README.md

4 years agoAdd optimized dev builds
Fabian Fichter [Mon, 1 Nov 2021 17:44:08 +0000]
Add optimized dev builds

4 years agoRemove check indicator from WXF notation
Fabian Fichter [Thu, 28 Oct 2021 17:10:34 +0000]
Remove check indicator from WXF notation

4 years agoDisable NNUE in case of virtual pieces
Fabian Fichter [Fri, 15 Oct 2021 16:42:27 +0000]
Disable NNUE in case of virtual pieces

4 years agoAdjust max NNUE pieces for two board variants
Fabian Fichter [Fri, 15 Oct 2021 11:14:16 +0000]
Adjust max NNUE pieces for two board variants

4 years agoUpdate betza notation in docs
Fabian Fichter [Thu, 14 Oct 2021 06:55:00 +0000]
Update  betza notation in docs

4 years agoUpdate authors list
Fabian Fichter [Thu, 14 Oct 2021 06:41:17 +0000]
Update authors list

4 years agoExtend perft test coverage
Fabian Fichter [Sat, 9 Oct 2021 16:08:28 +0000]
Extend perft test coverage

4 years agoFixed Betza notation of Breakthrough piece
Michael Taktikos [Sat, 9 Oct 2021 13:52:27 +0000]
Fixed Betza notation of Breakthrough piece

Avoid illegal moves (captures forward) in Breakthrough

4 years agoExpose additional game-end functions in ffish.js (#362)
Terry Hearst [Fri, 8 Oct 2021 13:16:39 +0000]
Expose additional game-end functions in ffish.js (#362)

4 years agoExpose position.fen's showPromoted and countStarted in ffish.js
Ada Joule [Sun, 3 Oct 2021 05:11:58 +0000]
Expose position.fen's showPromoted and countStarted in ffish.js

4 years agoHandle placement corner cases more naturally
Fabian Fichter [Sat, 2 Oct 2021 21:46:35 +0000]
Handle placement corner cases more naturally

No functional change for legal positions,
just generalizes more naturally to artifical positions.

4 years agoBump pyffish version
gbtami [Sat, 2 Oct 2021 15:00:04 +0000]
Bump pyffish version

4 years agoCorrect ASEAN's counting rules
Ada Joule [Fri, 1 Oct 2021 18:32:19 +0000]
Correct ASEAN's counting rules

- Khon and Knight don't need a Met to start the counting
- Counting only starts after all pawns are promoted

4 years agoSupport NNUE with varying king dimensions
Fabian Fichter [Fri, 1 Oct 2021 10:01:02 +0000]
Support NNUE with varying king dimensions

This adds dedicated NNUE support for variants where kings
only have access to a limited set of squares, like Xiangqi,
or are missing entirely, like in antichess.

Closes #346.

4 years agoSupport spaces in variants.ini path
Fabian Fichter [Mon, 27 Sep 2021 21:15:48 +0000]
Support spaces in variants.ini path

* Allow whitespace characters in `load` command.
* Support loading of multiple files separated by `:`/`;`.

Closes #361.

4 years agoBump pyffish version
Fabian Fichter [Mon, 27 Sep 2021 19:59:18 +0000]
Bump pyffish version

4 years agoLimit pawn moves to variant board size
Fabian Fichter [Mon, 27 Sep 2021 19:41:51 +0000]
Limit pawn moves to variant board size

Closes #372.

4 years agoMore robust shogi FEN parsing
Fabian Fichter [Sun, 26 Sep 2021 15:54:14 +0000]
More robust shogi FEN parsing

Closes #370.

4 years agoAutoload variants.ini if specified in by an environment variable (#360)
Terry Hearst [Fri, 17 Sep 2021 07:03:25 +0000]
Autoload variants.ini if specified in by an environment variable (#360)

4 years agoCorrected Tori n-fold repetition. (#355)
CouchTomato87 [Wed, 15 Sep 2021 13:35:58 +0000]
Corrected Tori n-fold repetition. (#355)

4 years agoBump pyffish version
Fabian Fichter [Sun, 12 Sep 2021 15:04:01 +0000]
Bump pyffish version

4 years agoIgnore countStarted when either side has only one piece
Ada Joule [Sun, 12 Sep 2021 12:15:15 +0000]
Ignore countStarted when either side has only one piece

4 years agoRestore development version
Fabian Fichter [Fri, 10 Sep 2021 18:59:57 +0000]
Restore development version

4 years agoFairy-Stockfish 14
Fabian Fichter [Fri, 10 Sep 2021 14:49:27 +0000]
Fairy-Stockfish 14

bench: 5903196

4 years agoFix insufficient material for atomic
Fabian Fichter [Tue, 7 Sep 2021 17:09:18 +0000]
Fix insufficient material for atomic

Closes #352.

4 years agoFix incremental update for hand pieces
Fabian Fichter [Sat, 4 Sep 2021 21:08:24 +0000]
Fix incremental update for hand pieces

4 years agoBump pyffish version
Fabian Fichter [Sat, 4 Sep 2021 16:13:44 +0000]
Bump pyffish version

4 years agoFix pawn evasions for cannon checks
Fabian Fichter [Sat, 4 Sep 2021 14:45:43 +0000]
Fix pawn evasions for cannon checks

4 years agoSupport NNUE for placement variants
Fabian Fichter [Sat, 4 Sep 2021 07:53:35 +0000]
Support NNUE for placement variants

Use classical evaluation during setup phase to enable NNUE usage.

4 years agoUpdate readme
Fabian Fichter [Fri, 3 Sep 2021 12:08:31 +0000]
Update readme

4 years agoEnable NNUE pockets for gating variants
Fabian Fichter [Fri, 3 Sep 2021 10:16:22 +0000]
Enable NNUE pockets for gating variants

4 years agoSimplify addition of variants
Fabian Fichter [Fri, 3 Sep 2021 07:53:04 +0000]
Simplify addition of variants

4 years agoBump pyffish version (#350)
Bajusz Tamás [Wed, 1 Sep 2021 09:02:28 +0000]
Bump pyffish version (#350)

4 years agoGeneralize incremental computation for hand pieces
Fabian Fichter [Sun, 29 Aug 2021 09:16:53 +0000]
Generalize incremental computation for hand pieces

This allows to apply incremental NNUE computation not only to drop variants,
but also to S-Chess gating and drop variants with blast captures.

4 years agoSupport re-usage of NNUE nets for other variants
Fabian Fichter [Sat, 28 Aug 2021 12:04:44 +0000]
Support re-usage of NNUE nets for other variants

Define aliases for compatible variants, so that
they can re-use existing NNUE files without requiring
to create symlinks or copies of the evaluation files.

4 years agoSupport pieces in hand for NNUE
Fabian Fichter [Sat, 28 Aug 2021 08:42:16 +0000]
Support pieces in hand for NNUE

This enables to consider pieces in hand in NNUE evaluation.

4 years agoGeneralize NNUE architecture
Fabian Fichter [Fri, 30 Jul 2021 13:18:37 +0000]
Generalize NNUE architecture

Remove restrictions on board size and piece types
in order to enable NNUE for most supported variants.

This change modifies the indexing for fairy pieces,
therefore existing networks for fairy variants, currently only Makruk,
will not work properly any more and need to be replaced.

Limitations that are not addressed as part of this are:
- A "king" piece type with a constant count of 1 is required.
- Pockets are not considered.

4 years agoFixed blasted pieces incorrectly updating key's castling rights
Major Mink [Fri, 6 Aug 2021 12:08:03 +0000]
Fixed blasted pieces incorrectly updating key's castling rights

4 years agoPrevent division by zero in extinction bonus
Fabian Fichter [Thu, 5 Aug 2021 14:42:54 +0000]
Prevent division by zero in extinction bonus

Fixes #340.

4 years agoFix Orda Mirror promotionPieceTypes definition (#339)
Bajusz Tamás [Sat, 31 Jul 2021 09:06:39 +0000]
Fix Orda Mirror promotionPieceTypes definition (#339)

4 years agoAdd Python3.9 support to appveyor (#338)
Bajusz Tamás [Fri, 30 Jul 2021 15:46:33 +0000]
Add Python3.9 support to appveyor (#338)

4 years agoFix insufficient material handling for makpong
Fabian Fichter [Thu, 29 Jul 2021 21:19:46 +0000]
Fix insufficient material handling for makpong

Closes #335.

4 years agoUpdate ffish.js version
QueensGambit [Thu, 29 Jul 2021 17:44:47 +0000]
Update ffish.js version

4 years agoBump pyffish version (#334)
Bajusz Tamás [Thu, 29 Jul 2021 07:09:25 +0000]
Bump pyffish version (#334)

4 years agoFix variant initialization for libraries
Fabian Fichter [Tue, 27 Jul 2021 20:15:31 +0000]
Fix variant initialization for libraries

4 years agoFix NNUE evaluation trace for variants
Fabian Fichter [Sun, 25 Jul 2021 19:06:52 +0000]
Fix NNUE evaluation trace for variants

4 years agoFix memory leak of CECP state
Fabian Fichter [Tue, 20 Jul 2021 18:05:05 +0000]
Fix memory leak of CECP state

Closes #331.

4 years agoReintroduce tempo for drop variants
Fabian Fichter [Tue, 20 Jul 2021 17:16:35 +0000]
Reintroduce tempo for drop variants

crazyhouse STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1439 W: 752 L: 632 D: 55
http://www.variantfishtest.org:6543/tests/view/60f4410abf545bb49fff86bc

crazyhouse LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1403 W: 741 L: 621 D: 41
http://www.variantfishtest.org:6543/tests/view/60f51db7bf545bb49fff86c6

Closes #332.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 14:23:30 +0000]
Merge official-stockfish/master

bench: 5903196

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 13:56:13 +0000]
Merge official-stockfish/master

bench: 6603046

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 13:44:41 +0000]
Merge official-stockfish/master

bench: 6215456

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 13:37:21 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 13:30:52 +0000]
Merge official-stockfish/master

bench: 6141390

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 13:26:37 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 11:56:42 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 18 Jul 2021 11:51:44 +0000]
Merge official-stockfish/master

bench: 4890740

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 20:18:28 +0000]
Merge official-stockfish/master

bench: 4456706

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 20:13:34 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 20:01:22 +0000]
Merge official-stockfish/master

bench: 4590190

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 19:44:32 +0000]
Merge official-stockfish/master

bench: 4858668

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 19:37:39 +0000]
Merge official-stockfish/master

No functional change.

4 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 17 Jul 2021 19:31:06 +0000]
Merge official-stockfish/master

bench: 4838140

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 agoRestore development version
Joost VandeVondele [Sat, 3 Jul 2021 07:20:06 +0000]
Restore development version

No functional change

4 years agoStockfish 14
Joost VandeVondele [Mon, 28 Jun 2021 19:46:04 +0000]
Stockfish 14

Official release version of Stockfish 14

Bench: 4770936

---

Today, we have the pleasure to announce Stockfish 14.

As usual, downloads will be freely available at https://stockfishchess.org

The engine is now significantly stronger than just a few months ago,
and wins four times more game pairs than it loses against the previous
release version [0]. Stockfish 14 is now at least 400 Elo ahead of
Stockfish 7, a top engine in 2016 [1]. During the last five years,
Stockfish has thus gained about 80 Elo per year.

Stockfish 14 evaluates positions more accurately than Stockfish 13 as
a result of two major steps forward in defining and training the
efficiently updatable neural network (NNUE) that provides the evaluation
for positions.

First, the collaboration with the Leela Chess Zero team - announced
previously [2] - has come to fruition. The LCZero team has provided a
collection of billions of positions evaluated by Leela that we have
combined with billions of positions evaluated by Stockfish to train the
NNUE net that powers Stockfish 14. The fact that we could use and combine
these datasets freely was essential for the progress made and demonstrates
the power of open source and open data [3].

Second, the architecture of the NNUE network was significantly updated:
the new network is not only larger, but more importantly, it deals better
with large material imbalances and can specialize for multiple phases of
the game [4]. A new project, kick-started by Gary Linscott and
Tomasz Sobczyk, led to a GPU accelerated net trainer written in
pytorch.[5] This tool allows for training high-quality nets in a couple
of hours.

Finally, this release features some search refinements, minor bug
fixes and additional improvements. For example, Stockfish is now about
90 Elo stronger for chess960 (Fischer random chess) at short time control.

The Stockfish project builds on a thriving community of enthusiasts
(thanks everybody!) that contribute their expertise, time, and resources
to build a free and open-source chess engine that is robust, widely
available, and very strong. We invite our chess fans to join the fishtest
testing framework and programmers to contribute to the project on
github [6].

Stay safe and enjoy chess!

The Stockfish team

[0] https://tests.stockfishchess.org/tests/view/60dae5363beab81350aca077
[1] https://nextchessmove.com/dev-builds
[2] https://stockfishchess.org/blog/2021/stockfish-13/
[3] https://lczero.org/blog/2021/06/the-importance-of-open-data/
[4] https://github.com/official-stockfish/Stockfish/commit/e8d64af1
[5] https://github.com/glinscott/nnue-pytorch/
[6] https://stockfishchess.org/get-involved/

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 agoUpdate Top CPU Contributors
Brad Knox [Tue, 29 Jun 2021 06:40:16 +0000]
Update Top CPU Contributors

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

No functional change

4 years agoUpdate default net to nn-3475407dc199.nnue
SFisGOD [Mon, 28 Jun 2021 06:58:51 +0000]
Update default net to nn-3475407dc199.nnue

Optimization of eight subnetwork output layers of Michael's nn-190f102a22c3.nnue using SPSA
https://tests.stockfishchess.org/tests/view/60d5510642a522cc50282ef3

Parameters: A total of 256 net weights and 8 net biases were tuned
New best values: The raw values at the end of the tuning run were used (800k games, 5 seconds TC)
Settings: default ck value and SPSA A is 30,000 (3.75% of the total number of games)

STC:
LLR: 2.94 (-2.94,2.94) <-0.50,2.50>
Total: 29064 W: 2435 L: 2269 D: 24360
Ptnml(0-2): 72, 1857, 10505, 2029, 69
https://tests.stockfishchess.org/tests/view/60d8ea123beab81350ac9eb6

LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 61848 W: 2055 L: 1884 D: 57909
Ptnml(0-2): 18, 1708, 27310, 1861, 27
https://tests.stockfishchess.org/tests/view/60d8f0393beab81350ac9ec6

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

Bench: 4770936

4 years agoMake net nn-956480d8378f.nnue the default
MichaelB7 [Sun, 27 Jun 2021 15:26:09 +0000]
Make net nn-956480d8378f.nnue the default

Trained with the pytorch trainer: https://github.com/glinscott/nnue-pytorch

python train.py i:/bin/all.binpack i:/bin/all.binpack --gpus 1 --threads 4 --num-workers 30 --batch-size 16384 --progress_bar_refresh_rate 300 --smart-fen-skipping --random-fen-skipping 3 --features=HalfKAv2^ --lambda=1.0 --max_epochs=440 --seed %random%%random% --default_root_dir exp/run_18 --resume-from-model ./pt/nn-75980ca503c6.pt

This run is thus started from a previous master net.

all.binpack equaled 4 parts Wrong_NNUE_2.binpack https://drive.google.com/file/d/1seGNOqcVdvK_vPNq98j-zV3XPE5zWAeq/view?usp=sharing plus two parts of Training_Data.binpack https://drive.google.com/file/d/1RFkQES3DpsiJqsOtUshENtzPfFgUmEff/view?usp=sharing
Each set was concatenated together - making one large Wrong_NNUE 2 binpack and one large Training so the were approximately equal in size. They were then interleaved together. The idea was to give Wrong_NNUE.binpack closer to equal weighting with the Training_Data binpack

passed STC:
https://tests.stockfishchess.org/tests/view/60d0c0a7a8ec07dc34c072b2
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 18440 W: 1693 L: 1531 D: 15216
Ptnml(0-2): 67, 1225, 6464, 1407, 57

passed LTC:
https://tests.stockfishchess.org/tests/view/60d762793beab81350ac9d72
LLR: 2.98 (-2.94,2.94) <0.50,3.50>
Total: 93120 W: 3152 L: 2933 D: 87035
Ptnml(0-2): 48, 2581, 41076, 2814, 41

passed LTC (rebased branch to current master):
https://tests.stockfishchess.org/tests/view/60d85eeb3beab81350ac9e2b
LLR: 2.96 (-2.94,2.94) <0.50,3.50>
Total: 42688 W: 1347 L: 1206 D: 40135
Ptnml(0-2): 14, 1097, 18981, 1238, 14.

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

Bench: 4906727

4 years agoUpdate WDL model for NNUE
Joost VandeVondele [Wed, 23 Jun 2021 05:23:21 +0000]
Update WDL model for NNUE

This updates the WDL model based on the LTC statistics in June this year (10M games),
so from pre-NNUE to NNUE based results.

(for old results see, https://github.com/official-stockfish/Stockfish/pull/2778)

As before the fit by the model to the data is quite good.

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

No functional change

4 years agoSimplify Reductions Initialization
bmc4 [Tue, 22 Jun 2021 22:33:14 +0000]
Simplify Reductions Initialization

passed

STC:
LLR: 2.94 (-2.94,2.94) <-2.50,0.50>
Total: 45032 W: 3600 L: 3518 D: 37914
Ptnml(0-2): 111, 2893, 16435, 2957, 120
https://tests.stockfishchess.org/tests/view/60d2655d40925195e7a6c527

LTC:
LLR: 3.00 (-2.94,2.94) <-2.50,0.50>
Total: 25728 W: 786 L: 722 D: 24220
Ptnml(0-2): 5, 650, 11494, 706, 9
https://tests.stockfishchess.org/tests/view/60d2b14240925195e7a6c577

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

bench: 4602977

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 agoDetect fortresses a little bit quicker
Stéphane Nicolet [Tue, 22 Jun 2021 07:08:37 +0000]
Detect fortresses a little bit quicker

In the so-called "hybrid" method of evaluation of current master, we use the
classical eval (because of its speed) instead of the NNUE eval when the classical
material balance approximation hints that the position is "winning enough" to
rely on the classical eval.

This trade-off idea between speed and accuracy works well in general, but in
some fortress positions the classical eval is just bad. So in shuffling branches
of the search tree, we (slowly) increase the thresehold so that eventually we
don't trust classical anymore and switch to NNUE evaluation.

This patch increases that threshold faster, so that we switch to NNUE quicker
in shuffling branches. Idea is to incite Stockfish to spend less time in fortresses
lines in the search tree, and spend more time searching the critical lines.

passed STC:
LLR: 2.96 (-2.94,2.94) <-0.50,2.50>
Total: 47872 W: 3908 L: 3720 D: 40244
Ptnml(0-2): 122, 3053, 17419, 3199, 143
https://tests.stockfishchess.org/tests/view/60cef34b457376eb8bcab79d

passed LTC:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 73616 W: 2326 L: 2143 D: 69147
Ptnml(0-2): 21, 1940, 32705, 2119, 23
https://tests.stockfishchess.org/tests/view/60cf6d842114332881e73528

Retested at LTC against lastest master:
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 18264 W: 642 L: 532 D: 17090
Ptnml(0-2): 6, 479, 8055, 583, 9
https://tests.stockfishchess.org/tests/view/60d18cd540925195e7a6c351

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

Bench: 5139233

4 years agoMake net nn-190f102a22c3.nnue the default net.
MichaelB7 [Mon, 21 Jun 2021 12:10:35 +0000]
Make net nn-190f102a22c3.nnue the default net.

Trained with the pytorch trainer: https://github.com/glinscott/nnue-pytorch

python train.py i:/bin/all.binpack i:/bin/all.binpack --gpus 1 --threads 4 --num-workers 30 --batch-size 16384 --progress_bar_refresh_rate 300 --smart-fen-skipping --random-fen-skipping 3 --features=HalfKAv2^ --lambda=1.0 --max_epochs=440 --seed %random%%random% --default_root_dir exp/run_17 --resume-from-model ./pt/nn-75980ca503c6.pt

This run is thus started from the previous master net.

all.binpack equaled 4 parts Wrong_NNUE_2.binpack https://drive.google.com/file/d/1seGNOqcVdvK_vPNq98j-zV3XPE5zWAeq/view?usp=sharing plus two parts of Training_Data.binpack https://drive.google.com/file/d/1RFkQES3DpsiJqsOtUshENtzPfFgUmEff/view?usp=sharing
Each set was concatenated together - making one large Wrong_NNUE 2 binpack and one large Training so the were approximately equal in size. They were then interleaved together. The idea was to give Wrong_NNUE.binpack closer to equal weighting with the Training_Data binpack

passed LTC
https://tests.stockfishchess.org/tests/view/60d09f52b4c17000d679517f
LLR: 2.93 (-2.94,2.94) <0.50,3.50>
Total: 32184 W: 1100 L: 970 D: 30114
Ptnml(0-2): 10, 878, 14193, 994, 17

passed STC
https://tests.stockfishchess.org/tests/view/60d086c02114332881e7368e
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 11360 W: 1056 L: 906 D: 9398
Ptnml(0-2): 25, 735, 4026, 853, 41

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

Bench: 4631244

4 years agoFix build error on OSX
Joost VandeVondele [Mon, 21 Jun 2021 06:23:50 +0000]
Fix build error on OSX

directly use integer version for cp calculation.

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

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

No functional change

4 years agoRemove the Contempt UCI option
Stéphane Nicolet [Wed, 16 Jun 2021 05:23:26 +0000]
Remove the Contempt UCI option

This patch removes the UCI option for setting Contempt in classical evaluation.

It is exactly equivalent to using Contempt=0 for the UCI contempt value and keeping
the dynamic part in the algo (renaming this dynamic part `trend` to better describe
what it does). We have tried quite hard to implement a working Contempt feature for
NNUE but nothing really worked, so it is probably time to give up.

Interested chess fans wishing to keep playing with the UCI option for Contempt and
use it with the classical eval are urged to download the version tagged "SF_Classical"
of Stockfish (dated 31 July 2020), as it was the last version where our search
algorithm was tuned for the classical eval and is probably our strongest classical
player ever: https://github.com/official-stockfish/Stockfish/tags

Passed STC:
LLR: 2.95 (-2.94,2.94) <-2.50,0.50>
Total: 72904 W: 6228 L: 6175 D: 60501
Ptnml(0-2): 221, 5006, 25971, 5007, 247
https://tests.stockfishchess.org/tests/view/60c98bf9457376eb8bcab18d

Passed LTC:
LLR: 2.93 (-2.94,2.94) <-2.50,0.50>
Total: 45168 W: 1601 L: 1547 D: 42020
Ptnml(0-2): 38, 1331, 19786, 1397, 32
https://tests.stockfishchess.org/tests/view/60c9c7fa457376eb8bcab1bb

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

Bench: 4947716

4 years agoKeep more pawns and pieces when attacking
Stéphane Nicolet [Sun, 20 Jun 2021 08:29:20 +0000]
Keep more pawns and pieces when attacking

This patch increase the weight of pawns and pieces from 28 to 32
in the scaling formula we apply to the output of the NNUE pure eval.

Increasing this gradient for pawns and pieces means that Stockfish
will try a little harder to keep material when she has the advantage,
and try a little bit harder to escape into an endgame when she is
under pressure.

STC:
LLR: 2.93 (-2.94,2.94) <-0.50,2.50>
Total: 53168 W: 4371 L: 4177 D: 44620
Ptnml(0-2): 160, 3389, 19283, 3601, 151
https://tests.stockfishchess.org/tests/view/60cefd1d457376eb8bcab7ab

LTC:
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 10888 W: 386 L: 288 D: 10214
Ptnml(0-2): 3, 260, 4821, 356, 4
https://tests.stockfishchess.org/tests/view/60cf709d2114332881e7352b

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

Bench: 4965430

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

4 years agoMake net nn-75980ca503c6.nnue the default.
MichaelB7 [Sat, 19 Jun 2021 13:57:09 +0000]
Make net nn-75980ca503c6.nnue the default.

trained with the Python command

c:\nnue>python train.py i:/bin/all.binpack i:/bin/all.binpack --gpus 1 --threads 4 --num-workers 30 --batch-size 16384 --progress_bar_refresh_rate 300 --smart-fen-skipping --random-fen-skipping 3 --features=HalfKAv2^ --lambda=1.0 --max_epochs=440 --seed %random%%random% --default_root_dir exp/run_10 --resume-from-model ./pt/nn-3b20abec10c1.pt
`
all.binpack equaled 4 parts Wrong_NNUE_2.binpack https://drive.google.com/file/d/1seGNOqcVdvK_vPNq98j-zV3XPE5zWAeq/view?usp=sharing plus two parts of Training_Data.binpack https://drive.google.com/file/d/1RFkQES3DpsiJqsOtUshENtzPfFgUmEff/view?usp=sharing
Each set was concatenated together - making one large Wrong_NNUE 2 binpack and one large Training so the were approximately equal in size. They were then interleaved together. The idea was to give Wrong_NNUE.binpack closer to equal weighting with the Training_Data binpack .

Net nn-3b20abec10c1.nnue was chosen as the --resume-from-model with the idea that through learning, the manually hex edited values will be learned and will not need to be manually adjusted going forward. They would also be fine tuned by the learning process.

passed STC:
https://tests.stockfishchess.org/tests/view/60cdf91e457376eb8bcab66f
LLR: 2.95 (-2.94,2.94) <-0.50,2.50>
Total: 18256 W: 1639 L: 1479 D: 15138
Ptnml(0-2): 59, 1179, 6505, 1313, 72

passed LTC:
https://tests.stockfishchess.org/tests/view/60ce2166457376eb8bcab6e1
LLR: 2.94 (-2.94,2.94) <0.50,3.50>
Total: 18792 W: 654 L: 542 D: 17596
Ptnml(0-2): 9, 490, 8291, 592, 14

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

Bench: 5020972

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

No functional change.