fairystockfish.git
5 years agoMerge official-stockfish/master
Fabian Fichter [Wed, 15 Jan 2020 20:47:59 +0000]
Merge official-stockfish/master

bench: 5066442

5 years agoFix Tsume mode speed regression
Fabian Fichter [Wed, 15 Jan 2020 20:06:22 +0000]
Fix Tsume mode speed regression

5 years agoFix attack bitboard for non-king royal pieces
Fabian Fichter [Sun, 12 Jan 2020 21:53:57 +0000]
Fix attack bitboard for non-king royal pieces

knightmate STC
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 308 W: 114 L: 67 D: 127
http://www.variantfishtest.org:6543/tests/view/5e1b95bd6e23db695c3fd2c2

knightmate LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 343 W: 121 L: 75 D: 147
http://www.variantfishtest.org:6543/tests/view/5e1b963f6e23db695c3fd2c5

5 years agoAdjust rule configuration for Shogun
Fabian Fichter [Sun, 12 Jan 2020 21:15:51 +0000]
Adjust rule configuration for Shogun

5 years agoFix Betza notation for pawn drops
Fabian Fichter [Sun, 12 Jan 2020 21:07:46 +0000]
Fix Betza notation for pawn drops

5 years agoImplement XBoard Betza notation for castling
Fabian Fichter [Sun, 12 Jan 2020 20:35:03 +0000]
Implement XBoard Betza notation for castling

5 years agoFix handling of pawns in promotion zone
Fabian Fichter [Fri, 10 Jan 2020 23:18:20 +0000]
Fix handling of pawns in promotion zone

- Support shogi-style piece promotion for pawns
- Make pawn drops in promotion zone configurable via `promotionZonePawnDrops`
- Fix parsing of promotionPieceTypes option

5 years agoRewrite bughouse partner communication
Fabian Fichter [Sun, 12 Jan 2020 00:00:53 +0000]
Rewrite bughouse partner communication

- Support playing moves requested by partner.
- Extend help.

5 years agoRename firstRankDrops to firstRankPawnDrops
Fabian Fichter [Fri, 10 Jan 2020 19:15:25 +0000]
Rename firstRankDrops to firstRankPawnDrops

No functional change.

5 years agoSupport Supply chess
Fabian Fichter [Fri, 10 Jan 2020 17:15:33 +0000]
Support Supply chess

A four-player variant of Xiangqi similar to bughouse:
https://en.wikipedia.org/wiki/Xiangqi#Variations

5 years agoIncrease probcut margin for CTF variants
Fabian Fichter [Fri, 3 Jan 2020 12:39:05 +0000]
Increase probcut margin for CTF variants

racingkings STC
LLR: -2.95 (-2.94,2.94) [0.00,10.00]
Total: 10039 W: 3296 L: 3245 D: 3498
http://www.variantfishtest.org:6543/tests/view/5e0f364e6e23db1ffe4a296c

racingkings LTC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 9089 W: 2797 L: 2614 D: 3678
http://www.variantfishtest.org:6543/tests/view/5e11ade16e23db1ffe4a2983

kingofthehill STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 12632 W: 5423 L: 5158 D: 2051
http://www.variantfishtest.org:6543/tests/view/5e0f36376e23db1ffe4a2969

kingofthehill LTC
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 21444 W: 8849 L: 8638 D: 3957
http://www.variantfishtest.org:6543/tests/view/5e11add66e23db1ffe4a2981

5 years agoImplement sit and go commands for bughouse
Fabian Fichter [Fri, 10 Jan 2020 13:30:51 +0000]
Implement sit and go commands for bughouse

- Listen to `sit` and `go` commands
- Automatically sit when in a forced mate

5 years agoAdd knightmate to standard variants
Fabian Fichter [Sun, 5 Jan 2020 23:39:48 +0000]
Add knightmate to standard variants

5 years agoApply promotion limit to piece promotions
Fabian Fichter [Sun, 5 Jan 2020 22:59:03 +0000]
Apply promotion limit to piece promotions

Closes #61.

5 years agoSupport Knightmate chess
Fabian Fichter [Sun, 5 Jan 2020 21:02:38 +0000]
Support Knightmate chess

https://www.chessvariants.com/diffobjective.dir/knightmate.html

No functional change for other variants.

Closes #50.

5 years agoFix checkbox options for xboard protocol
Fabian Fichter [Sun, 5 Jan 2020 15:11:01 +0000]
Fix checkbox options for xboard protocol

Use 1/0 instead of true/false.

5 years agoSupport xboard ping command
Fabian Fichter [Sun, 5 Jan 2020 15:10:08 +0000]
Support xboard ping command

5 years agoRestart search on bughouse holding command
Fabian Fichter [Sun, 5 Jan 2020 12:42:04 +0000]
Restart search on bughouse holding command

Instead of moving instantly, update the board state and restart the search.

5 years agoCase-insensitive parsing of piece types
Fabian Fichter [Fri, 3 Jan 2020 21:14:31 +0000]
Case-insensitive parsing of piece types

Make parsing of piece types from variant configuration case-insensitive.

Fixes #63.

5 years agoSupport suicide chess
Fabian Fichter [Tue, 31 Dec 2019 12:47:18 +0000]
Support suicide chess

https://www.freechess.org/Help/HelpFiles/suicide_chess.html

5 years agoSupport nocastle chess
Fabian Fichter [Tue, 31 Dec 2019 12:29:56 +0000]
Support nocastle chess

5 years agoSupport bughouse-specific XBoard commands
Fabian Fichter [Thu, 26 Dec 2019 12:35:44 +0000]
Support bughouse-specific XBoard commands

5 years agoGeneralize sittuyin promotion
Fabian Fichter [Wed, 25 Dec 2019 11:33:00 +0000]
Generalize sittuyin promotion

No functional change.

5 years agoSupport bughouse
Fabian Fichter [Wed, 25 Dec 2019 08:42:30 +0000]
Support bughouse

Add basic support for bughouse without protocol extensions yet.

6 years agoSet variantTemplate for pocketknight
Fabian Fichter [Tue, 24 Dec 2019 13:39:22 +0000]
Set variantTemplate for pocketknight

6 years agoSend piece command in XBoard protocol
Fabian Fichter [Tue, 24 Dec 2019 13:01:42 +0000]
Send piece command in XBoard protocol

Use Betza notation to communicate piece movement options to GUI.
Improves compatibility with XBoard/WinBoard and allows to play
most variants with legality testing enabled.

Closes #56.

6 years agoAdd missing pieceToCharTable definitions
Fabian Fichter [Tue, 24 Dec 2019 12:03:26 +0000]
Add missing pieceToCharTable definitions

Fixes XBoard/WinBoard compatibility for placement and sittuyin.

6 years agoTweak piece values for drop variants
Fabian Fichter [Mon, 23 Dec 2019 12:13:27 +0000]
Tweak piece values for drop variants

and variants where check is prohibited.

crazyhouse STC (yellow)
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 16416 W: 8023 L: 7887 D: 506
http://www.variantfishtest.org:6543/tests/view/5dfe8f2f6e23db1ffe4a28ee

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2507 W: 1275 L: 1140 D: 92
http://www.variantfishtest.org:6543/tests/view/5dff13b16e23db1ffe4a28f3

racingkings STC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 4507 W: 1524 L: 1501 D: 1482
http://www.variantfishtest.org:6543/tests/view/5dffdcfe6e23db1ffe4a28fb

racingkings LTC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 1150 W: 362 L: 320 D: 468
http://www.variantfishtest.org:6543/tests/view/5dffdcf26e23db1ffe4a28f9

6 years agoTweak piece value of Ai-Wok
Fabian Fichter [Mon, 23 Dec 2019 12:11:24 +0000]
Tweak piece value of Ai-Wok

ai-wok STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 12183 W: 4264 L: 4029 D: 3890
http://www.variantfishtest.org:6543/tests/view/5dcc4d6e6e23db1ffe4a2731

ai-wok LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 27865 W: 9319 L: 8890 D: 9656
http://www.variantfishtest.org:6543/tests/view/5dce72436e23db1ffe4a274b

6 years agoIncrease aspiration window for drop variants
Fabian Fichter [Mon, 23 Dec 2019 12:10:14 +0000]
Increase aspiration window for drop variants

crazyhouse STC (failed)
LLR: -2.97 (-2.94,2.94) [0.00,10.00]
Total: 3614 W: 1727 L: 1775 D: 112
http://www.variantfishtest.org:6543/tests/view/5deec1876e23db1ffe4a28be

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3726 W: 1863 L: 1711 D: 152
http://www.variantfishtest.org:6543/tests/view/5deeca6e6e23db1ffe4a28ca

crazyhouse VLTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 11893 W: 5810 L: 5541 D: 542
http://www.variantfishtest.org:6543/tests/view/5df095f66e23db1ffe4a28d8

6 years agoRefine improving-logic
Guenther Demetz [Tue, 10 Dec 2019 07:07:34 +0000]
Refine improving-logic

Don't rely on the assumption that we are improving after surviving a
check. Instead, compare with the static eval of 2 moves before.

STC
https://tests.stockfishchess.org/tests/view/5dedfd7f3cff9a249bb9e44d
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 38859 W: 8621 L: 8397 D: 21841

LTC
https://tests.stockfishchess.org/tests/view/5dee1b5a3cff9a249bb9e465
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 51130 W: 8308 L: 7996 D: 34826

Bench: 5371271

6 years agoTuned razor and futility margins
lantonov [Mon, 9 Dec 2019 18:50:47 +0000]
Tuned razor and futility margins

Tuning was done with Bayesian optimisation with the following parameters:
Acquisition function: Expected Improvement
alpha: 0.05
xi: 1e-4
TC: 60+0.6
Number of iterations: 100
Initial points: 5
Batch size: 20 games

STC
http://tests.stockfishchess.org/tests/view/5dee291e3cff9a249bb9e470
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 19586 W: 4382 L: 4214 D: 10990

LTC
http://tests.stockfishchess.org/tests/view/5dee4e273cff9a249bb9e473
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 38840 W: 6315 L: 6036 D: 26489

Bench: 5033242

6 years agoTrappedRook value and King positional tables
xoto10 [Mon, 9 Dec 2019 21:38:57 +0000]
TrappedRook value and King positional tables

Small tweak to increase the TrappedRook penalty. Nice idea by Alain Savard!

STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 36977 W: 8212 L: 7993 D: 20772
https://tests.stockfishchess.org/tests/view/5dee1c1e3cff9a249bb9e46d

LTC
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 36395 W: 6070 L: 5795 D: 24530
https://tests.stockfishchess.org/tests/view/5dee90153cff9a249bb9e479

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

Bench: 5176990

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

Comments by Alain Savard:

For the record, the idea was to run an experimental tuning with disabled
castling in the hope to get more hits on the TrappedRook and the king in
the c1- f1-f2-c2 area
http://tests.stockfishchess.org/tests/view/5dec57be51219d7befdc76e1

A first interpretation of that tuning was green STC (0, 4) and yellow LTC (0, 4):
http://tests.stockfishchess.org/tests/view/5ded04bc51219d7befdc773a
http://tests.stockfishchess.org/tests/view/5ded1e7a51219d7befdc7760

Thank you @xoto for trying this. Indeed, because the tuned Kc2 and Kf2 values
were quite different, it was a good idea to try something more neutral.

6 years agoExclude blockers for king from mobility area
Vizvezdenec [Sun, 8 Dec 2019 14:10:14 +0000]
Exclude blockers for king from mobility area

This patch excludes blockers for king from mobility area. It was tried a couple
of times by now but now it passed. Performance is not enormously good but this
patch makes a lot of sence - blockers for king can't really move until king moves
(in most cases) so logic behind it is the same as behind excluding king square
from mobility area.

STC
http://tests.stockfishchess.org/tests/view/5dec388651219d7befdc76be
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 6155 W: 1428 L: 1300 D: 3427

LTC
http://tests.stockfishchess.org/tests/view/5dec4a3151219d7befdc76d3
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 120800 W: 19636 L: 19134 D: 82030

Bench: 5173081

6 years agoDo last capture extensions for every single node
Vizvezdenec [Sat, 7 Dec 2019 14:56:33 +0000]
Do last capture extensions for every single node

This patch simplifies latest @MJZ1977 elo gainer. Seems like PvNode check in
condition of last capture extension is not needed. Note - even if this is a
simplification it actually causes this extension to be applied more often, thus
strengthening effect of @MJZ1977's patch.

passed STC
http://tests.stockfishchess.org/tests/view/5deb9a3eb7bdefd50db28d0e
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 80244 W: 17421 L: 17414 D: 45409

passed LTC
http://tests.stockfishchess.org/tests/view/5deba860b7bdefd50db28d11
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 21506 W: 3565 L: 3446 D: 14495

Bench: 5097036

6 years agoSimplify pruning moves with negative SEE
protonspring [Fri, 6 Dec 2019 15:56:17 +0000]
Simplify pruning moves with negative SEE

This patch simplifies pruning moves with negative SEE values.

STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 18847 W: 4211 L: 4084 D: 10552
http://tests.stockfishchess.org/tests/view/5de983f2caa7c610e4d1866e

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 25556 W: 4200 L: 4087 D: 17269
http://tests.stockfishchess.org/tests/view/5de99e21caa7c610e4d18676

Bench 5390930

6 years agoFix output of PV lines with invalid scores #2439
joergoster [Fri, 6 Dec 2019 09:11:45 +0000]
Fix output of PV lines with invalid scores #2439

As reported on the forum it is possible, on very rare occasions, that we are
trying to print a PV line with an invalid previousScore, although this line
has a valid actual score. This patch fixes output of PV lines with invalid
scores in a MultiPV search. This is a follow-up patch to 8b15961 and makes
the fix finally complete.

The reason is the i <= pvIdx condition which probably is a leftover from the
times there was a special root search function. This check is no longer needed
today and prevents PV lines past the current one (current pvIdx) to be flagged
as updated even though they do have a valid score.

https://github.com/official-stockfish/Stockfish/commit/8b15961349e18a9ba113973c53f53913d0cd0fad
https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/PrnoDLvMvro

No functional change.

6 years agoTweak time management (failing eval)
xoto10 [Sun, 8 Dec 2019 11:06:19 +0000]
Tweak time management (failing eval)

Adjust fallingEval with score change in last 5 iterations. FallingEval adjusts
the time used on a move depending on whether the position score is better or
worse than on the previous move. This change adds a dependency on the score
change in the last 5 iterations of the current search.

Tests with original code:
STC :
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 18728 W: 4170 L: 4005 D: 10553
https://tests.stockfishchess.org/tests/view/5de68a5bb407ee7bfda68a94

LTC :
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 180217 W: 29214 L: 28551 D: 122452
https://tests.stockfishchess.org/tests/view/5de690a4b407ee7bfda68a9a

Revised code using a simple array instead of a deque and different values
gave a slightly quicker pass at LTC. The merged patch now uses this:

STC :
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 18616 W: 4114 L: 3950 D: 10552
https://tests.stockfishchess.org/tests/view/5debb790b7bdefd50db28d14

LTC :
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 134151 W: 21729 L: 21191 D: 91231
https://tests.stockfishchess.org/tests/view/5debc13fb7bdefd50db28d19

No functional change

6 years agoRemove unneeded & incorrect check.
Joost VandeVondele [Tue, 12 Nov 2019 15:12:09 +0000]
Remove unneeded & incorrect check.

the removed line is not needed, since with the conditions on SE, eval
equals ttValue (except inCheck), which must be larger than beta if the second condition
is true.

The removed line is also incorrect as eval might be VALUE_NONE at this
location if inCheck. This removal addresses part of https://github.com/official-stockfish/Stockfish/pull/2406#issuecomment-552642608

No functional change.

6 years agoThe sudo tag is deprecated in Travis CI
Stéphane Nicolet [Sun, 8 Dec 2019 23:00:34 +0000]
The sudo tag is deprecated in Travis CI

Reported by Christian Clauss. Thanks!

No functional change

6 years agoFix endgame evaluation for large-board version
Fabian Fichter [Sat, 7 Dec 2019 15:19:10 +0000]
Fix endgame evaluation for large-board version

Map squares to 8x8 board to retain endgame evaluation logic.
Allows to enable endgame evaluation for large-board variants.

capablanca STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 2512 W: 980 L: 941 D: 591
http://www.variantfishtest.org:6543/tests/view/5dea40ff6e23db1ffe4a289c

capablanca LTC
LLR: 2.98 (-2.94,2.94) [-10.00,5.00]
Total: 1443 W: 534 L: 490 D: 419
http://www.variantfishtest.org:6543/tests/view/5dea8b666e23db1ffe4a28a6

makruk STC
LLR: 3.00 (-2.94,2.94) [-10.00,5.00]
Total: 1810 W: 158 L: 124 D: 1528
http://www.variantfishtest.org:6543/tests/view/5dea3f546e23db1ffe4a289a

makruk LTC
LLR: 3.01 (-2.94,2.94) [-10.00,5.00]
Total: 795 W: 77 L: 41 D: 677
http://www.variantfishtest.org:6543/tests/view/5dea8b7a6e23db1ffe4a28a8

chess STC
LLR: 2.99 (-2.94,2.94) [-10.00,5.00]
Total: 4321 W: 959 L: 936 D: 2426
http://www.variantfishtest.org:6543/tests/view/5dea398f6e23db1ffe4a2896

chess LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 3451 W: 667 L: 640 D: 2144
http://www.variantfishtest.org:6543/tests/view/5dea633a6e23db1ffe4a28a4

6 years agoUnblockedStorm tuned
FauziAkram [Fri, 29 Nov 2019 17:15:21 +0000]
UnblockedStorm tuned

STC
http://tests.stockfishchess.org/tests/view/5de155980294ec4750cba9bd
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 60206 W: 13295 L: 12895 D: 34016

LTC
http://tests.stockfishchess.org/tests/view/5de22f6f0294ec4750cba9e7
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 182005 W: 29571 L: 28902 D: 123532

VLTC
http://tests.stockfishchess.org/tests/view/5de4adca5e868d334be516c1
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 42101 W: 6068 L: 5978 D: 30055

Bench: 5122362

6 years agoConsider soldiers as pawn-like in evaluation
Fabian Fichter [Mon, 2 Dec 2019 22:10:15 +0000]
Consider soldiers as pawn-like in evaluation

minixiangqi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 398 W: 186 L: 101 D: 111

6 years agoFix endgame evaluation for KFsPs vs. K
Fabian Fichter [Mon, 2 Dec 2019 20:48:39 +0000]
Fix endgame evaluation for KFsPs vs. K

Example:
```
setoption name UCI_Variant value makruk
position fen 7k/8/5M2/5KMP/8/8/8/8 w - - 0 1
eval
```

6 years agoBoost piece value of strongest piece
Fabian Fichter [Sun, 1 Dec 2019 22:24:35 +0000]
Boost piece value of strongest piece

shatranj STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 3168 W: 375 L: 300 D: 2493
http://www.variantfishtest.org:6543/tests/view/5de29de76e23db1ffe4a285e

shatranj LTC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 2416 W: 226 L: 160 D: 2030
http://www.variantfishtest.org:6543/tests/view/5de3007f6e23db1ffe4a2864

6 years agoConsider flying general rule in SEE
Fabian Fichter [Sun, 1 Dec 2019 18:14:32 +0000]
Consider flying general rule in SEE

Mitigates #59.

6 years agoKing proximity tweak for passed pawns
Alain SAVARD [Sat, 30 Nov 2019 14:47:43 +0000]
King proximity tweak for passed pawns

Decrease slightly the penalty for opponent king distance to passed pawn.
Instead of 5:2 ratio (or 20:8) we now have 19:8

STC
http://tests.stockfishchess.org/tests/view/5de281b2727dc1d26718a673
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 28638 W: 6297 L: 6104 D: 16237

LTC
http://tests.stockfishchess.org/tests/view/5de2a2ff727dc1d26718a67b
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 59586 W: 9766 L: 9429 D: 40391

Where to go from here:
Further tests will try a similar tweak on the friendly king proximity penalty,
because recent experiments indicate that this penalty is quite sensitive,
but I wanted to try first on the larger term.

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

bench: 5258928

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

Increasing the penalty ratio to 21:8 was neutral.
http://tests.stockfishchess.org/tests/view/5de2814d727dc1d26718a671

Decreasing the penalty ratio a bit more to 9:4 seems less promising
http://tests.stockfishchess.org/tests/view/5de2f4c2727dc1d26718a691
http://tests.stockfishchess.org/tests/view/5de32ecc727dc1d26718a6b0

6 years agoSupport Tsume mode
Fabian Fichter [Sat, 30 Nov 2019 17:35:51 +0000]
Support Tsume mode

Allows to solve Tsume puzzles. Example:
```
setoption name TsumeMode value true
setoption name UCI_Variant value shogi
position fen 1kp6/2l6/2l6/2l6/2n6/2n6/1gn6/9/L8[SPPPPPPrrbbgggsssnlppp] w 0 1
d
go mate 20
```

6 years agoEnable endgame evaluation for S-Chess
Fabian Fichter [Sat, 30 Nov 2019 11:44:06 +0000]
Enable endgame evaluation for S-Chess

seirawan STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 4672 W: 1609 L: 1473 D: 1590
http://www.variantfishtest.org:6543/tests/view/5dd852366e23db1ffe4a27a7

seirawan LTC
LLR: -0.69 (-2.94,2.94) [0.00,10.00]
Total: 12745 W: 3995 L: 3856 D: 4894
http://www.variantfishtest.org:6543/tests/view/5ddba1946e23db1ffe4a27cd

6 years agoTweak initiative for xiangqi
Fabian Fichter [Sat, 30 Nov 2019 01:03:46 +0000]
Tweak initiative for xiangqi

xiangqi
LLR: 3.02 (-2.94,2.94) [0.00,10.00]
Total: 828 W: 279 L: 196 D: 353

minixiangqi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 312 W: 156 L: 72 D: 84

losers STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 2266 W: 1013 L: 968 D: 285
http://www.variantfishtest.org:6543/tests/view/5de1105a6e23db1ffe4a2840

shatranj STC
LLR: 2.97 (-2.94,2.94) [-10.00,5.00]
Total: 3498 W: 376 L: 347 D: 2775
http://www.variantfishtest.org:6543/tests/view/5de10fc66e23db1ffe4a283c

6 years agoTweak piece value of amazon
Fabian Fichter [Fri, 29 Nov 2019 13:23:41 +0000]
Tweak piece value of amazon

amazon STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 10420 W: 2230 L: 2067 D: 6123
http://www.variantfishtest.org:6543/tests/view/5dcc4d936e23db1ffe4a2736

amazon LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 7252 W: 1293 L: 1172 D: 4787
http://www.variantfishtest.org:6543/tests/view/5dce721a6e23db1ffe4a2749

6 years agoExtend bench to static evaluations
Joost VandeVondele [Wed, 27 Nov 2019 18:03:23 +0000]
Extend bench to static evaluations

this patch extends bench to print static evaluations.

./stockfish bench 16 1 1 filename eval

will now print the evaluations for all fens in the file.

This complements the various 'go' flavors for bench and might be useful for debugging and/or tuning.

No functional change.

6 years agoTweak piece values for drop variants
Fabian Fichter [Tue, 26 Nov 2019 19:06:05 +0000]
Tweak piece values for drop variants

as well as for racing kings.

crazyhouse STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 4655 W: 2339 L: 2172 D: 144
http://www.variantfishtest.org:6543/tests/view/5ddaff406e23db1ffe4a27c1

crazyhouse LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3075 W: 1550 L: 1407 D: 118
http://www.variantfishtest.org:6543/tests/view/5ddb15636e23db1ffe4a27c8

racingkings STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3311 W: 1177 L: 1057 D: 1077
http://www.variantfishtest.org:6543/tests/view/5ddaff586e23db1ffe4a27c4

racingkings LTC
LLR: 2.96 (-2.94,2.94) [-10.00,5.00]
Total: 824 W: 284 L: 239 D: 301
http://www.variantfishtest.org:6543/tests/view/5ddba21c6e23db1ffe4a27d4

6 years agoSimplify king danger
Vizvezdenec [Mon, 25 Nov 2019 23:56:53 +0000]
Simplify king danger

This patch is a cleanup/simplification of king flank defenders patch,
removing king flanks attacks linear dependance in kingdanger. Result
of experiments with quadratic kingflank defenders scaling. Rebased on
the latest master.

passed STC
http://tests.stockfishchess.org/tests/view/5ddc2b99e0b4af579302bacf
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 19660 W: 4309 L: 4184 D: 11167

passed LTC
http://tests.stockfishchess.org/tests/view/5ddc3168e0b4af579302bade
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 24362 W: 3974 L: 3859 D: 16529

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

bench 5742013

6 years agoExtend last non-pawn captures
Moez Jellouli [Sun, 24 Nov 2019 20:57:09 +0000]
Extend last non-pawn captures

Extend last non-pawn captures at principal variation nodes because
they are in general decisive moves with clear endgame result.

STC
http://tests.stockfishchess.org/tests/view/5ddafc86e75c0005326d2140
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 9892 W: 2238 L: 2099 D: 5555

LTC
http://tests.stockfishchess.org/tests/view/5ddb0401e75c0005326d2150
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 30369 W: 5013 L: 4756 D: 20600

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

Bench: 5059526

6 years agoKing danger: retire attacked-by-bishop defense
31m059 [Sat, 23 Nov 2019 09:03:51 +0000]
King danger: retire attacked-by-bishop defense

In a recent commit, "Introduce king flank defenders," a term was introduced
by Michael Chaly (@Vizvezdenec) to reduce king danger based on king defenders,
i.e., friendly attacks on our King Flank and Camp. This is a powerful idea
and broadly applicable to all of our pieces.

An earlier, but narrower, version of a similar idea was already coded into
king danger, with a term reducing king danger simply if we had a bishop and
king attacking the same square -- there is also a similar term for knights,
but roughly three times larger. I had attempted to tweak this term's coefficient
fairly recently, in a series of tests in early September which increased this
coefficient.  All failed STC with significantly negative scores.

Now that the king flank defenders term has been introduced, it appears that
the bishop-defense term can be simplified away without compensation or
significant Elo loss.

Where do we go from here? This PR is a natural follow-up to "Introduce king
flank defenders," which proposed simplification with existing and overlapping
terms, such as this one.  That PR also mentioned that the coefficient it
introduced appeared arbitrary, so perhaps this PR can facilitate a tweak to
increase king flank defenders' coefficient.

Additionally, this pull request is extremely similar to https://github.com/official-stockfish/Stockfish/pull/1821,
which was (coincidentally) merged a year ago, to the day (November 23, 2018).
That patch also simplified away a linear king danger tropism term, which was
soon after replaced with a quadratic term by @Vizvezdenec (which would not have
passed without the simplification).  @Vizvezdenec, again by coincidence, has
recently been trying to implement a quadratic term, this time for defenders
rather than attackers.  This history of this evaluation code suggests that
this simplification might be enough to help a patch for quadratic king-flank
defenders pass.

Bench: 4959670

STC:
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 22209 W: 4920 L: 4800 D: 12489
https://tests.stockfishchess.org/tests/view/5dd444d914339111b9b6bed7

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 152107 W: 24658 L: 24743 D: 102706
https://tests.stockfishchess.org/tests/view/5dd4be31f531e81cf278ea9d

Interesting discussion on Github about this pull request:
https://github.com/official-stockfish/Stockfish/pull/2424

---

This pull request was opened less than one week before the holiday of
Thanksgiving here in the United States.  In keeping with the holiday
tradition of expressing gratitude, I would like to thank our generous
CPU donors, talented forum contributors, innovative developers, speedy
fishtest approvers, and especially our hardworking server maintainers
(@ppigazzini and @tomtor). Thank you all for a year of great Stockfish
progress!

6 years agoSimplify endgame factor for opposite colored bishops
SFisGOD [Wed, 20 Nov 2019 19:31:23 +0000]
Simplify endgame factor for opposite colored bishops

Stockfish is continually improving. Patches that gain elo in the past may
no longer be needed as stockfish improved elsewhere. This patch removes
passed pawns count dependence in opposite colored bishops scale factor.
We used the mean of passed count pawns (~1.4) to compensate, and changed
the base value from 16 to 22.

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 57879 W: 12657 L: 12607 D: 32615
http://tests.stockfishchess.org/tests/view/5dd1644f42928ff08153dc1e

Passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 121648 W: 19622 L: 19659 D: 82367
http://tests.stockfishchess.org/tests/view/5dd24572ccb823d41d4b47bb

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

Bench: 5067864

6 years agoTweak fairy piece values
Fabian Fichter [Fri, 22 Nov 2019 23:13:13 +0000]
Tweak fairy piece values

centaur
LLR: 3.01 (-2.94,2.94) [0.00,10.00]
Total: 372 W: 208 L: 112 D: 52

shako
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 722 W: 324 L: 231 D: 167

manchu
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 1140 W: 593 L: 480 D: 67

6 years agoConsolidate evaluation of unpromoted soldiers
Fabian Fichter [Fri, 22 Nov 2019 15:50:36 +0000]
Consolidate evaluation of unpromoted soldiers

xiangqi
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1678 W: 615 L: 516 D: 547

6 years agoAdd more variant templates
Fabian Fichter [Fri, 22 Nov 2019 15:07:03 +0000]
Add more variant templates

6 years agoIncrease endgame king danger for xiangqi
Fabian Fichter [Thu, 21 Nov 2019 22:40:14 +0000]
Increase endgame king danger for xiangqi

minixiangqi
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 508 W: 233 L: 145 D: 130

xiangqi
LLR: 0.25 (-2.94,2.94) [0.00,10.00]
Total: 2000 W: 602 L: 572 D: 826

6 years agoRestore development version
Fabian Fichter [Thu, 21 Nov 2019 19:33:43 +0000]
Restore development version

6 years agoDo lmr for more captures
Vizvezdenec [Wed, 20 Nov 2019 20:20:20 +0000]
Do lmr for more captures

Based on machinery introduced by vondele. Logic behind patch if relatively simple -
if we reduce less with high hit rate of transposition table somewhat logical is to
reduce more with low hit rate. For example enable all captures for LMR.

Threshold 0.375 is arbitrary and can be tweaked :)

STC
http://tests.stockfishchess.org/tests/view/5dd4d51df531e81cf278eaac
LLR: 2.97 (-2.94,2.94) [-1.50,4.50]
Total: 16495 W: 3591 L: 3434 D: 9470

LTC
http://tests.stockfishchess.org/tests/view/5dd52265f531e81cf278eace
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 23598 W: 3956 L: 3716 D: 15926

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

Bench: 5067870

6 years agoOutpost Endgame values
Alain SAVARD [Sat, 16 Nov 2019 19:42:47 +0000]
Outpost Endgame values

Remove the recent rank based Outpost array by using a weighted average value
computed using a frequency analysis by rank from a large set of middle game
positions.

The higher eg values introduced by the new Outpost array (which were about
twice the previous masters) are thus preserved.

STC
http://tests.stockfishchess.org/tests/view/5dd05c870ebc5902579e1f7f
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 42466 W: 9232 L: 9151 D: 24083

LTC
http://tests.stockfishchess.org/tests/view/5dd146e342928ff08153dab1
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 66968 W: 10921 L: 10873 D: 45174

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

Bench: 5103360

6 years agoSimplify advanced pawn push pruning
Vizvezdenec [Sun, 17 Nov 2019 18:47:17 +0000]
Simplify advanced pawn push pruning

This patch simplifies away all conditions related to advanced pawn pushes
in shallow depth pruning. Idea is based on fact that in master we have
advanced pawn pushes not being pruned what we are only in PV node and
when non-pawn material of opponent is > Bishop, so pretty rarely. With
this patch we will have all pruning heuristics working for this moves as
for every other move.

STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 159143 W: 34271 L: 34418 D: 90454
http://tests.stockfishchess.org/tests/view/5dcdb3110ebc5902563249d7

LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 63900 W: 10375 L: 10322 D: 43203
http://tests.stockfishchess.org/tests/view/5dd05e820ebc5902579e1fb8

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

bench 4897149

6 years agoFairy-Stockfish 10.4
Fabian Fichter [Tue, 19 Nov 2019 11:57:44 +0000]
Fairy-Stockfish 10.4

bench: 4756806

6 years agoAdd cambodian to perft tests
Fabian Fichter [Mon, 18 Nov 2019 20:14:16 +0000]
Add cambodian to perft tests

6 years agoUse exploration rate for reductions
Joost VandeVondele [Fri, 15 Nov 2019 17:16:27 +0000]
Use exploration rate for reductions

This patch measures how frequently search is exploring new configurations.
This is done be computing a running average of ttHit. The ttHitAverage rate
is somewhat low (e.g. 30% for startpos) in the normal case, while it can be
very high if no progress is made (e.g. 90% for the fortress I used for testing).

This information can be used to influence search. In this patch, by adjusting
reductions if the rate > 50%. A first version (using a low ttHitAverageResolution
and this 50% threshold) passed  testing:

STC
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 26425 W: 5837 L: 5650 D: 14938
http://tests.stockfishchess.org/tests/view/5dcede8b0ebc5902563258fa

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 32313 W: 5392 L: 5128 D: 21793
http://tests.stockfishchess.org/tests/view/5dcefb1f0ebc590256325c0e

However, as discussed in pull request 2414, using a larger ttHitAverageResolution
gives a better approximation of the underlying distributions. This needs a slight
adjustment for the threshold as the new distributions are shifted a bit compared
to the older ones, and this threshold seemingly is sensitive (we used 0.53125 here).
https://github.com/official-stockfish/Stockfish/pull/2414

This final version also passed testing, and is used for the patch:

STC
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 16025 W: 3555 L: 3399 D: 9071
http://tests.stockfishchess.org/tests/view/5dd070b90ebc5902579e20c2

LTC
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 37576 W: 6277 L: 5998 D: 25301
http://tests.stockfishchess.org/tests/view/5dd0f58e6f544e798086f224

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

Bench: 4989584

6 years agoAdd more links to readme
Fabian Fichter [Sun, 17 Nov 2019 20:28:49 +0000]
Add more links to readme

6 years agoMerge official-stockfish/master
Fabian Fichter [Sun, 17 Nov 2019 15:09:04 +0000]
Merge official-stockfish/master

bench: 4756806

6 years agoSpeed up move generation for xiangqi
Fabian Fichter [Sun, 17 Nov 2019 14:10:37 +0000]
Speed up move generation for xiangqi

Filter out invalid soldier and general moves early.

6 years agoFix perpetual check detection
Fabian Fichter [Sun, 17 Nov 2019 11:54:18 +0000]
Fix perpetual check detection

Consider also perpetual checks by side to move
in order to avoid wrong draw scores.

Closes #49.

6 years agoMore pieceToCharTable definitions
Fabian Fichter [Sat, 16 Nov 2019 22:04:26 +0000]
More pieceToCharTable definitions

6 years agoMerge official-stockfish/master
Fabian Fichter [Sat, 16 Nov 2019 20:00:42 +0000]
Merge official-stockfish/master

bench: 4552352

6 years agoAdd xiangqihouse to variants.ini
Fabian Fichter [Sat, 16 Nov 2019 17:00:58 +0000]
Add xiangqihouse to variants.ini

Enhance bitboard parsing to simplify definition.

6 years agoIntroduce king flank defenders
Vizvezdenec [Sat, 16 Nov 2019 11:53:11 +0000]
Introduce king flank defenders

This patch implements what we have been trying for quite some time -
dependance of kingdanger on balance of attackers and defenders of king
flank, to avoid overestimate attacking power if the opponent has enough
defenders of king position. We already have some form of it in bishop
and knight defenders - this is further work in this direction.

What to do based on this?

1) constant 4 is arbitrary, maybe it is not optimal
2) maybe we can use quadratic formula as in kingflankattack
3) simplification into alrealy existing terms is always a possibility :)
4) overall kingdanger tuning always can be done.

passed STC:
http://tests.stockfishchess.org/tests/view/5dcf40560ebc590256325f30
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 26298 W: 5819 L: 5632 D: 14847

passed LTC:
http://tests.stockfishchess.org/tests/view/5dcfa5760ebc590256326464
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 30600 W: 5042 L: 4784 D: 20774

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

Bench: 4496847

6 years agoAdd pieceToCharTable for more variants
Fabian Fichter [Sat, 16 Nov 2019 11:03:38 +0000]
Add pieceToCharTable for more variants

Improve XBoard compatibility for more variants.

6 years agoTweak piece values for xiangqi
Fabian Fichter [Fri, 15 Nov 2019 21:40:52 +0000]
Tweak piece values for xiangqi

xiangqi
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1704 W: 506 L: 416 D: 782

6 years agoImprove displaying of position
Fabian Fichter [Fri, 15 Nov 2019 18:01:02 +0000]
Improve displaying of position

Add side to move and pockets to output of `d` command (#47).

6 years agoSupport Manchu chess
Fabian Fichter [Fri, 15 Nov 2019 15:31:44 +0000]
Support Manchu chess

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

bench: 4700464

6 years agoDefine variant template for minixiangqi
Fabian Fichter [Fri, 15 Nov 2019 00:11:08 +0000]
Define variant template for minixiangqi

6 years agoImprove XBoard compatibility
Fabian Fichter [Fri, 15 Nov 2019 00:03:52 +0000]
Improve XBoard compatibility

Support pieceToCharTable in setup command to improve compatibility (#54).

6 years agoImprove XBoard compatibility for makruk variants
Fabian Fichter [Thu, 14 Nov 2019 23:26:46 +0000]
Improve XBoard compatibility for makruk variants

6 years agoPrune before extension
Stefan Geschwentner [Tue, 12 Nov 2019 17:36:12 +0000]
Prune before extension

Switch execution order in search: do move pruning before extension detection.

STC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 5762 W: 1307 L: 1181 D: 3274
http://tests.stockfishchess.org/tests/view/5dcc56e90ebc59025bcbb833

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 72956 W: 11959 L: 11585 D: 49412
http://tests.stockfishchess.org/tests/view/5dcc62840ebc59025bcbb96f

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

Bench: 4532366

6 years agoSupport New Zealand chess
Fabian Fichter [Thu, 14 Nov 2019 16:19:48 +0000]
Support New Zealand chess

Allow castling with one non-rook piece type and add New Zealand chess (#52).

bench: 4470822

6 years agoSupport Centaur chess
Fabian Fichter [Thu, 14 Nov 2019 13:14:44 +0000]
Support Centaur chess

https://www.chessvariants.com/large.dir/contest/royalcourt.html

Closes #33.

bench: 4556696

6 years agoSupport debug commands also in XBoard protocol
Fabian Fichter [Thu, 14 Nov 2019 10:47:47 +0000]
Support debug commands also in XBoard protocol

Commands `d` and `eval` can now also be used in xboard protocol (#47).

6 years agoSeparate XBoard protocol code
Fabian Fichter [Thu, 14 Nov 2019 09:37:59 +0000]
Separate XBoard protocol code

Split UCI and XBoard protocol code for better maintainability.

No functional change.

6 years agoTweak piece values for hoppelpoppel
Fabian Fichter [Thu, 14 Nov 2019 09:25:40 +0000]
Tweak piece values for hoppelpoppel

hoppelpoppel STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 159 W: 113 L: 25 D: 21
http://www.variantfishtest.org:6543/tests/view/5dcc4d846e23db1ffe4a2734

hoppelpoppel LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 136 W: 100 L: 16 D: 20
http://www.variantfishtest.org:6543/tests/view/5dcc61d96e23db1ffe4a2739

6 years agoRank-based outposts
SFisGOD [Tue, 12 Nov 2019 01:22:09 +0000]
Rank-based outposts

Introduce OutpostRank[RANK_NB] which contains a bonus according to
the rank of the outpost. We use it for the primary Outpost bonus.
The values are based on the trends of the SPSA tuning run with some
manual tweaks.

Passed STC:
LLR: 2.96 (-2.94,2.94) [-1.50,4.50]
Total: 27454 W: 6059 L: 5869 D: 15526
http://tests.stockfishchess.org/tests/view/5dcadba20ebc590256922f09

Passed LTC:
LLR: 2.94 (-2.94,2.94) [0.00,3.50]
Total: 57950 W: 9443 L: 9112 D: 39395
http://tests.stockfishchess.org/tests/view/5dcaea880ebc5902569230bc

Bench: 4778405

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

The inspiration for this patch came from Stefan Geschwentner's attempt
of modifying BishopPawns into a rank-based penalty. Michael Stembera
suggested that maybe the S(0, 0) ranks (3rd, 7th and also maybe 8th)
can still be tuned. This would expand our definition of Outpost and
OutpostRanks would be removed altogether. Special thanks to Mark Tenzer
for all the help and excellent suggestions.

6 years agoAvoid copying of pieceToChar string
Fabian Fichter [Tue, 12 Nov 2019 22:53:09 +0000]
Avoid copying of pieceToChar string

Small speed-up by using references.

6 years agoFix description of chancellor in variants.ini
Fabian Fichter [Tue, 12 Nov 2019 20:54:11 +0000]
Fix description of chancellor in variants.ini

6 years agoSupport perft command in xboard protocol
Fabian Fichter [Tue, 12 Nov 2019 19:59:03 +0000]
Support perft command in xboard protocol

6 years agoUpdate documentation in variants.ini
Fabian Fichter [Tue, 12 Nov 2019 19:25:01 +0000]
Update documentation in variants.ini

Describe recently added configuration options.

6 years agoShallow depth pruning on NonPV advanced pawn push
Miguel Lahoz [Sun, 10 Nov 2019 09:49:06 +0000]
Shallow depth pruning on NonPV advanced pawn push

Usually advanced pawn pushes are not considered in shallow depth pruning
because it is risky to do so with possible promotions near the horizon.
However, this heuristic is not also beneficial on NonPV nodes since we
can afford to take slightly more risk on less important nodes.

STC:
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 54530 W: 11955 L: 11686 D: 30889
http://tests.stockfishchess.org/tests/view/5dc7dda30ebc5902ea57efd0

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,3.50]
Total: 77336 W: 12786 L: 12399 D: 52151
http://tests.stockfishchess.org/tests/view/5dc8050d0ebc5902ea57f491

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

Bench: 4422068

6 years agoRemove explicit moveCount pruning
Joost VandeVondele [Sat, 9 Nov 2019 05:56:18 +0000]
Remove explicit moveCount pruning

The removed lines approximately duplicate equivalent logic in the movePicker.
Adjust the futility_move_count to componsate for some difference
(the movePicker prunes one iteration of the move loop later).

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 8114 W: 1810 L: 1663 D: 4641
http://tests.stockfishchess.org/tests/view/5dc6afe60ebc5902562bd318

Passed LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 89956 W: 14473 L: 14460 D: 61023
http://tests.stockfishchess.org/tests/view/5dc6bdcf0ebc5902562bd3c0

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

Bench: 4256440

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

How to continue from there?

It would be interesting to see if we can extract some Elo gain
from the new futility_move_count formula, for instance by somehow
incorporating the final -1 in the 5 constant, or adding a linear
term to the quadratics...

```
   futility_move_count = (5 + depth * depth) * (1 + improving) / 2 - 1
```

6 years agoSequencing tweak in tbprobe()
Alain SAVARD [Sun, 27 Oct 2019 20:16:26 +0000]
Sequencing tweak in tbprobe()

Followup of "issue" #2372, which was in fact a small speed-up
proposal by user @d3vv for the probing code of tablebases.

See comments on this issue where it was proven by Alin Savard that the
proposed change is more efficient on average than master on all type of
sequences it will usually be called.

Note that on gcc 4.3, this will produce a bogus warning which was solved
with ulterior gcc versions: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=43949

Closes https://github.com/official-stockfish/Stockfish/issues/2372
Closes https://github.com/official-stockfish/Stockfish/pull/2379

Non functional change

6 years agoFix incorrect mate score.
Joost VandeVondele [Sat, 26 Oct 2019 14:34:19 +0000]
Fix incorrect mate score.

Current master 648c7ec25db2040c0af34dd846dfa3f57af5ad0a will generate an
incorrect mate score for:

```
setoption name Hash value 8
setoption name Threads value 1
position fen 8/1p2KP2/1p4q1/1Pp5/2P5/N1Pp1k2/3P4/1N6 b - - 76 40
go depth 49
```
even though the position is a draw. Generally, SF tries to display only
proven mate scores, so this is a bug.

This was posted http://www.talkchess.com/forum3/viewtopic.php?f=2&t=72166
by Uri Blass, with the correct analysis that this must be related to the
50 moves draw rule being ignored somewhere.

Indeed, this is possible as positions and there eval are stored in the TT,
without reference to the 50mr counter. Depending on the search path followed
a position can thus be mate or draw in the TT (GHI or Graph history interaction).
Therefore, to prove mate lines, the TT content has to be used with care. Rather
than ignoring TT content in general or for mate scores (which impact search or
mate finding), it is possible to be more selective. In particular, @WOnder93
suggested to only ignore the TT if the 50mr draw ply is closer than the mate
ply. This patch implements this idea, by clamping the eval in the TT to
+-VALUE_MATED_IN_MAX_PLY. This retains the TTmove, but causes a research of
these lines (with the current 50mr counter) as needed.

This patch hardly ever affects search (as indicated by the unchanged
bench), but fixes the testcase. As the conditions are very specific,
also mate finding will almost never be less efficient (testing welcome).

It was also shown to pass STC and LTC non-regression testing, in a form
using if/then/else instead of ternary operators:

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 93605 W: 15346 L: 15340 D: 62919
http://tests.stockfishchess.org/tests/view/5db45bb00ebc5908127538d4

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 33873 W: 7359 L: 7261 D: 19253
http://tests.stockfishchess.org/tests/view/5db4c8940ebc5902d6b146fc

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

Bench: 4362323

6 years agoSet default variant based on protocol
Fabian Fichter [Mon, 11 Nov 2019 20:01:17 +0000]
Set default variant based on protocol

Improve compatibility with shogi and xiangqi GUIs
by setting suitable defaults for UCI_Variant:
UCI: chess
USI: shogi
UCCI: xiangqi
xboard: chess

6 years agoUpdate list of supported protocols in readme
Fabian Fichter [Mon, 11 Nov 2019 15:44:51 +0000]
Update list of supported protocols in readme