]>
git.sesse.net Git - stockfish/log
Rocky640 [Sat, 29 Apr 2017 03:36:24 +0000 (20:36 -0700)]
Remove cap in kingDanger initialization
Passed STC
http://tests.stockfishchess.org/tests/view/
58fd53be0ebc59035df33eb5
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 52048 W: 9397 L: 9329 D: 33322
Passed LTC
http://tests.stockfishchess.org/tests/view/
58ff9e0a0ebc59035df33f5c
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 35382 W: 4650 L: 4549 D: 26183
Bench:
5872717
Closes #1087
Marco Costalba [Sat, 29 Apr 2017 03:33:30 +0000 (20:33 -0700)]
Retire the misdesigned StepAttacks[] array.
StepAttacks[] is misdesigned, the color dependance is specific
to pawns, and trying to generalise to king and knights, proves
neither useful nor convinient in practice.
So this patch reformats the code with the following changes:
- Use PieceType instead of Piece in attacks_() functions
- Use PseudoAttacks for KING and KNIGHT
- Rename StepAttacks[] into PawnAttacks[]
Original patch and idea from Alain Savard.
No functional change.
Closes #1086
Joost VandeVondele [Sat, 29 Apr 2017 03:27:39 +0000 (20:27 -0700)]
Copy killers in the movepicker
ss->killers can change while the movepicker is active.
The reason ss->killers changes is related to the singular
extension search in the moves loop that calls search<>
recursively with ss instead of ss+1,
effectively using the same stack entry for caller and callee.
By making a copy of the killers,
the movepicker does the right thing nevertheless.
Tested as a bug fix
STC:
http://tests.stockfishchess.org/tests/view/
58ff130f0ebc59035df33f37
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 70845 W: 12752 L: 12716 D: 45377
LTC:
http://tests.stockfishchess.org/tests/view/
58ff48000ebc59035df33f3d
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 28368 W: 3730 L: 3619 D: 21019
Bench:
6465887
Closes #1085
snicolet [Wed, 26 Apr 2017 00:57:30 +0000 (17:57 -0700)]
Avoid misuse of StepAttacksBB for pawns
Make it explicit that first index of StepAttacksBB is a piece, not a piece type.
No functional change
Closes #1083
Joost VandeVondele [Wed, 26 Apr 2017 00:19:23 +0000 (17:19 -0700)]
Zero unused constant
No functional change
Closes #1081
Marco Costalba [Sat, 22 Apr 2017 07:03:17 +0000 (09:03 +0200)]
Assorted code style issues
I have removed the check for
pieceCount[PAWN] > FILE_NB
because totally useless.
No functional change.
Joost VandeVondele [Sun, 23 Apr 2017 15:37:55 +0000 (08:37 -0700)]
Sort moves partially: linear depth dependence
STC: http://tests.stockfishchess.org/tests/view/
58f98d260ebc59035df33d5e
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 58958 W: 10862 L: 10485 D: 37611
LTC: http://tests.stockfishchess.org/tests/view/
58fa45d40ebc59035df33d86
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 18607 W: 2427 L: 2251 D: 13929
Bench:
6065528
Closes #1079
IIvec [Sun, 23 Apr 2017 15:02:52 +0000 (08:02 -0700)]
King safety parameters improved
STC:
LLR: 2.97 (-2.94,2.94) [0.00,4.00]
Total: 58648 W: 10883 L: 10524 D: 37241
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 52546 W: 7131 L: 6844 D: 38571
Bench
6121479
Closes #1078
Joost VandeVondele [Sun, 23 Apr 2017 14:57:48 +0000 (07:57 -0700)]
Use int instead of Value for history related stats.
history related scores are not related to evaluation based scores.
For example, can easily exceed the range -VALUE_INFINITE,VALUE_INFINITE.
As such the current type is confusing, and a plain int is a better match.
tested for no regression:
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 43693 W: 7909 L: 7827 D: 27957
No functional change.
Closes #1070
Joost VandeVondele [Thu, 20 Apr 2017 18:22:24 +0000 (11:22 -0700)]
simplify logic for history based pruning
STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 34255 W: 6292 L: 6194 D: 21769
LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 89914 W: 11769 L: 11739 D: 66406
Bench:
6581936
Closes #1066
Joost VandeVondele [Thu, 20 Apr 2017 18:15:48 +0000 (11:15 -0700)]
Partial insertion sort
the order of elements returned by std::partition is implementation defined (since not stable) and could depend on the version of libstdc++ linked.
As std::stable_partition was tested to be too slow (http://tests.stockfishchess.org/tests/view/
585cdfd00ebc5903140c6082 ).
Instead combine partition with our custom implementation of insert_sort, which fixes this issue.
Implementation based on a patch by mstembera (http://tests.stockfishchess.org/tests/view/
58d4d3460ebc59035df3315c ), which suggests some benefit by itself.
Higher depth moves are all sorted (INT_MIN version), as in current master.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 33116 W: 6161 L: 6061 D: 20894
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 88703 W: 11572 L: 11540 D: 65591
Bench:
6256522
Closes #1058
Closes #1065
Stefano Cardanobile [Mon, 17 Apr 2017 16:58:02 +0000 (18:58 +0200)]
Update Readme.md
Update number of threads.
Closes #1072
Joost VandeVondele [Sun, 16 Apr 2017 08:48:17 +0000 (10:48 +0200)]
Prefer std::find over a hand-coded loop
tested for no regression.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 37378 W: 6649 L: 6556 D: 24173
No functional change.
Closes #1071
VoyagerOne [Mon, 17 Apr 2017 16:21:16 +0000 (09:21 -0700)]
Move-Count Formula Tweak
STC:
LLR: 3.18 (-2.94,2.94) [0.00,4.00]
Total: 55004 W: 10289 L: 9930 D: 34785
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 48184 W: 6401 L: 6128 D: 35655
Bench:
5960754
Stefano80 [Mon, 17 Apr 2017 16:17:41 +0000 (09:17 -0700)]
Remove cap from space score contribution and increase bonus
STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 58462 W: 10615 L: 10558 D: 37289
LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 65061 W: 8539 L: 8477 D: 48045
It is worth noting that an attempt to only increase the bonus passed STC but failed LTC, and
an attempt to remove the cap without increasing the bonus is still running at STC, but will probably fail after more than 100k.
Bench:
6188591
Closes #1063
Stéphane Nicolet [Tue, 11 Apr 2017 17:50:24 +0000 (19:50 +0200)]
Doubled and supported pawns
Do not give the doubled pawn penalty when the frontmost pawn is
supported, for instance f2-g2-g3
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 55927 W: 10418 L: 10052 D: 35457
http://tests.stockfishchess.org/tests/view/
58eb9fc20ebc59035df33858
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 32078 W: 4257 L: 4035 D: 23786
http://tests.stockfishchess.org/tests/view/
58ec48420ebc59035df3388b
Bench:
5995472
Closes #1062
Stefano80 [Sun, 9 Apr 2017 14:48:20 +0000 (07:48 -0700)]
Remove minimum to contribution from king danger to score.
STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 24858 W: 4559 L: 4445 D: 15854
LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 40789 W: 5338 L: 5244 D: 30207
Bench:
7027489
Closes #1059
joergoster [Sat, 8 Apr 2017 00:07:40 +0000 (17:07 -0700)]
Fix zugzwang pruning issues
By adding pos.non_pawn_material(pos.side_to_move()) as a precondition in step 13,
which is already in use in Futility Pruning (child node) and Null Move Pruning for similar reasons.
Pawn endgames, especially those with only 1 or 2 pawns, are simply heavily influenced by zugzwang situations.
Since we are using a bitbase for KPK endgames, I see no reason to accept buggy evals as shown in #760
Patch looks neutral at STC
LLR: 2.32 (-2.94,2.94) [-3.00,1.00]
Total: 79580 W: 10789 L: 10780 D: 58011
and LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 27071 W: 3502 L: 3390 D: 20179
Bench:
6259071
Closes #1051
Closes #760
VoyagerOne [Sat, 8 Apr 2017 00:02:31 +0000 (17:02 -0700)]
Standardize stat penalty
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 90631 W: 16325 L: 16323 D: 57983
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 97679 W: 12779 L: 12759 D: 72141
Bench:
6340591
Closes #1053
VoyagerOne [Mon, 3 Apr 2017 03:31:52 +0000 (20:31 -0700)]
Don't update TT at excluded move ply
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 38906 W: 7125 L: 6835 D: 24946
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 28600 W: 3752 L: 3543 D: 21305
Bench:
6861050
Closes #1048
Daniel Dugovic [Tue, 21 Mar 2017 07:32:16 +0000 (02:32 -0500)]
Add assertion for the maximum number of pawns
No functionl change
Closes #1039
Joost VandeVondele [Sun, 26 Mar 2017 00:57:07 +0000 (17:57 -0700)]
Introduce assert for stats update
Make sure updates to the stats are done in a stable way.
No functional change
Closes #1038
Closes #1037
Joost VandeVondele [Sat, 25 Mar 2017 17:34:10 +0000 (10:34 -0700)]
Increase maximum number of threads
a single Xeon Phi can present itself as a single numa node with up to 288 threads (4 threads per hardware core).
Tested to work as expected with a Xeon Phi CPU 7230 up to 256 threads.
No functional change
Closes #1045
joergoster [Sat, 25 Mar 2017 17:21:24 +0000 (10:21 -0700)]
Simplify ThreatBySafePawn scoring
Bench:
6197938
Closes #1047
VoyagerOne [Sat, 25 Mar 2017 17:10:33 +0000 (10:10 -0700)]
Singular extension and check extension tweak
If singular extension fails to trigger extension then don't consider check extension.
STC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 69428 W: 12663 L: 12271 D: 44494
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 44023 W: 5875 L: 5612 D: 32536
Bench:
6170444
Closes #1043
VoyagerOne [Sat, 18 Mar 2017 22:41:55 +0000 (15:41 -0700)]
Skip quiet moves based on moveCount pruning threshold and history stats
If we can moveCountPrune and next quiet move has negative stats,
then go directly to the next move stage (Bad_Captures).
Reduction formula is tweaked to compensate for the decrease in move count that is used in LMR.
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 6847 W: 1276 L: 1123 D: 4448
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 48687 W: 6503 L: 6226 D: 35958
Bench:
5919519
Closes #1036
Joost VandeVondele [Fri, 17 Mar 2017 21:45:27 +0000 (14:45 -0700)]
History stat bonus: Move condition to bonus calculation
about 0.5% speedup.
No functional change
Closes #1034
joergoster [Fri, 17 Mar 2017 21:41:08 +0000 (14:41 -0700)]
Pawns count imbalance table
Instead of having a continuous increasing bonus for our number of pawns when calculating imbalance, use a separate lookup array with tuned values.
Idea by GuardianRM.
STC
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16155 W: 2980 L: 2787 D: 10388
LTC
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 100478 W: 13055 L: 12615 D: 74808
Bench:
6128779
Closes #1030
Marco Costalba [Wed, 15 Mar 2017 04:00:03 +0000 (21:00 -0700)]
Assorted code style fixes
No functional change
Closes #1029
mstembera [Wed, 15 Mar 2017 03:56:26 +0000 (20:56 -0700)]
Fix pawn entry prefetch
No functional change
Closes #1026
snicolet [Thu, 9 Mar 2017 02:45:09 +0000 (18:45 -0800)]
Helper functions to count material for both sides
Syntactic sugar: helper functions to count material or pieces for both sides.
No functional change
Closes #1025
Joost VandeVondele [Thu, 9 Mar 2017 02:35:23 +0000 (18:35 -0800)]
Always have counterMoves associated
Simplifies away all associated checks, leading to a ~0.5% speedup.
The code now explicitly checks if moves are OK, rather than using nullptr checks.
Verified for no regression:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 32218 W: 5762 L: 5660 D: 20796
No functional change
Closes #1021
pb00068 [Thu, 9 Mar 2017 02:01:16 +0000 (18:01 -0800)]
Further simplify skipping of plies with threads
No functional change
Closes #1020
VoyagerOne [Mon, 6 Mar 2017 02:56:39 +0000 (18:56 -0800)]
Allow pruning advance pawn pushes if not near endgame
STC:
LLR: -2.95 (-2.94,2.94) [0.00,5.00]
Total: 101088 W: 18016 L: 17717 D: 65355
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 61194 W: 8108 L: 7791 D: 45295
Bench:
5803228
Closes #1023
snicolet [Mon, 6 Mar 2017 02:20:27 +0000 (18:20 -0800)]
Speed-up some arrays reading
This patch removes the empty rows at the beginning and at the end of
MobilityBonus[] and Protector[] arrays:
• reducing the size of MobilityBonus from 768 bytes to 512 bytes
• reducing the size of Protector from 1024 to 512 bytes
Also adds some comments and cleaner code for the arrays in pawns.cpp
No speed penalty (measured speed-up of 0.4%).
No functional change.
Closes #1018
Joost VandeVondele [Mon, 27 Feb 2017 00:41:58 +0000 (16:41 -0800)]
Simplify skipping of plies with helper threads
Replaces the HalfDensity array with an equivalent, compact implementation.
Includes suggestions by mcostalba & snicolet.
No functional change
Closes #1004
snicolet [Sun, 26 Feb 2017 01:43:54 +0000 (17:43 -0800)]
Change definition of "weak" in threats calculation
By defining "strongly protected" as "protected by a pawn, or protected
by two pieces and not attacked by two enemy pieces".
Passed STC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 17050 W: 3128 L: 2931 D: 10991
Passed LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 120995 W: 15852 L: 15343 D: 89800
Bench :
6269229
Closes #1016
mstembera [Fri, 24 Feb 2017 05:33:03 +0000 (21:33 -0800)]
Reorder members of Material::Entry
This eliminates alignment padding and reduces size from 48 to 40 bytes.
This makes the material HashTable smaller and more cache friendly.
No functional change
Closes #1013
GuardianRM [Fri, 24 Feb 2017 05:26:59 +0000 (21:26 -0800)]
Pieces protecting king
Initial protective idea by Snicolet for knight, for other pieces too
Patch add penalties and bonuses for pieces, depending on the distance from the own king
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 21192 W: 3919 L: 3704 D: 13569
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 26177 W: 3642 L: 3435 D: 19100
Bench :
6687377
Closes #1012
snicolet [Sun, 19 Feb 2017 22:25:05 +0000 (14:25 -0800)]
Keep pawns on both flanks
Positions with pawns on only one flank tend to be more drawish. We add
a term to the initiative bonus to help the attacking player keep pawns
on both flanks.
STC: yellowish run stopped after 257137 games
LLR: -0.92 (-2.94,2.94) [0.00,5.00]
Total: 257137 W: 46560 L: 45511 D: 165066
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 15602 W: 2125 L: 1956 D: 11521
Bench :
6976310
Closes #1009
FauziAkram [Sun, 19 Feb 2017 21:56:17 +0000 (13:56 -0800)]
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
VoyagerOne [Sun, 19 Feb 2017 06:48:28 +0000 (22:48 -0800)]
Razor Simplification
Remove code that restrict using tt-moves for razoring.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 67442 W: 12039 L: 11997 D: 43406
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 38541 W: 5044 L: 4947 D: 28550
Bench:
5667216
Closes #1002
torfranz [Wed, 15 Feb 2017 05:26:08 +0000 (21:26 -0800)]
Retire loose enemies bonus
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 44727 W: 7943 L: 7862 D: 28922
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 148343 W: 19044 L: 19088 D: 110211
Bench:
5669076
Closes #1005
VoyagerOne [Wed, 15 Feb 2017 05:20:37 +0000 (21:20 -0800)]
search(): Move nullValue variable into local scope
No functional change
Closes #1003
Joost VandeVondele [Wed, 15 Feb 2017 05:11:44 +0000 (21:11 -0800)]
Fix makefile: 32 bit builds without optimization.
Fixes failing build for
make ARCH=x86-32 clean && make ARCH=x86-32 optimize=no build
by passing -m32 also to the link step.
Extend travis testing accordingly.
No functional change.
Closes #999
torfranz [Sat, 11 Feb 2017 00:52:34 +0000 (16:52 -0800)]
Retire small bonus in passed pawn evaluation
STC: http://tests.stockfishchess.org/tests/view/
5899824d0ebc59099759f3ee
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 33370 W: 6061 L: 5961 D: 21348
LTC: http://tests.stockfishchess.org/tests/view/
5899e3820ebc59099759f415
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 36206 W: 4664 L: 4563 D: 26979
Bench:
6072262
Closes #998
Joona Kiiski [Sat, 11 Feb 2017 00:42:22 +0000 (16:42 -0800)]
A small tweak in doEasyMove()
Time.elapsed() > Time.optimum() * 5 / 44
instaed of:
Time.elapsed() > Time.optimum() * 5 / 42
This was yellow on STC:
LLR: -2.96 (-2.94,2.94) [0.00,4.00]
Total: 156856 W: 28317 L: 27942 D: 100597
Passed on LTC:
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 36909 W: 4926 L: 4682 D: 27301
Note: Patch was originally submitted by user GuardianRM.
However his repo was deleted before merge.
No functional change
Closes #995
Stefano80 [Mon, 6 Feb 2017 00:02:02 +0000 (16:02 -0800)]
Simplify scale factor computation
Minor non-functional simplifications in computing the scale factor.
In my opinion, the code is now slightly more readable:
- remove one condition which can never be satisfied.
- immediately return instead of assigning the sf variable.
Tested for non-regression:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 62162 W: 11166 L: 11115 D: 39881
No functional change
Closes #992
VoyagerOne [Sun, 5 Feb 2017 23:39:29 +0000 (15:39 -0800)]
Simplify Queen Mobility
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 85997 W: 15550 L: 15540 D: 54907
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 25333 W: 3370 L: 3256 D: 18707
Bench:
6459194
Closes #991
Stéphane Nicolet [Mon, 30 Jan 2017 21:05:43 +0000 (22:05 +0100)]
Simplify away QueenContactChecks
Changing the definition of safe checks to include
squares protected only by the king, but twice
attacked by the opponent.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 8691 W: 1683 L: 1541 D: 5467
http://tests.stockfishchess.org/tests/view/
588f53b50ebc5915193f7dc7
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 31266 W: 4150 L: 4043 D: 23073
http://tests.stockfishchess.org/tests/view/
588f68ab0ebc5915193f7dda
Bench :
5885815
VoyagerOne [Sun, 29 Jan 2017 07:54:58 +0000 (02:54 -0500)]
Simplify TT penalty stat (#980)
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 20251 W: 3692 L: 3570 D: 12989
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 16432 W: 2155 L: 2029 D: 12248
Bench:
5941174
VoyagerOne [Wed, 25 Jan 2017 14:32:10 +0000 (09:32 -0500)]
Penalty for a quiet ttMove that fails low
Also the penalty/bonus function is misleading, we
should simply change it to stat_bonus(depth) for
bonus and -stat_bonus(depth+ ONE_PLY) for extra
penalty.
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 11656 W: 2183 L: 2008 D: 7465
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 11152 W: 1531 L: 1377 D: 8244
Bench:
6101931
Stefan Geschwentner [Thu, 19 Jan 2017 17:16:23 +0000 (18:16 +0100)]
Candidate passed pawns
Detect safe candidate passers.
STC: http://tests.stockfishchess.org/tests/view/
5882395c0ebc5915193f78b3
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 53569 W: 9925 L: 9570 D: 34074
LTC: http://tests.stockfishchess.org/tests/view/
5882b4fb0ebc5915193f78e2
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 77576 W: 10387 L: 10014 D: 57175
Bench:
5325829
pb00068 [Sat, 28 Jan 2017 07:43:54 +0000 (08:43 +0100)]
Simplify away pinnedPieces bitboard in EvalInfo (#975)
Results for 20 tests for each version (pgo-builds):
Base Test Diff
Mean
2110519 2118116 -7597
StDev 8727 4906 10112
p-value: 0,774
speedup: 0,004
Further verified for no regression:
http://tests.stockfishchess.org/tests/view/
5885abd10ebc5915193f79e6
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 21786 W: 3959 L: 3840 D: 13987
No functional change
Alain SAVARD [Fri, 13 Jan 2017 03:11:14 +0000 (22:11 -0500)]
Simplification of lazy threshold
Passed STC
http://tests.stockfishchess.org/tests/view/
587846c10ebc5915193f74ec
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 217236 W: 39041 L: 39254 D: 138941
Passed LTC
http://tests.stockfishchess.org/tests/view/
587e157a0ebc5915193f76e7
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 52396 W: 6883 L: 6804 D: 38709
This submitted version (using if (abs(mg + eg) > 1500) )
seems more logical than the following other green simplification (using if (abs(mg)>1500))
since it can happen than mg_value is > eg_value (about 20% of the time)
and the submitted version seems stronger at LTC
STC
http://tests.stockfishchess.org/tests/view/
5879702d0ebc5915193f7585
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 39958 W: 7315 L: 7227 D: 25416
LTC
http://tests.stockfishchess.org/tests/view/
5879af3e0ebc5915193f7592
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 204322 W: 26529 L: 26648 D: 151145
bench:
6406285
Alain SAVARD [Thu, 19 Jan 2017 02:10:31 +0000 (21:10 -0500)]
Outpost array simplification
The ReachableOutpost values were almost exactly half the Outpost values.
Passed STC
http://tests.stockfishchess.org/tests/view/
588020510ebc5915193f781e
LLR: 3.86 (-2.94,2.94) [-3.00,1.00]
Total: 119238 W: 21462 L: 21460 D: 76316
Passed LTC
http://tests.stockfishchess.org/tests/view/
5880ae090ebc5915193f7843
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 23540 W: 3097 L: 2980 D: 17463
Curiously, using a division by 2, with slightly different values, did not passed
http://tests.stockfishchess.org/tests/view/
587fece00ebc5915193f780a
bench:
5828283
Alain SAVARD [Wed, 18 Jan 2017 02:40:31 +0000 (21:40 -0500)]
Reformat eval_init()
Move more code into eval_init, removing some
clutter in the main routine.
Write eval_init only from "our" point of view
(do not init the attackedBy[Them] bitboards).
Add mobilityArea to the evalinfo
A few edits while being there
tested for non-regression at STC
http://tests.stockfishchess.org/tests/view/
587fab230ebc5915193f77d9
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 39585 W: 7183 L: 7094 D: 25308
Non functional change.
Stéphane Nicolet [Tue, 17 Jan 2017 13:50:03 +0000 (14:50 +0100)]
Update some comments (#973)
Use somewhat more precise comments in a couple of places.
No functional change.
Stefano Cardanobile [Tue, 10 Jan 2017 18:03:27 +0000 (19:03 +0100)]
Introduce lazy evaluation
After we have taken into account all cheap evaluation
terms, we check whether the score exceeds a given threshold.
If this is the case, we return a scaled down evaluation.
STC:
LLR: 3.35 (-2.94,2.94) [0.00,5.00]
Total: 12575 W: 2316 L: 2122 D: 8137
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 67480 W: 9016 L: 8677 D: 49787
Current version is the one rewritten by ceebo
further edited by me.
Bench:
5367704
loco-loco [Thu, 12 Jan 2017 07:46:46 +0000 (23:46 -0800)]
Removing CM parameter from the Stats struct. (#970)
After the history simplifications, we are only using Value Stats for CounterMoveHistory table. Therefore the parameter CM is not necessary.
No functional change.
Stéphane Nicolet [Wed, 11 Jan 2017 17:11:17 +0000 (18:11 +0100)]
Check for overflow in Score * int multiplication (#969)
Add asserts to check for overflow in Score * int multiplication.
There is no overflow in current master, but it would be easy to
create one as the scale of the current eval does not leave many
spare bits. For instance, adding the following unused variables
in master at the end of evaluate() (line 882 of evaluate.cpp)
overflows:
Score s1 = score * 4; // no overflow
Score s2 = score * 5; // overflow
Assertion failed: (eg_value(result) == (i * eg_value(s))),
function operator*, file ./types.h, line 336.
Same md5 checksum as current master for non debug compiles.
No functional change.
Rocky640 [Wed, 11 Jan 2017 07:56:38 +0000 (02:56 -0500)]
StormDanger CleanUp (#964)
Order the enum and the array the same way they appear around line 250.
Makes it much easier to follow.
Add comments in the array definition and critical rows.
Use same terminology as elsewhere in pawns.cpp
No functional change.
Joost VandeVondele [Wed, 11 Jan 2017 07:46:29 +0000 (08:46 +0100)]
Adjust copyright headers to 2017 (#965)
No functional change.
Marco Costalba [Wed, 11 Jan 2017 07:44:06 +0000 (08:44 +0100)]
Travis: fix bench fetch in case of PR (#968)
When Travis tests a PR, a commit merge is created
but master branch is not updated, although HEAD is.
No functional change.
lucasart [Tue, 10 Jan 2017 07:47:56 +0000 (15:47 +0800)]
Rename FromTo -> History (#963)
Previously, we had duplicated History:
- one with (piece,to) called History
- one with (from,to) called FromTo
Now that we have only one, rename it to History, which is the generally accepted
name in the chess programming litterature for this technique.
Also correct some comments that had not been updated since the introduction of CMH.
No functional change.
lucasart [Mon, 9 Jan 2017 10:57:34 +0000 (18:57 +0800)]
Remove HistoryStats
STC:
LLR: 3.44 (-2.94,2.94) [-3.00,1.00]
Total: 120831 W: 21572 L: 21594 D: 77665
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 26565 W: 3519 L: 3406 D: 19640
bench
5920493
Marco Costalba [Mon, 9 Jan 2017 14:37:09 +0000 (15:37 +0100)]
Fix previous patch for OS X (#961)
Use posix version of sed that is available on all
platforms.
No functional change.
Marco Costalba [Mon, 9 Jan 2017 11:40:07 +0000 (12:40 +0100)]
Trevis CI: use commit bench number as a reference
No functional change.
Joost VandeVondele [Mon, 9 Jan 2017 09:30:57 +0000 (10:30 +0100)]
New shell scripts for testing, used for travis CI (#957)
Perform more complex verification and validation.
- signature.sh : extract and optionally compare Bench/Signature/Node count.
- perft.sh : verify perft counts for a number of positions.
- instrumented.sh : run a few commands or uci sequences through valgrind/sanitizer instrumented binaries.
- reprosearch.sh : verify reproducibility of search.
These script can be used from directly from the command line in the src directory.
Update travis script to use these shell scripts.
No functional change.
ElbertoOne [Mon, 9 Jan 2017 09:26:50 +0000 (10:26 +0100)]
Simplified select best thread (#958)
Only select best thread if score is better and depth equal or larger.
STC (7 threads): http://tests.stockfishchess.org/tests/view/
586a4d090ebc5903140c64b2
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 120297 W: 18652 L: 18682 D: 82963
LTC (7 threads): http://tests.stockfishchess.org/tests/view/
586e31b30ebc5903140c663d
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 57187 W: 7035 L: 6959 D: 43193
bench:
4940355
Marco Costalba [Sat, 7 Jan 2017 09:13:49 +0000 (10:13 +0100)]
Drop Stats c'tors
Now taht we correctly value-initialize Thread objects,
we don't need c'tors anymore because tables will be
zero-initialized by the compier when Thread object
is instanced.
Verified that we have no errors with Valgrind.
No functional change.
Joost VandeVondele [Fri, 6 Jan 2017 15:16:07 +0000 (16:16 +0100)]
Correctly zero-initialize MainThread
It can be used uninitialized in time management.
Fixes all valgrind errors on './stockfish go wtime 8000 btime 8000 winc 500 binc 500'
This is one (of the many) quirks of C++. There is a subtle difference between:
new Foo
new Foo()
The first statement calls the default constructor (that in case of a POD leaves data members
uninitialized), the second one performs a value-initialization (that in case of POD is
equivalent to a zero-initialization)
See:
http://stackoverflow.com/questions/620137/do-the-parentheses-after-the-type-name-make-a-difference-with-new
http://stackoverflow.com/questions/
5116541 /difference-between-creating-object-with-or-without
No functional change.
Joost VandeVondele [Fri, 6 Jan 2017 09:43:18 +0000 (10:43 +0100)]
Zero init fromToStats in constructor. (#953)
Extend commit fe99de to fromToStats, which fixes the last valgrind errors on
a simple 'go depth 12' at startup.
No functional change.
pb00068 [Thu, 5 Jan 2017 08:00:41 +0000 (09:00 +0100)]
Rejoin lines that belong to HalfDensity map (#952)
No functional change.
Marco Costalba [Thu, 5 Jan 2017 07:50:17 +0000 (08:50 +0100)]
Correct zero-init of Thread data members
If not explicitly initialized in a class constructor,
then all data members are default-initialized when
the corresponing struct/class is instanced.
For array and built-in types (int, char, etc..)
default-initialization is a no-op and we need to
explicitly zero them.
No functional change.
Joost VandeVondele [Mon, 2 Jan 2017 08:36:43 +0000 (09:36 +0100)]
Use consistent variable names for counterMoveStats (#949)
Unify naming in movepick and search, by adopting the latter convention (cmh,fmh,fmh2).
No functional change.
Stéphane Nicolet [Mon, 2 Jan 2017 08:33:40 +0000 (09:33 +0100)]
Simplify unstoppable again (#950)
Assign a small bonus for our passed pawns when the opponent has no
pieces left.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 51124 W: 9036 L: 8966 D: 33122
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 114560 W: 14604 L: 14604 D: 85352
Bench:
4940355
Jonathan Calovski [Sat, 31 Dec 2016 15:09:22 +0000 (02:09 +1100)]
Tweak best thread selection logic
STC 7 threads:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 26881 W: 4161 L: 3941 D: 18779
http://tests.stockfishchess.org/tests/view/
58667a830ebc5903140c632f
LTC 7 threads:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 22988 W: 2767 L: 2583 D: 17638
http://tests.stockfishchess.org/tests/view/
586722690ebc5903140c636d
bench:
5468995
lucasart [Sun, 1 Jan 2017 10:11:52 +0000 (18:11 +0800)]
WDL: rename WDLCursedLoss into WDLBlessedLoss
Tested using syzygy bench method:
- 2016 random positions ranging between 3 and 10 pieces
- each searched using bench at depth=10
Same node count (and no speed regression).
No functional change.
Aram Tumanian [Wed, 21 Dec 2016 11:40:55 +0000 (13:40 +0200)]
Don't clear EasyMove in search()
EasyMove is cleared after every iteration of the
search if the 3rd move in the PV of the main thread
changes from the previous iteration. Therefore,
clearing EasyMove during a search iteration may be
excessive. The tests show that this is indeed unnecessary.
In the new version the EasyMove variable is used only in
the Thread::search function.
STC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 47719 W: 8438 L: 8362 D: 30919
LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 122841 W: 15448 L: 15457 D: 91936
bench:
5468995
Sergei Antonov [Mon, 12 Dec 2016 15:04:16 +0000 (16:04 +0100)]
Threefold repetition detection
Implement a threefold repetition detection. Below are the examples of
problems fixed by this change.
Loosing move in a drawn position.
position fen 8/k7/3p4/p2P1p2/P2P1P2/8/8/K7 w - - 0 1 moves a1a2 a7a8 a2a1
The old code suggested a loosing move "bestmove a8a7", the new code suggests "bestmove a8b7" leading to a draw.
Incorrect evaluation (happened in a real game in TCEC Season 9).
position fen 4rbkr/1q3pp1/b3pn2/7p/1pN5/1P1BBP1P/P1R2QP1/3R2K1 w - - 5 31 moves e3d4 h8h6 d4e3
The old code evaluated it as "cp 0", the new code evaluation is around "cp -50" which is adequate.
Brings 0.5-1 ELO gain. Passes [-3.00,1.00].
STC: http://tests.stockfishchess.org/tests/view/
584ece040ebc5903140c5aea
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 47744 W: 8537 L: 8461 D: 30746
LTC: http://tests.stockfishchess.org/tests/view/
584f134d0ebc5903140c5b37
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 36775 W: 4739 L: 4639 D: 27397
Patch has been rewritten into current form for simplification and
logic slightly changed so that return a draw score if the position
repeats once earlier but after or at the root, or repeats twice
strictly before the root. In its original form, repetition at root
was not returned as an immediate draw.
After retestimng testing both version with SPRT[-3, 1], both passed
succesfully, but this version was chosen becuase more natural. There is
an argument about MultiPV in which an extended draw at root may be sensible.
See discussion here:
https://github.com/official-stockfish/Stockfish/pull/925
For documentation, current version passed both at STC and LTC:
STC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 51562 W: 9314 L: 9245 D: 33003
LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 115663 W: 14904 L: 14906 D: 85853
bench:
5468995
Alain SAVARD [Wed, 28 Dec 2016 22:14:09 +0000 (17:14 -0500)]
Small eval cleanup and renaming
Non-functional changes
a) splitting the threat array to avoid using an enum
b) reorder the scores according to functions where they are used.
c) declarations in evaluate_pieces after the const(s) like elsewhere
d) more compact definitions of KingFlank,
now that we need it also for the PanwLessFlank penalty.
e) reuse CenterFiles in evaluate_space
f) move one line inside next popcount
No functional change.
lucasart [Sat, 31 Dec 2016 12:52:42 +0000 (20:52 +0800)]
Remove SafeCheck (#946)
It was a bit of a hack, without intrinsic value, but rather compensating for the
fact that checks were mistuned.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 88308 W: 15553 L: 15545 D: 57210
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 53115 W: 6741 L: 6662 D: 39712
bench
5468995
Jörg Oster [Sun, 25 Dec 2016 09:44:56 +0000 (10:44 +0100)]
Further simplify unstoppable (#938)
By finally moving it into passed pawns eval.
Tested for no regression:
STC
LLR: 3.25 (-2.94,2.94) [-3.00,1.00]
Total: 57109 W: 10023 L: 9947 D: 37139
LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 21511 W: 2800 L: 2680 D: 16031
Bench:
5255881
hxim [Sun, 25 Dec 2016 09:40:17 +0000 (10:40 +0100)]
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.
Joost VandeVondele [Sun, 25 Dec 2016 09:34:48 +0000 (10:34 +0100)]
Explicitly use alpha+1 for beta in NonPV search (#939)
Fixes the only exception, in razoring.
The code already does assert(PvNode || (alpha == beta - 1)), and it can be verified by studying the program flow that this is indeed the case, also for the modified line.
No functional change.
Joost VandeVondele [Thu, 22 Dec 2016 15:02:32 +0000 (16:02 +0100)]
Simplify threshold handling for probcut. (#936)
Just use greater equal as this is what see_ge does now.
passed STC
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 226506 W: 39755 L: 39978 D: 146773
passed LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 138483 W: 17450 L: 17479 D: 103554
Bench:
5212921
Stefano Cardanobile [Tue, 20 Dec 2016 10:18:19 +0000 (11:18 +0100)]
piecesCount (#932)
All counts in search.cpp are of the form xxxCount. Conform piecesCnt to this unwritten rule.
No functional change.
Joost VandeVondele [Tue, 20 Dec 2016 10:17:38 +0000 (11:17 +0100)]
Use DEPTH_ZERO initializer for depth in qsearch (#931)
Simplifies the main search function.
No functional change.
VoyagerOne [Fri, 16 Dec 2016 16:05:34 +0000 (11:05 -0500)]
Another simplification for SEE pruning
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 29310 W: 5225 L: 5118 D: 18967
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 128454 W: 16424 L: 16442 D: 95588
Bench:
4556848
Stefan Geschwentner [Mon, 12 Dec 2016 11:01:16 +0000 (12:01 +0100)]
Simplify pruning
STC: http://tests.stockfishchess.org/tests/view/
5842be140ebc5903140c5619
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 16014 W: 2839 L: 2710 D: 10465
LTC: http://tests.stockfishchess.org/tests/view/
584316a50ebc5903140c5638
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 182360 W: 22830 L: 22914 D: 136616
Retested at LTC
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 45502 W: 5821 L: 5732 D: 33949
Bench:
4684146
Joost VandeVondele [Sun, 11 Dec 2016 19:05:25 +0000 (20:05 +0100)]
Clean-up skipEarlyPruning (#921)
make skipEarlyPruning a search argument instead of managing this by hand.
Verified for no regression at STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 96754 W: 17089 L: 17095 D: 62570
No functional change.
Jonathan Calovski [Sun, 11 Dec 2016 18:57:02 +0000 (05:57 +1100)]
Simplify unstoppable condition
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 86389 W: 15165 L: 15153 D: 56071
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 98143 W: 12311 L: 12288 D: 73544
Bench:
5437987
Joost VandeVondele [Mon, 5 Dec 2016 17:58:12 +0000 (18:58 +0100)]
Refactor bonus and penalty calculation (#917)
* Refactor bonus and penalty calculation
Compute common terms in a helper function.
No functional change.
* Further refactoring
Remove some parenthesis that are now useless.
Define prevSq once, use repeatedly.
No functional change.
bench:
5884767 (bench of previous patch is wrong)
Stéphane Nicolet [Mon, 5 Dec 2016 17:49:07 +0000 (18:49 +0100)]
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
ElbertoOne [Sun, 4 Dec 2016 08:28:55 +0000 (09:28 +0100)]
Remove piece condition in decrease lmr reduction check
STC: http://tests.stockfishchess.org/tests/view/
584154780ebc5903140c55cf
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 40866 W: 7251 L: 7164 D: 26451
LTC: http://tests.stockfishchess.org/tests/view/
5841e6e50ebc5903140c5605
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 62413 W: 7948 L: 7881 D: 46584
Bench:
5807913
Andrey Neporada [Sat, 3 Dec 2016 08:37:07 +0000 (12:37 +0400)]
Help GCC to optimize msb() to single instruction
GCC compiles builtin_clzll to “63 ^ BSR”. BSR is processor instruction "Bit Scan Reverse".
So old msb() function is basically 63 - 63 ^ BSR.
Unfortunately, GCC fails to simplify this expression.
Old function compiles to
bsrq %rdi, %rdi
movl $63, %eax
xorq $63, %rdi
subl %edi, %eax
ret
New function compiles to
bsrq %rdi, %rax
ret
BTW, Clang compiles both function to the same (optimal) code.
No functional change.
goodkov [Tue, 29 Nov 2016 20:43:03 +0000 (00:43 +0400)]
Simplify pruning rule
STC: http://tests.stockfishchess.org/tests/view/
583df86d0ebc5903140c5481
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 43283 W: 7761 L: 7678 D: 27844
LTC: http://tests.stockfishchess.org/tests/view/
583f42670ebc5903140c5525
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 56587 W: 7232 L: 7157 D: 42198
bench:
5084980
Joost VandeVondele [Thu, 1 Dec 2016 13:55:00 +0000 (14:55 +0100)]
WeakQueen Parameter tweak
New tuned values.
passed STC
http://tests.stockfishchess.org/tests/view/
5834573c0ebc5903140c507b
LLR: 3.16 (-2.94,2.94) [0.00,4.00]
Total: 157415 W: 27917 L: 27227 D: 102271
passed LTC
http://tests.stockfishchess.org/tests/view/
58388d2b0ebc5903140c523b
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 95405 W: 12350 L: 11959 D: 71096
Bench:
4912054
ElbertoOne [Tue, 22 Nov 2016 08:11:00 +0000 (09:11 +0100)]
TrappedRook simplification
Just remove rank checks for rook and king for TrappedRook evaluation.
STC: http://tests.stockfishchess.org/tests/view/
5833fdfc0ebc5903140c5050
LLR: 3.03 (-2.94,2.94) [-3.00,1.00]
Total: 34474 W: 6088 L: 5986 D: 22400
LTC: http://tests.stockfishchess.org/tests/view/
58392f3f0ebc5903140c5276
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 48358 W: 6221 L: 6136 D: 36001
bench:
5536128