1
0
Fork 0
Commit Graph

33 Commits (eb6d7f537d214c4dc8bde7d4fdc2aaead47dd3c3)

Author SHA1 Message Date
Marco Costalba eb6d7f537d
Assorted trivial cleanups (#1894)
To address https://github.com/official-stockfish/Stockfish/issues/1862

No functional change.
2019-01-01 14:10:26 +01:00
SFisGOD 31ac538f96 A combo of parameter tweaks
Joint work by SFisGOD, xoroshiro and Chess13234.

This combo consists of the following tweaks:
Assorted bonuses and penalties by SFisGOD
Bishop and Rook PSQT by SFisGOD
Tempo Value by xoroshiro
Futility pruning by Chess13234

STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 9005 W: 2082 L: 1882 D: 5041
http://tests.stockfishchess.org/tests/view/5c11628c0ebc5902ba119e90

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 44207 W: 7451 L: 7157 D: 29599
http://tests.stockfishchess.org/tests/view/5c1172a40ebc5902ba119fa3

Bench: 3332460
2018-12-13 13:35:35 +01:00
Kurt 883367d217 Asymmetrical 8x8 Pawn PSQT
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 13323 W: 3015 L: 2818 D: 7490
http://tests.stockfishchess.org/tests/view/5c00a2520ebc5902bcedd41b

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 52294 W: 9093 L: 8756 D:34445
http://tests.stockfishchess.org/tests/view/5c00b2c40ebc5902bcedd596

Some obvious followups to this are to further tune this PSQT, or
try 8x8 for other pieces. As of now I don't plan on trying this
for other pieces as I think the majority of the ELO it brings is
for pawns and kings.

Looking at the new values, the differences between kingside and
queenside are quite significant. I am very hopeful that this a
llows SF to understand and plan pawn structures even better than
it already does. Cheers!

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

Bench: 3569243
2018-12-13 13:20:31 +01:00
Stéphane Nicolet cf5d683408 Stockfish 10-beta
Preparation commit for the upcoming Stockfish 10 version, giving a chance to catch last minute feature bugs and evaluation regression during the one-week code freeze period. Also changing the copyright dates to include 2019.

No functional change
2018-11-19 11:18:21 +01:00
SFisGOD 3f2ec5b3d5 Tweak Queen PSQT based on tuned values
STC: (Yellow)
LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 63140 W: 13433 L: 13353 D: 36354
http://tests.stockfishchess.org/tests/view/5bed42c90ebc595e0ae37cf5

LTC: (Green)
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 47714 W: 7785 L: 7485 D: 32444
http://tests.stockfishchess.org/tests/view/5bec3b8c0ebc595e0ae36dec

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

Bench: 3717396
2018-11-19 10:50:55 +01:00
SFisGOD 8a9c298dee Rook PSQT Tuned
Failed STC (Yellow )
LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 56302 W: 12007 L: 11953 D: 32342
http://tests.stockfishchess.org/tests/view/5be69d210ebc595e0ae3185b

Passed 1st LTC (Green)
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 8745 W: 1480 L: 1301 D: 5964
http://tests.stockfishchess.org/tests/view/5be682960ebc595e0ae31818

Failed 2nd LTC (Red)
LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 19398 W: 3040 L: 3133 D: 13225
http://tests.stockfishchess.org/tests/view/5be69b840ebc595e0ae31856

Passed 3rd LTC (Green)
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 107516 W: 17342 L: 16858 D: 73316
http://tests.stockfishchess.org/tests/view/5bea879a0ebc595e0ae34d80

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

How to continue from there?

The values in the rook table now look a bit strange for a human eye
and are hard to explain, maybe it would be nice to simplify them
by hand and see if we can pass another (clean) double green with a
more regular array.

Bench: 3188070
2018-11-19 10:02:31 +01:00
Stéphane Nicolet 8bb7a73708 Rook tweaks in evaluation
Some small changes in evaluation to try to convince Stockfish to centralize
her rooks more in middle game and avoid trapping them in the corners. Joint
work by SFisGOD and snicolet.

STC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 99826 W: 21895 L: 21341 D: 56590
http://tests.stockfishchess.org/tests/view/5bdc3e280ebc595e0ae277df

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 21467 W: 3541 L: 3322 D: 14604
http://tests.stockfishchess.org/tests/view/5bdc9ff30ebc595e0ae28119

Bench: 3631608
2018-11-02 22:08:26 +01:00
Vizvezdenec 7a61368971 Tweak of knight PSQT and mobility bonuses
STC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 16906 W: 3745 L: 3516 D: 9645
http://tests.stockfishchess.org/tests/view/5bd306a40ebc595e0ae1e144

LTC
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 62779 W: 10249 L: 9901 D: 42629
http://tests.stockfishchess.org/tests/view/5bd3188f0ebc595e0ae1e296

Bench 3166402
2018-10-27 09:23:11 +02:00
Rocky640 49b1591505 Pawn PSQT Tuned
Tested against master "Tweak opposite color bishops endgame scaling"
using values from a 100K SPSA with ck=10

Passed STC
http://tests.stockfishchess.org/tests/view/5ba7fe7a0ebc592cf276b971
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 27717 W: 6052 L: 5782 D: 15883

Passed LTC
http://tests.stockfishchess.org/tests/view/5ba815790ebc592cf276bb6b
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 17486 W: 2919 L: 2712 D: 11855

bench: 4441247
2018-09-27 20:58:40 +02:00
ElbertoOne 4bef7aa5cd Parameter tweaks in PSQT and NMP
This patch is a combinaison of two parameters tweaks patches which
have failed as strong yellows at LTC recently, by Alain Savard (Rocky640)
and Fabian Fichter (ianfab):
  http://tests.stockfishchess.org/tests/view/5b8a71e60ebc592cf2749b1d
  http://tests.stockfishchess.org/tests/view/5b81ce3b0ebc5902bdbb6585

Passed STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 57200 W: 12392 L: 12008 D: 32800
http://tests.stockfishchess.org/tests/view/5b8d0a5a0ebc592cf274c48f

And LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 37215 W: 6233 L: 5962 D: 25020
http://tests.stockfishchess.org/tests/view/5b8d56090ebc592cf274cb53

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

Bench: 4136116

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

How to continue from there?

The null move reduction formula in line 769 of search.cpp is quite convoluted
and full of mysterious magic constants at the moment, it would certainly be
nice to simplify it and/or gain more Elo from it:

```
Depth R = (  (823 + 67 * depth / ONE_PLY) / 256
           + std::min(int(eval - beta) / 200, 3)) * ONE_PLY;
```
2018-09-04 10:43:02 +02:00
Rocky640 f923dc0fe5 Long Diagonal Tweaks
a) Reduce PSQT values along the long diagonals on non-central squares
and increase the LongDiagonal bonus accordingly. The effect is to penalise
bishops on the long diagonal which can not "see" the 2 central squares.
The "good" bishops still have more or less the same bonus as current master.

b) For a bishop on a central square, because of the "| s" term in the code,
the LongDiagonalBonus was always given. So while being there, remove the "| s"
and compensate the central Bishop PSQT accordingly.

Passed STC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 44498 W: 9658 L: 9323 D: 25517
http://tests.stockfishchess.org/tests/view/5b8992770ebc592cf2748942

Passed LTC
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 63092 W: 10324 L: 9975 D: 42793
http://tests.stockfishchess.org/tests/view/5b89a17a0ebc592cf2748b59

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

bench: 4693901
2018-09-01 04:33:17 +02:00
FauziAkram c569cf263d King Psqt Tuning
After a session of tuning for King Psqt I got some new values, which was later
tweaked manually by me Fauzi, to result in an Elo-gain patch which seems to scale
pretty well:

STC: LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 100653 W: 22550 L: 22314 D: 55789 [Yellow patch]

LTC: LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 147079 W: 25584 L: 24947 D: 96548 [Green Patch]

Bench: 4669050
2018-08-08 17:49:16 +02:00
Ronald de Man 759b3c79cf Mark all compile-time constants as constexpr.
To more clearly distinguish them from "const" local variables, this patch
defines compile-time local constants as constexpr. This is consistent with
the definition of PvNode as constexpr in search() and qsearch(). It also
makes the code more robust, since the compiler will now check that those
constants are indeed compile-time constants.

We can go even one step further and define all the evaluation and search
compile-time constants as constexpr.

In generate_castling() I replaced "K" with "step", since K was incorrectly
capitalised (in the Chess960 case).

In timeman.cpp I had to make the non-local constants MaxRatio and StealRatio
constepxr, since otherwise gcc would complain when calculating TMaxRatio and
TStealRatio. (Strangely, I did not have to make Is64Bit constexpr even though
it is used in ucioption.cpp in the calculation of constexpr MaxHashMB.)

I have renamed PieceCount to pieceCount in material.h, since the values of
the array are not compile-time constants.

Some compile-time constants in tbprobe.cpp were overlooked. Sides and MaxFile
are not compile-time constants, so were renamed to sides and maxFile.

Non-functional change.
2018-03-18 23:48:16 +01:00
Stéphane Nicolet 96362fe3df Renaming some variables in code
Implements renaming suggestions by Marco Costalba, Günther Demetz,
Gontran Lemaire, Ronald de Man, Stéphane Nicolet, Alain Savard,
Joost VandeVondele, Jerry Donald Watson, Mike Whiteley, xoto10,
and I hope that I haven't forgotten anybody.

Perpetual renaming thread for suggestions:
https://github.com/official-stockfish/Stockfish/issues/1426

No functional change.
2018-03-15 10:44:26 +01:00
Joost VandeVondele 9afa1d7330 New Year 2018
Adjust copyright headers.

No functional change.
2018-01-01 13:18:10 +01:00
syzygy1 822695d4d3 Use a Direction enum for Square deltas
Currently the NORTH/WEST/SOUTH/EAST values are of type Square, but conceptually they are not squares but directions. This patch separates these values into a Direction enum and overloads addition and subtraction to allow adding a Square to a Direction (to get a new Square).

I have also slightly trimmed the possible overloadings to improve type safety. For example, it would normally not make sense to add a Color to a Color or a Piece to a Piece, or to multiply or divide them by an integer. It would also normally not make sense to add a Square to a Square.

This is a non-functional change.
2017-12-04 17:52:31 +01:00
mstembera 973ede008a Tuned PSQT using a custom tuner.
bench: 5878420

Closes #1177
2017-07-23 17:35:44 -07:00
FauziAkram c243cd5f4a Variable tuning
A tuning patch which cover the following changes:

increase the importance of queen and rook mobility in endgame and
decrease it in mg, since if we use the heavy pieces too early in the game
we will just make opponent develop their pieces by threatening ours.

King Psqt:
1)King will be encouraged more to stay in the first ranks in the MG
2)and will be encouraged more to go to the middle of the board/last ranks in the EG

Bishop scale better in EG
Logical changes on various psqt tables
1/6 of the changes of the last tuning session on mobility tables

STC: LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 227879 W: 41240 L: 40313 D: 146326
LTC : LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 167047 W: 21871 L: 21291 D: 123885

Bench: 5695960

Closes #1008
2017-02-19 14:00:44 -08:00
Joost VandeVondele d8f683760c Adjust copyright headers to 2017 (#965)
No functional change.
2017-01-11 08:46:29 +01:00
hxim 3728e833aa Fix psqt format and use smaller numbers in king psqt (#940)
Fix minus sign in pawn psqt and use smaller numbers in king psqt.

No functional change.
2016-12-25 10:40:17 +01:00
Stéphane Nicolet 0d33466bcd Pawn flank attacks
This patch tweaks some pawn values to favor flank attacks.

The first part of the patch increases the midgame psqt values of external pawns to launch more attacks (credits to user GuardianRM for this idea), while the second part increases the endgame connection values for pawns on upper ranks.

Passed STC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 34997 W: 6328 L: 6055 D: 22614

and LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 13844 W: 1832 L: 1650 D: 10362

Bench: 5884767
2016-12-05 18:49:07 +01:00
Stéphane Nicolet 7ae3c05795 Rename shift_bb() to shift()
Rename shift_bb() to shift(), and DELTA_S to SOUTH, etc.
to improve code readability, especially in evaluate.cpp
when they are used together:

    old b = shift_bb<DELTA_S>(pos.pieces(PAWN))
    new b = shift<SOUTH>(pos.pieces(PAWN))

While there fix some small code style issues.

No functional change.
2016-09-25 10:45:10 +02:00
syzygy ca6c9f85a5 Change from [Color][PieceType] to [Piece]
Speed up of almost 1% in both normal and
pgo builds.

No functional change.
2016-09-04 09:22:09 +02:00
Stéphane Nicolet 16c603ce9b Double pawn simplification
Try doubled pawn simplification, with psq
table compensation.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 36094 W: 6558 L: 6463 D: 23073

LTC:
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 102352 W: 13417 L: 13404 D: 75531

Bench: 8716243
2016-05-13 13:01:59 +02:00
Marco Costalba d30994ecd5 Hide global visibility when not needed
Also move PieceValue definition in psqt.cpp,
where it is initialized.

Fix a warning in popcount16() with Intel compiler

No functional change.
2016-04-09 10:42:04 +02:00
lucasart aa31f7f096 Retire CenterBind
And compensate in the PSQT.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 27714 W: 5161 L: 5052 D: 17501

LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 36354 W: 5008 L: 4909 D: 26437

Bench: 8603285

Resolves #556
2016-01-03 17:33:36 +00:00
ppigazzini d4af15f682 Update AUTHORS and copyright notice
No functional change

Resolves #555
2016-01-02 09:43:51 +00:00
Marco Costalba 9742fb10fd Update Copyright year
No functional change.

Resolves #554
2016-01-01 10:17:36 +00:00
lucasart 411e704fdf Tuned PSQT
STC:
LLR: 3.11 (-2.94,2.94) [-0.50,4.50]
Total: 58764 W: 11530 L: 11185 D: 36049

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.50]
Total: 282710 W: 46339 L: 45209 D: 191162

Bench: 8512947

Resolves #349
2015-05-18 13:54:45 -07:00
Marco Costalba ee0371f86e Cleanup work in misc.cpp
Also some code style tidy up of latest patches.

Also renamed checkSq -> checkSquares because it
is a bitboard and not a square.

No functional change.
2015-05-10 09:42:26 +02:00
lucasart 92dbee7875 Edge distance
Instead of crafting a clever formula to calculate the array offset, simply use a
3 dimensional array. Remove the comment while at it, because now the code is
self-documenting.

No functional change.

Resolves #344
2015-05-09 14:06:19 +01:00
Marco Costalba 7231b18af1 Halve PSQT row data
Use symmetry along vertical middle axis of the board
to reduce the number of parameters.

For instance psqt value of SQ_A5 == SQ_A4 and value of
SQ_F8 == SQ_F1.

This is always true, at least until now nobody came in
with an asymmetric psqt table that worked.

Original patch by Lucas.

No functional change.
2015-05-03 20:07:52 +02:00
Marco Costalba 578b21bbee Split PSQT init from Position init
Easier for tuning psq tables:

TUNE(myParameters, PSQT::init);

Also move PSQT code in a new *.cpp file, and retire the
old and hacky psqtab.h that required to be included only
once to work correctly, this is not idiomatic for a header
file.

Give wide visibility to psq tables (previously visible only
in position.cpp), this will easy the use of psq tables outside
Position, for instance in move ordering.

Finally trivial code style fixes of the latest patches.

Original patch of Lucas Braesch.

No functional change.
2015-05-03 20:07:15 +02:00