fairystockfish.git
7 years agoGuard against overflow in piece types
Fabian Fichter [Sun, 16 Sep 2018 14:21:24 +0000]
Guard against overflow in piece types

No functional change.

7 years agoLess early pruning for nCheck variants
Fabian Fichter [Sun, 2 Sep 2018 14:55:12 +0000]
Less early pruning for nCheck variants

STC 3check
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 4562 W: 2177 L: 2017 D: 368
http://35.161.250.236:6543/tests/view/5b8bfa486e23db0fbab0dd37

7 years agoAdd tic-tac-toe
Fabian Fichter [Sat, 15 Sep 2018 14:19:47 +0000]
Add tic-tac-toe

7 years agoNo initiative bonus for extinction variants
Fabian Fichter [Sat, 8 Sep 2018 13:01:43 +0000]
No initiative bonus for extinction variants

STC giveaway
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1451 W: 646 L: 539 D: 266
http://35.161.250.236:6543/tests/view/5b8bfc716e23db0fbab0dd3a

STC extinction
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 2590 W: 1273 L: 1140 D: 177
http://35.161.250.236:6543/tests/view/5b93c8af6e23db0fbab0dd66

7 years agoBonus for pieces in hand
ianfab [Sat, 25 Aug 2018 17:32:26 +0000]
Bonus for pieces in hand

STC crazyhouse
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 5728 W: 2892 L: 2709 D: 127
http://35.161.250.236:6543/tests/view/5b8192f96e23db0fbab0dcd9

7 years agoSupport connect4
Fabian Fichter [Mon, 10 Sep 2018 20:54:18 +0000]
Support connect4

bench: 4832716

7 years agoSkip king safety evaluation if checking is illegal
Fabian Fichter [Sun, 2 Sep 2018 15:10:00 +0000]
Skip king safety evaluation if checking is illegal

STC racingkings
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 120 W: 106 L: 10 D: 4
http://35.161.250.236:6543/tests/view/5b8bfdd66e23db0fbab0dd3f

7 years agoIncrease king danger for drop variants
Fabian Fichter [Sat, 1 Sep 2018 09:24:37 +0000]
Increase king danger for drop variants

STC crazyhouse
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 1516 W: 805 L: 682 D: 29
http://35.161.250.236:6543/tests/view/5b8a5c6f6e23db0fbab0dd11

7 years agoTweak LMR pruning for mandatory captures
Fabian Fichter [Sat, 1 Sep 2018 09:21:05 +0000]
Tweak LMR pruning for mandatory captures

STC giveaway
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 799 W: 359 L: 264 D: 176
http://35.161.250.236:6543/tests/view/5b8a5c376e23db0fbab0dd0d

7 years agoTweak piece values for variants without checks
Fabian Fichter [Sat, 1 Sep 2018 09:25:45 +0000]
Tweak piece values for variants without checks

STC racingkings
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 349 W: 211 L: 111 D: 27
http://35.161.250.236:6543/tests/view/5b8a5c926e23db0fbab0dd13

7 years agoIncrease close enemies penalty
ianfab [Sat, 25 Aug 2018 17:37:58 +0000]
Increase close enemies penalty

For drop and nCheck variants, increase close enemies penalty.

STC 3check
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1504 W: 762 L: 644 D: 98
http://35.161.250.236:6543/tests/view/5b8194426e23db0fbab0dce0

STC crazyhouse
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3254 W: 1665 L: 1518 D: 71
http://35.161.250.236:6543/tests/view/5b81942c6e23db0fbab0dcdd

7 years agoIncrease mobility bonus
ianfab [Sat, 25 Aug 2018 17:42:43 +0000]
Increase mobility bonus

Double mobility bonus for drop and antichess variants.

STC giveaway
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 1946 W: 816 L: 705 D: 425
http://35.161.250.236:6543/tests/view/5b81957f6e23db0fbab0dce8

STC crazyhouse
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 3138 W: 1617 L: 1471 D: 50
http://35.161.250.236:6543/tests/view/5b8195546e23db0fbab0dce2

7 years agoSymmetrize evaluation for smaller board sizes
Fabian Fichter [Sun, 2 Sep 2018 13:10:24 +0000]
Symmetrize evaluation for smaller board sizes

Piece-square tables remain asymmetrical.

7 years agoTweak tempo value for drop variants
Fabian Fichter [Sat, 1 Sep 2018 09:26:59 +0000]
Tweak tempo value for drop variants

STC crazyhouse
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 773 W: 436 L: 324 D: 13
http://35.161.250.236:6543/tests/view/5b8a5cb16e23db0fbab0dd15

7 years agoSpeed up attackers_to
Fabian Fichter [Tue, 28 Aug 2018 18:19:27 +0000]
Speed up attackers_to

Loop only over relevant piece types for a speed-up with no functional change.

7 years agoConsider pieces in hand in king danger
ianfab [Sat, 25 Aug 2018 17:27:42 +0000]
Consider pieces in hand in king danger

STC crazyhouse
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 583 W: 340 L: 231 D: 12
http://35.161.250.236:6543/tests/view/5b8191f06e23db0fbab0dcd6

7 years agoRemove lazy evaluation
ianfab [Thu, 23 Aug 2018 20:26:20 +0000]
Remove lazy evaluation

STC racing kings
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 160 W: 117 L: 26 D: 17
http://35.161.250.236:6543/tests/view/5b7f9fca6e23db0fbab0dcc3

STC crazyhouse
ELO: 17.91 +-15.1 (95%) LOS: 99.0%
Total: 2000 W: 1037 L: 934 D: 29
http://35.161.250.236:6543/tests/view/5b7f18a36e23db0fbab0dcb9

STC chess
ELO: -2.61 +-10.0 (95%) LOS: 30.5%
Total: 2000 W: 426 L: 441 D: 1133
http://35.161.250.236:6543/tests/view/5b805f6b6e23db0fbab0dcca

bench: 5056893

7 years agoTweak probcut margin for nCheck chess
Fabian Fichter [Mon, 27 Aug 2018 18:51:33 +0000]
Tweak probcut margin for nCheck chess

STC 3check
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 5912 W: 2839 L: 2658 D: 415
http://35.161.250.236:6543/tests/view/5b71df4f6e23db0fbab0dca6

7 years agoMore robust shogi move parsing
ianfab [Wed, 22 Aug 2018 19:58:45 +0000]
More robust shogi move parsing

Allow optional equals sign at end of move string.

7 years agoUpdate readme with new variants
Fabian Fichter [Fri, 17 Aug 2018 20:34:05 +0000]
Update readme with new variants

7 years agoSupport codrus chess
ianfab [Fri, 17 Aug 2018 19:24:03 +0000]
Support codrus chess

Variant of antichess with forced captures; losing the king wins.

http://www.chessvariants.com/diffobjective.dir/giveaway.html
http://www.binnewirtz.com/Schlagschach1.htm

7 years agoSupport breakthrough
ianfab [Fri, 17 Aug 2018 18:31:23 +0000]
Support breakthrough

https://en.wikipedia.org/wiki/Breakthrough_(board_game)

bench: 5016237

7 years agoInsert missing value for clobber pieces
ianfab [Fri, 17 Aug 2018 18:06:40 +0000]
Insert missing value for clobber pieces

7 years agoSupport clobber
ianfab [Thu, 16 Aug 2018 20:55:26 +0000]
Support clobber

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

bench: 4737198

7 years agoSupport horde chess
ianfab [Tue, 14 Aug 2018 20:31:48 +0000]
Support horde chess

- Add horde chess.
- Increase piece list size.
- Add configuration option for pawn double steps from first rank.

No functional change for existing variants.

7 years agoTweak probcut margin for extinction variants
ianfab [Mon, 13 Aug 2018 19:41:05 +0000]
Tweak probcut margin for extinction variants

extinction STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 411 W: 238 L: 138 D: 35
http://35.161.250.236:6543/tests/view/5b71df356e23db0fbab0dca3

7 years agoTweak bonus for racing kings
ianfab [Mon, 13 Aug 2018 19:28:44 +0000]
Tweak bonus for racing kings

racing kings STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 469 W: 262 L: 162 D: 45
http://35.161.250.236:6543/tests/view/5b71dcbb6e23db0fbab0dca0

7 years agoFix #5: Set attack bitboards for all piece types
ianfab [Sun, 12 Aug 2018 09:49:53 +0000]
Fix #5: Set attack bitboards for all piece types

This fixes issues with uninitialized attack tables.
Bench results are deterministic now also for variants
that are missing some of the standard chess piece types.

No functional change for standard chess.

7 years agoReference wiki in readme
Fabian Fichter [Sun, 12 Aug 2018 08:44:59 +0000]
Reference wiki in readme

7 years agoUse negative piece values for antichess-like variants
ianfab [Fri, 10 Aug 2018 22:32:14 +0000]
Use negative piece values for antichess-like variants

giveaway STC
LLR: 7.17 (-2.94,2.94) [0.00,10.00]
Total: 234 W: 231 L: 2 D: 1
http://35.161.250.236:6543/tests/view/5b6e12d56e23db0fbab0dc73

losers STC
LLR: 0.00 (-2.94,2.94) [0.00,10.00]
Total: 1342 W: 1071 L: 271 D: 0
http://35.161.250.236:6543/tests/view/5b6e12f06e23db0fbab0dc76

7 years agoThreat evaluation for variants with mandatory captures
ianfab [Thu, 9 Aug 2018 20:14:38 +0000]
Threat evaluation for variants with mandatory captures

giveaway STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 704 W: 401 L: 290 D: 13
http://35.161.250.236:6543/tests/view/5b6ca2256e23db0fbab0dc69

losers STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 288 W: 187 L: 86 D: 15
http://35.161.250.236:6543/tests/view/5b6ca24c6e23db0fbab0dc6c

7 years agoFix Zobrist initialization for pawns in hand
ianfab [Sat, 11 Aug 2018 20:05:48 +0000]
Fix Zobrist initialization for pawns in hand

No functional change for variants without drops.

7 years agoAdd benchmark support for variants
ianfab [Sat, 11 Aug 2018 19:26:25 +0000]
Add benchmark support for variants

Use e.g. "bench crazyhouse" to run bench test for variants.

7 years agoAdd support for USI protocol
ianfab [Sat, 11 Aug 2018 13:36:00 +0000]
Add support for USI protocol

Specification: http://hgm.nubati.net/usi.html

- Switch protocol when receiving uci/usi command,
  or when option "Protocol" is changed.
- Support parsing of SFEN, but internally use FEN.
- Use shogi coordinates (e.g., 3e3d) for all moves,
  and notation with "*" for piece drops.
- Specify mate distance in ply instead of fullmoves.
- Todo: Adapt option names to be compliant with USI
  - No whitespaces.
  - Standard options should be prefixed by "USI_".

7 years agoPrettify debug output for non-standard board sizes
ianfab [Sat, 11 Aug 2018 13:54:48 +0000]
Prettify debug output for non-standard board sizes

7 years agoUpdate name and author
ianfab [Wed, 8 Aug 2018 20:37:31 +0000]
Update name and author

7 years agoExtend mandatory captures that are only moves
ianfab [Tue, 7 Aug 2018 21:32:13 +0000]
Extend mandatory captures that are only moves

STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 485 W: 290 L: 183 D: 12

LTC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 890 W: 483 L: 371 D: 36

7 years agoSkip problematic travis mac builds
Fabian Fichter [Tue, 31 Jul 2018 12:33:35 +0000]
Skip problematic travis mac builds

7 years agoEnable CI for all branches
ianfab [Wed, 1 Aug 2018 18:42:10 +0000]
Enable CI for all branches

7 years agoDivide piece score by 2 for drop variants
ianfab [Thu, 26 Jul 2018 20:22:44 +0000]
Divide piece score by 2 for drop variants

STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 302 W: 202 L: 96 D: 4

LTC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 262 W: 182 L: 77 D: 3

7 years agoTweak SEE for nCheck and extinction variants
ianfab [Sat, 28 Jul 2018 15:22:39 +0000]
Tweak SEE for nCheck and extinction variants

3check STC
LLR: 2.96 (-2.94,2.94) [0.00,10.00]
Total: 131 W: 115 L: 14 D: 2

extinction STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 92 W: 90 L: 1 D: 1

7 years agoIncrease king danger for drop games and nCheck
ianfab [Sat, 28 Jul 2018 14:53:18 +0000]
Increase king danger for drop games and nCheck

3check STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 229 W: 162 L: 60 D: 7

crazyhouse STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 722 W: 404 L: 294 D: 24

7 years agoSkip early pruning in case of mandatory captures
ianfab [Sat, 28 Jul 2018 13:51:02 +0000]
Skip early pruning in case of mandatory captures

giveaway STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 86 W: 83 L: 1 D: 2

losers STC
LLR: 2.98 (-2.94,2.94) [0.00,10.00]
Total: 96 W: 89 L: 3 D: 4

7 years agoFix king piece-square table
ianfab [Sat, 28 Jul 2018 11:24:02 +0000]
Fix king piece-square table

chess STC
LLR: 2.97 (-2.94,2.94) [0.00,10.00]
Total: 984 W: 284 L: 205 D: 495

bench: 4515065

7 years agoFix Analysis Contempt combo option
Niklas Fiekas [Wed, 25 Jul 2018 07:51:10 +0000]
Fix Analysis Contempt combo option

7 years agoFix signature verification script
Fabian Fichter [Wed, 25 Jul 2018 14:20:41 +0000]
Fix signature verification script

7 years agoFix relative_rank for maximum rank != 2^n
ianfab [Tue, 24 Jul 2018 20:27:05 +0000]
Fix relative_rank for maximum rank != 2^n

No functional change for 8x8 boards.

7 years agoAdd support for Judkins Shogi
ianfab [Tue, 24 Jul 2018 20:20:52 +0000]
Add support for Judkins Shogi

7 years agoAdd shogi variants to readme
Fabian Fichter [Sun, 22 Jul 2018 15:50:12 +0000]
Add shogi variants to readme

7 years agoSupport FEN notation for promoted shogi pieces
ianfab [Sun, 22 Jul 2018 15:42:12 +0000]
Support FEN notation for promoted shogi pieces

Parse and generate FENs with promoted pieces using the '+'-Notation,
e.g. '+r' for a promoted rook.

7 years agoPerformance improvement for small board sizes
ianfab [Sun, 22 Jul 2018 11:22:55 +0000]
Performance improvement for small board sizes

Filter out illegal moves early.

No functional change.

7 years agoFix move validation for minishogi
ianfab [Sun, 22 Jul 2018 11:12:49 +0000]
Fix move validation for minishogi

Invalidate drops and normal moves that result in a piece having no legal move.
Perft looks good now for euroshogi and minishogi, so add them to tests.

7 years agoExtend perft tests
ianfab [Sat, 21 Jul 2018 19:35:09 +0000]
Extend perft tests

7 years agoAdd perft tests for variants
ianfab [Sat, 21 Jul 2018 19:14:58 +0000]
Add perft tests for variants

No functional change.

7 years agoPartial support for shogi variants
ianfab [Sat, 21 Jul 2018 15:25:57 +0000]
Partial support for shogi variants

Support minishogi and euroshogi with the limitation that the position
must be sent via "position startpos moves ..." and not using an FEN.

Limitations:
- FENs with promoted pieces do not work.
- Mates by pawn drops are not recognized to be losing.

bench: 4604661

7 years agoUpdate variant list in readme
Fabian Fichter [Tue, 17 Jul 2018 17:12:04 +0000]
Update variant list in readme

7 years agoUse endgame evaluation only for moderate variants
ianfab [Sun, 15 Jul 2018 10:20:42 +0000]
Use endgame evaluation only for moderate variants

Endgame evaluation functions and scaling factors are no longer applied
to games where they are not applicable, e.g., crazyhouse, giveaway, etc.

No functional change for standard chess.

7 years agoSupport giveaway, antichess, extinction, and kinglet chess
ianfab [Sat, 14 Jul 2018 17:33:36 +0000]
Support giveaway, antichess, extinction, and kinglet chess

Includes implementation of
- positions without kings
- castling with non-king piece
- winning condition "extinction"
- piece type commoner

bench: 4948195

7 years agoUpdate variant list in readme
Fabian Fichter [Sun, 8 Jul 2018 15:47:10 +0000]
Update variant list in readme

7 years agoSupport chessgi and pocketknight
ianfab [Sun, 8 Jul 2018 15:35:39 +0000]
Support chessgi and pocketknight

7 years agoFix appveyor build
ianfab [Sun, 8 Jul 2018 07:51:02 +0000]
Fix appveyor build

Explicitly include <functional> for std::greater.

7 years agoSupport shatar (incomplete), chigorin, and almost chess
ianfab [Sat, 7 Jul 2018 15:22:35 +0000]
Support shatar (incomplete), chigorin, and almost chess

bench: 4636838

7 years agoUse a general mobility bonus formula for fairy pieces
ianfab [Sat, 7 Jul 2018 14:19:28 +0000]
Use a general mobility bonus formula for fairy pieces

No functional change for standard chess.

7 years agoFix #3: Filter out double steps when disabled
ianfab [Thu, 5 Jul 2018 19:29:40 +0000]
Fix #3: Filter out double steps when disabled

Fixes pseudo-legal move validation for variants without double steps.

7 years agoMinishogi WIP
ianfab [Tue, 3 Jul 2018 20:50:54 +0000]
Minishogi WIP

7 years agoMinor readme changes
Fabian Fichter [Tue, 3 Jul 2018 16:11:25 +0000]
Minor readme changes

7 years agoAdd links to readme
Fabian Fichter [Tue, 3 Jul 2018 16:04:01 +0000]
Add links to readme

7 years agoFix tablebase initialization (#2)
ianfab [Mon, 2 Jul 2018 21:53:31 +0000]
Fix tablebase initialization (#2)

7 years agoIncrease timeout for Travis perft test (#2)
ianfab [Mon, 2 Jul 2018 21:23:32 +0000]
Increase timeout for Travis perft test (#2)

7 years agoUpdate appveyor link
ianfab [Mon, 2 Jul 2018 20:26:53 +0000]
Update appveyor link

7 years agoEnable Travis CI
ianfab [Mon, 2 Jul 2018 20:08:35 +0000]
Enable Travis CI

bench: 4847945

7 years agoScale passed pawn evaluation by promotion piece value
ianfab [Tue, 26 Jun 2018 20:45:23 +0000]
Scale passed pawn evaluation by promotion piece value

No functional change for standard chess.

Shatranj STC
LLR: 2.95 (-2.94,2.94) [0.00,10.00]
Total: 82 W: 63 L: 1 D: 18

7 years agoAdd support for smaller board sizes, implement los alamos chess
ianfab [Sun, 1 Jul 2018 14:01:24 +0000]
Add support for smaller board sizes, implement los alamos chess

However, the evaluation does not reflect the dependence of symmetry
on number of ranks and files yet.

7 years agoEuroShogi WIP
ianfab [Sun, 1 Jul 2018 12:39:44 +0000]
EuroShogi WIP

Promotion rules, pawn drop restrictions, and perpetuals not implemented yet.

7 years agoFix king of the hill and racing kings
ianfab [Wed, 27 Jun 2018 20:37:20 +0000]
Fix king of the hill and racing kings

Furthermore introduce some basic variant-specific bonuses.

7 years agoAdd variants to readme
Fabian Fichter [Mon, 25 Jun 2018 22:22:27 +0000]
Add variants to readme

7 years agoSupport crazyhouse and loop chess
ianfab [Mon, 25 Jun 2018 21:26:05 +0000]
Support crazyhouse and loop chess

7 years agoAdd brief description to readme
Fabian Fichter [Mon, 25 Jun 2018 15:43:13 +0000]
Add brief description to readme

7 years agoSupport 3check/5check/nCheck ; initial development for crazyhouse
ianfab [Sun, 24 Jun 2018 19:18:39 +0000]
Support 3check/5check/nCheck ; initial development for crazyhouse

7 years agoSupport king of the hill, racing kings, and losers chess
ianfab [Sun, 24 Jun 2018 15:06:49 +0000]
Support king of the hill, racing kings, and losers chess

Add options for bare king rule, checkmate/stalemate value,
king target squares, mandatory captures, and prohibited checks to
support king of the hill, racing kings, and losers, and to complete the
implementation of shatranj.

7 years agoReduce limit to 32 piece types
ianfab [Sat, 23 Jun 2018 23:22:12 +0000]
Reduce limit to 32 piece types

7 years agoInitial development for fairy chess variants
ianfab [Fri, 22 Jun 2018 19:16:16 +0000]
Initial development for fairy chess variants

Generalize code to be able to easily configure new variants
with different pieces and rules. Add a few initial variants:
- Chess
- Makruk
- ASEAN
- Ai-Wok
- Shatranj
- Amazon
- Hoppel-Poppel

7 years agoRemove lmrDepth restriction on quiet see pruning
DU-jdto [Wed, 13 Jun 2018 05:22:52 +0000]
Remove lmrDepth restriction on quiet see pruning

And tweak the threshold value. With this threshold and the current piece
values, this permits see pruning on quiets to be done up to an lmrDepth
of 9 (beyond that the threshold is below -QueenValueMg and see_ge will
pass unconditionally).

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 110316 W: 24612 L: 24667 D: 61037
http://tests.stockfishchess.org/tests/view/5b20aa760ebc5902ab9c9c1d

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 17352 W: 2968 L: 2842 D: 11542
http://tests.stockfishchess.org/tests/view/5b20cf1e0ebc5902ab9c9fb6

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

Bench: 5069074

7 years agoRemove depth condition for pruning captures.
Joost VandeVondele [Tue, 12 Jun 2018 05:32:21 +0000]
Remove depth condition for pruning captures.

The SEE condition alone is sufficient.

passed STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 109863 W: 24339 L: 24392 D: 61132
http://tests.stockfishchess.org/tests/view/5b1f5b000ebc5902ab9c8668

passed LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 23390 W: 4020 L: 3903 D: 15467
http://tests.stockfishchess.org/tests/view/5b1f94b40ebc5902ab9c8b5e

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

Bench: 4834747

7 years agoOptimize an expression in endgame.cpp
protonspring [Mon, 11 Jun 2018 08:17:03 +0000]
Optimize an expression in endgame.cpp

I believe using foward_file_bb() here is fewer instructions.

a) Fewer instructions and probably more clear (debatable).
b) Possible that a lookup is slower than a few local operations, but the
   forward_file_bb table is probably used often enough that it is always
   cached.

Passed
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21004 W: 4263 L: 4141 D: 12600
http://tests.stockfishchess.org/tests/view/5b1cad830ebc5902ab9c6239

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

No functional change.

7 years agoSimplify capture pruning margin formula
candirufish [Sun, 10 Jun 2018 08:53:05 +0000]
Simplify capture pruning margin formula

Using just `PawnValueEg * depth` as Capture Prune Margin. There was a bunch
of patches that passed recently regarding captures, maybe this part of the
master code redundant? The patch was tested as a simplification:

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 20833 W: 4218 L: 4096 D: 12519
http://tests.stockfishchess.org/tests/view/5b1cf2100ebc5902ab9c6651

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 27050 W: 3975 L: 3864 D: 19211
http://tests.stockfishchess.org/tests/view/5b1cfdc80ebc5902ab9c6776

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

Bench: 4980482

7 years agoOptimize contempt value (21)
Stefan Geschwentner [Mon, 11 Jun 2018 06:39:55 +0000]
Optimize contempt value (21)

After several tests it seems best to increase contempt from 12 to 21. This does
not regress against contempt=0 and gives a gain of around 7-8 elo against SF 7
in comparison to current default contempt.

STC: Test for non-regression contempt=21 against contempt=0
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 71250 W: 13956 L: 13926 D: 43368
http://tests.stockfishchess.org/tests/view/5b19a58d0ebc5902ab9c3bfa

STC: Test contempt 21 against SF 7
ELO: 190.06 +-2.8 (95%) LOS: 100.0%
Total: 40000 W: 22608 L: 2676 D: 14716
http://tests.stockfishchess.org/tests/view/5b19a6520ebc5902ab9c3c0e

STC: Test master against SF 7 for comparison
ELO: 182.95 +-2.7 (95%) LOS: 100.0%
Total: 40000 W: 21905 L: 2595 D: 15500
http://tests.stockfishchess.org/tests/view/5b16f5bc0ebc59214346d5ca

LTC: Test for non-regression contempt=21 against contempt=0
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 47666 W: 6914 L: 6832 D: 33920
http://tests.stockfishchess.org/tests/view/5b1a170b0ebc5902ab9c3fde

LTC: Test contempt 21 against SF 7
ELO: 203.92 +-2.6 (95%) LOS: 100.0%
Total: 40000 W: 22447 L: 1340 D: 16213
http://tests.stockfishchess.org/tests/view/5b1a174b0ebc5902ab9c3fe1

LTC: Test master against SF 7 for comparison
ELO: 196.08 +-2.6 (95%) LOS: 100.0%
Total: 40000 W: 21639 L: 1191 D: 17170
http://tests.stockfishchess.org/tests/view/5b1a17e40ebc5902ab9c3fe4

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

Bench: 4786912

7 years agoRemove failedLow from the mainThread struct
Joost VandeVondele [Mon, 11 Jun 2018 07:46:05 +0000]
Remove failedLow from the mainThread struct

failedLow is in fact a local variable in Thread::search().

Also clean some spaces and tabs in code.

No functional change.

7 years agoQuiet move soft fail high bonus
candirufish [Wed, 6 Jun 2018 08:13:08 +0000]
Quiet move soft fail high bonus

Extra bonus for quiet move creating a huge soft fail high (triggered
in 21% of quiet bestmoves on a normal bench run). Pb00067 original idea
using PawnValueMg.

Passed STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 138207 W: 28060 L: 27295 D: 82852
http://tests.stockfishchess.org/tests/view/5b14471b0ebc5902a81689c1

Passe LTC:
LLR: 2.94 (-2.94,2.94) [0.00,5.00]
Total: 157289 W: 23200 L: 22518 D: 111571
http://tests.stockfishchess.org/tests/view/5b149dde0ebc5902a8b41c5a

bench: 4441320

7 years agoSimplify capture bonus
VoyagerOne [Wed, 6 Jun 2018 00:43:33 +0000]
Simplify capture bonus

Simplify capture bonus by simply adding ONE_DEPTH instead of being
dependent on BestValue.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 24419 W: 4939 L: 4824 D: 14656
http://tests.stockfishchess.org/tests/view/5b16b2040ebc5963ba37e2a5

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 44560 W: 6524 L: 6438 D: 31598
http://tests.stockfishchess.org/tests/view/5b16ccc00ebc59214346d403

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

Bench: 4782637

7 years agoCall cycle detection before qsearch()
Stéphane Nicolet [Tue, 5 Jun 2018 08:54:51 +0000]
Call cycle detection before qsearch()

This has the property of raising alpha before calling qsearch(), thus
maybe giving some more cuts during qsearch(). The patch is equivalent
to the use of cycle detection inside qsearch() at depth 0, but is in
fact implemented by re-ordering code inside search(), which explains
the [0..4] bounds in the following tests.

STC (interrupted after 124250 games, with LLR=0.87):
http://tests.stockfishchess.org/tests/view/5b1500bd0ebc5902a8b420bf
LLR: 0.87 (-2.94,2.94) [0.00,4.00]
Total: 124250 W: 24973 L: 24470 D: 74807

LTC:
http://tests.stockfishchess.org/tests/view/5b1590eb0ebc5902a84dcd09
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 74234 W: 11098 L: 10733 D: 52403

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

Bench: 4326784

7 years agoStabilize AppVeyor CI
Joost VandeVondele [Tue, 5 Jun 2018 16:05:58 +0000]
Stabilize AppVeyor CI

After a helpful suggestion from AppVeyor support staff, moving the Stockfish
execution from ps to cmd seems to work. Alternative to PR #1624 tested in PR #1637.

No functional change.

7 years agoRemove a superfluous subtrahend
Guenther Demetz [Mon, 4 Jun 2018 07:10:30 +0000]
Remove a superfluous subtrahend

The '- 1' subtrahend was introduced for guarding against null move
search at root, which would be nonsense. But this is actually already
guaranteed by the !PvNode condition. This followed from the discussion
in pull request 1609: https://github.com/official-stockfish/Stockfish/pull/1609

No functional change

7 years agoSimplify LMR for captures
VoyagerOne [Sun, 3 Jun 2018 20:46:18 +0000]
Simplify LMR for captures

Simplify LMR for captures by removing capture's stat score logic for reduction.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 37068 W: 7462 L: 7370 D: 22236
http://tests.stockfishchess.org/tests/view/5b115bc30ebc591af58a6fd2

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 80061 W: 11706 L: 11671 D: 56684
http://tests.stockfishchess.org/tests/view/5b117f590ebc59033d2d5315

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

Bench: 4470519

7 years agoBugfix of Position::has_repeated()
joergoster [Fri, 1 Jun 2018 20:35:23 +0000]
Bugfix of Position::has_repeated()

The function Position::has_repeated() is used by Tablebases::root_probe()
to determine whether we can rank all winning moves with the same value, or
if we need to strictly rank by dtz in case the position has already been
repeated once, and we are risking to run into the 50-move rule and thus
losing the win (especially critical in some very complicated endgames).

To check whether the current position or one of the previous positions
after the last zeroing move has already been occured once, we start looking
for a repetition of the current position, and if that is not the case, we
step one position back and repeat the check for that position, and so on.

If you now look at how this was done before the new root ranking patch was
merged two months ago, it seems quite obvious that it is a simple oversight:
https://github.com/official-stockfish/Stockfish/commit/108f0da4d7f993732aa2e854b8f3fa8ca6d3b46c

More specifically, after we stepped one position back with

```
stc = stc->previous;
```

we now have to start checking for a repetition with

```
StateInfo* stp = stc->previous->previous;
```

and not with

```
StateInfo* stp = st->previous->previous;
```

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

No functional change

7 years agoFix overload ambiguity
Stéphane Nicolet [Sun, 3 Jun 2018 07:18:18 +0000]
Fix overload ambiguity

Fix an error when compiling current master with MSVC due to the
ambiguity of which operator* overload was intended (reported by
Jarrod Torriero).

No functional change.

7 years agoExtra bonus for capture creating a huge fail high
pb00068 [Sat, 2 Jun 2018 16:01:11 +0000]
Extra bonus for capture creating a huge fail high

STC:
http://tests.stockfishchess.org/tests/view/5b114f3d0ebc596e9e0881f6
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 13007 W: 2730 L: 2541 D: 7736

LTC:
http://tests.stockfishchess.org/tests/view/5b1176740ebc59033d2d52c6
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 15594 W: 2417 L: 2239 D: 10938

See https://github.com/official-stockfish/Stockfish/pull/1627

Bench: 4790240

7 years agoFix comments, rename variables
Stéphane Nicolet [Sat, 2 Jun 2018 15:41:37 +0000]
Fix comments, rename variables

Thanks everybody for the various hints in the perpetual renaming thread:
https://github.com/official-stockfish/Stockfish/issues/1426

No functional change

7 years agoReallocate TT on threadpool resize.
Joost VandeVondele [Sat, 2 Jun 2018 15:02:23 +0000]
Reallocate TT on threadpool resize.

Makes sure the potential benefit of first touch does not depend on
the order of the UCI commands Threads and Hash, by reallocating the
hash if a Threads is issued. The cost is zeroing the TT once more
than needed. In case the prefered order (first Threads than Hash)
is employed, this amounts to zeroing the default sized TT (16Mb),
which is essentially instantaneous.

Follow up for https://github.com/official-stockfish/Stockfish/pull/1601
where additional data and discussion is available.

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

No functional change.

7 years agoSimplify depth reduction in IID.
Joost VandeVondele [Thu, 24 May 2018 11:31:40 +0000]
Simplify depth reduction in IID.

Use a constant reduction instead of a depth dependent reduction.

passed STC:
http://tests.stockfishchess.org/tests/view/5b06eb600ebc5914abc12ba8
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 58086 W: 11710 L: 11657 D: 34719

passed LTC:
http://tests.stockfishchess.org/tests/view/5b07b25e0ebc5914abc12c6d
LLR: 3.09 (-2.94,2.94) [-3.00,1.00]
Total: 110414 W: 16217 L: 16219 D: 77978

Bench: 4521056