VoyagerOne and Marco Costalba
b3525fa9ea
Use Color-From-To history stats to help sort moves
...
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 33502 W: 6498 L: 6223 D: 20781
http://tests.stockfishchess.org/tests/view/578abb940ebc5972faa169e2
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 50782 W: 7124 L: 6832 D: 36826
http://tests.stockfishchess.org/tests/view/578b8e5d0ebc5972faa169fd
LTC: (Sanity test against latest master)
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 32759 W: 4600 L: 4370 D: 23789
http://tests.stockfishchess.org/tests/view/5798b7d30ebc591c761f5b72
bench: 6985912
P.S. Thanks @mstembera for rewriting my code to make it smp compatible. A BIG thank you!
2016-08-02 09:17:14 +02:00
VoyagerOne and Marco Costalba
85924db496
Futility tweak
...
Use a different margin for pruning child nodes.
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16692 W: 3251 L: 3051 D: 10390
http://tests.stockfishchess.org/tests/view/579b95d10ebc591c761f5c03
LTC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 24140 W: 3501 L: 3297 D: 17342
http://tests.stockfishchess.org/tests/view/579bb15d0ebc591c761f5c0b
Bench: 7927017
2016-08-01 21:47:42 +02:00
ajithcj and Marco Costalba
f2f3a06a1a
Allow null pruning at depth 1
...
This removes a check that prevents null pruning at depth 1 PLY.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 23445 W: 4638 L: 4521 D: 14286
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 61416 W: 8627 L: 8563 D: 44226
bench: 8145304
2016-07-24 09:54:07 +02:00
Stefano80 and Marco Costalba
714329dbdc
See prune at higher depth
...
Allow SEE pruning at higher depths in shallow depth
pruning using a threshold increasing with depth.
STC
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 35366 W: 7011 L: 6724 D: 21631
LTC
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 15578 W: 2243 L: 2070 D: 11265
Bench: 8417887
2016-07-24 08:55:58 +02:00
ajithcj and Marco Costalba
76971d8acb
Gradually relax the NMP staticEval check
...
Gradually relax the NMP staticEval check as we go to
higher depths.
Use tuned values.
STC
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16745 W: 3371 L: 3168 D: 10206
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 5906 W: 875 L: 736 D: 4295
bench: 8548212
2016-07-16 07:35:31 +02:00
joergoster and Marco Costalba
82d02a3133
Fix extract_ponder_from_tt()
...
Checking for legality of a possible ponder move
must be done before we undo the first pv move,
of course. (spotted by mohammed li.)
This obviously only has any effect when playing in ponder mode.
No functional change.
2016-07-12 08:47:21 +02:00
ajithcj and Marco Costalba
ade3bb9a4e
Use staticEval in null prune condition
...
Don't null prune at depth < 12 if staticEval < beta
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 62858 W: 12035 L: 11632 D: 39191
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 49784 W: 7009 L: 6720 D: 36055
bench: 8054611
2016-07-02 16:43:49 +02:00
loco-loco and Marco Costalba
716a145a6c
Removing inCheck condition for counter move bonus
...
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 20206 W: 3946 L: 3823 D:
LTC:
LLR: 3.10 (-2.94,2.94) [-3.00,1.00]
Total: 25004 W: 3512 L: 3390 D: 18102
Bench: 8172428
2016-06-26 10:25:05 +02:00
ElbertoOne and Marco Costalba
c2c0e6b07d
Remove redundant PvNode condition
...
After commit 6d58bf777c we always call PvNodes
with cutNode set to false.
No functional change.
2016-06-24 08:46:36 +02:00
VoyagerOne and Marco Costalba
c94145b65c
Comment out a redundant condition
...
Take advantage that VALUE_NONE = 32002 to remove
the condition.
Commented out and not removed becuase it is tricky
to rely on the hidden value of VALUE_NONE and code
can break in case we change VALUE_NONE in the future.
No functional change.
2016-06-24 08:26:39 +02:00
ElbertoOne and Marco Costalba
6d58bf777c
On IID do not always search with cutNode = true
...
On IID now search with cutNode value instead of fixed value true.
STC (http://tests.stockfishchess.org/tests/view/575fa3860ebc5972faa15f67 ):
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 163974 W: 30744 L: 30874 D: 102356
LTC (http://tests.stockfishchess.org/tests/view/5763b0640ebc5972faa16075 ):
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 48363 W: 6611 L: 6528 D: 35224
Bench: 7806393
2016-06-19 18:04:22 +02:00
VoyagerOne and Marco Costalba
1c0c4db677
Simplify Check Extension
...
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 32704 W: 6146 L: 6045 D: 20513
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 146622 W: 19967 L: 20017 D: 106638
Bench: 8245662
2016-06-18 08:32:25 +02:00
ajithcj and Marco Costalba
8e45e70e55
Don't insert pv back into tt
...
This code was added before the accurate pv patch, when
we retrieved PV directly from TT.
It's not required for correct (and long) PVs any more and
should be safe to remove it.
Also, allowing helper threads to repeatedly over-write
TT doesn't seem to make sense(that was probably an un-intended
side-effect of lazy smp). Before Lazy SMP only Main Thread used
to run ID loop and insert PV into TT.
STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 74346 W: 13946 L: 13918 D: 46482
LTC
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 47265 W: 6531 L: 6447 D: 34287
bench: 8819179
2016-06-15 08:55:40 +02:00
Marco Costalba
ca14345ba2
Filter root moves filter before copy to threads
...
Currently root moves are copied to all teh threads
but are DTZ filtered only in main thread at the
beginning of teh search.
This patch moves the TB filtering before the
copy of root moves fixing issue #679
https://github.com/official-stockfish/Stockfish/issues/679
No bench change.
2016-06-11 09:24:40 +02:00
VoyagerOne and Marco Costalba
7d2a79f037
Stat Formula Tweak
...
bonus = d * d + 2 * d - 2
STC:
LLR: 2.94 (-2.94,2.94) [0.00,4.00]
Total: 99444 W: 18274 L: 17778 D: 63392
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 89757 W: 12285 L: 11896 D: 65576
bench: 8276130
2016-06-10 07:27:47 +02:00
VoyagerOne and Marco Costalba
7c5d724724
Tweak check extension condition
...
There are two concepts with this patch:
Limit check extensions by using move count.
The idea is to limit search explosion.
Always extend check if the first move gives check.
The idea is to save expensive SEE calls, since the vast
majority of first move will have SEE value >= 0, also
first move may still be strong even if the SEE is negative.
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16503 W: 3068 L: 2873 D: 10562
LTC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 37202 W: 5261 L: 5014 D: 26927
bench: 8543366
2016-06-10 07:15:56 +02:00
ElbertoOne and Marco Costalba
e48c7547c5
LMR reduction parameter tweak
...
More reduction for cut nodes, less for moves that escape a capture:
STC (http://tests.stockfishchess.org/tests/view/57548c1e0ebc59029919b247 ):
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 60165 W: 11519 L: 11149 D: 37497
LTC (http://tests.stockfishchess.org/tests/view/57555b570ebc59029919b260 ):
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 10353 W: 1493 L: 1317 D: 7543
Bench: 8902859
2016-06-07 15:15:49 +02:00
VoyagerOne and Marco Costalba
5f096e9bef
Simplify Futility Pruning
...
Don't update bestValue when futility pruning.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 21933 W: 4031 L: 3912 D: 13990
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 46225 W: 6115 L: 6028 D: 34082
Bench: 8450534
2016-06-03 19:58:42 +02:00
ElbertoOne and Marco Costalba
20023ac9b8
LMR Simplification
...
LMR simplification that also gives a slight ELO gain, especially at LTC:
STC (http://tests.stockfishchess.org/tests/view/574ec8e20ebc59029919b147 ):
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 32402 W: 5967 L: 5866 D: 20569
LTC (http://tests.stockfishchess.org/tests/view/574fbebf0ebc59029919b16d ):
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 15103 W: 2103 L: 1975 D: 11025
Bench: 8248133
2016-06-03 19:53:04 +02:00
Leonid Pechenik and Marco Costalba
71bfbb22fc
More detailed dependence of time allocation on the magnitude of score change
...
10+0.1:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 5657 W: 1130 L: 979 D: 3548
60+0.6:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 36884 W: 5002 L: 4762 D: 27120
bench: 8428997
2016-05-20 19:44:50 +02:00
loco-loco and Marco Costalba
7cb8cbb403
Assorted pruning tweaks
...
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 38257 W: 5206 L: 4961 D: 28090
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 16550 W: 3110 L: 2914 D: 10526
Bench: 8428997
2016-05-20 19:34:49 +02:00
mstembera and Marco Costalba
0784bd542b
Fix a multiPV bug in lazy SMP
...
Where the helper threads were not doing multiPV at all.
Regression tested sprt @ 5+0.05 th 7
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 73918 W: 11891 L: 11853 D: 50174
bench: 8716243
2016-05-14 21:34:55 +02:00
VoyagerOne and Marco Costalba
5486911e01
Simplify History LMR Formula
...
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 41713 W: 7589 L: 7504 D: 26620
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 41353 W: 5484 L: 5391 D: 30478
Bench: 8946983
2016-05-05 08:53:50 +02:00
joergoster and Marco Costalba
dc0030de4f
Fix LazySMP when searching to a fixed depth.
...
Currently, helper threads will only search up to the
specified depth limit. Now let them search until the
main thread has finished the specified depth.
On the other hand, we don't want to pick a thread with
a higher search depth.
This may be considered cheating. ;-)
No functional change.
2016-05-01 14:30:50 +02:00
VoyagerOne and Joona Kiiski
e082112cfe
Use FMHs to assist with LMR formula.
...
STC:
LLR: 2.99 (-2.94,2.94) [0.00,5.00]
Total: 52232 W: 9654 L: 9304 D: 33274
LTC:
LLR: 2.97 (-2.94,2.94) [0.00,5.00]
Total: 115988 W: 15550 L: 15049 D: 85389
Bench: 7890808
Resolves #651
2016-04-24 01:00:58 +01:00
loco-loco and Joona Kiiski
ec6aab0136
Add a second level of follow-up moves
...
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 6438 W: 1229 L: 1077 D: 4132
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 4000 W: 605 L: 473 D: 2922
bench: 7378965
Resolves #636
2016-04-17 15:19:20 +01:00
Marco Costalba
7eaea3848c
StateInfo is usually allocated on the stack by search()
...
And passed in do_move(), this ensures maximum efficiency and
speed and at the same time unlimited move numbers.
The draw back is that to handle Position init we need to
reserve a StateInfo inside Position itself and use at
init time and when copying from another Position.
After lazy SMP we don't need anymore this gimmick and we can
get rid of this special case and always pass an external
StateInfo to Position object.
Also rewritten and simplified Position constructors.
Verified it does not regress with a 3 threads SMP test:
ELO: -0.00 +-12.7 (95%) LOS: 50.0%
Total: 1000 W: 173 L: 173 D: 654
No functional change.
2016-04-17 08:29:33 +02:00
Niklas Fiekas and Joona Kiiski
ee7a68ea5f
Fix last search info carried over to mate position
...
When starting search in a mate or stalemate position, Stockfish does not
even care to reinitialize and start worker threads. However after search
all threads are checked for the best move.
This can lead to bestmove and info beeing carried over from the last
search.
Example session:
setoption name threads value 7
go movetime 4000
position startpos moves f2f3 e7e5 g2g4 d8h4
go movetime 4000
Actual output is like (almost always):
[...]
bestmove e2e4
info depth 0 score mate 0
info depth 20 seldepth 29 multipv 1 score cp 28 [...] pv e2e4
bestmove e2e4
Expected output / output after fix:
[...]
bestmove e2e4 ponder e7e6
info depth 0 score mate 0
bestmove (none)
Resolves #623
2016-04-16 10:22:36 +01:00
Marco Costalba and Joona Kiiski
647402ff79
Assorted cleanup of latest commits
...
No functional change.
Resolves #601
2016-03-14 20:42:44 -07:00
Stefan Geschwentner and Joona Kiiski
a273b6ef8c
Add followup moves history for move ordering
...
STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 7955 W: 1538 L: 1378 D: 5039
LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 5323 W: 778 L: 642 D: 3903
Bench: 8261839
Resolves #599
2016-03-10 14:26:06 -08:00
ElbertoOne and Joona Kiiski
c13052f344
Clean up depth reduction calculation
...
Might also be a slight speed up
No functional change
Resolves #593
2016-02-28 13:40:47 +00:00
VoyagerOne and Joona Kiiski
45a309d92e
Simplify Reduction Formula
...
Formula now only contains one coefficient. Making it much easier to tune.
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 187443 W: 34858 L: 35028 D: 117557
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 88329 W: 11982 L: 11953 D: 64394
Bench: 7521394
Resolves #591
2016-02-28 13:31:25 +00:00
VoyagerOne and Joona Kiiski
744ed85a4d
Fix futility pruning bug
...
PredictedDepth can be negative, causing the futility_margin to be negative.
It will be very difficult to tweak moveCount pruning and reduction formula, as they are tuned to prevent this behavior.
No functional change
Resolves #587
2016-02-14 19:48:46 +00:00
Marco Costalba and Joona Kiiski
4f6aa15228
Document HalfDensityMap
...
No functional change.
Resolves #584
2016-02-07 20:54:25 +00:00
Leonid Pechenik and Joona Kiiski
aedebe35cf
Time management simplification
...
10+0.1:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 41963 W: 7967 L: 7883 D: 26113
60+0.6:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 132314 W: 17939 L: 17969 D: 96406
Resolves #580
2016-01-29 00:47:07 +00:00
Guenther Demetz and Joona Kiiski
9a10313a9d
rotating symmetric patterns with increasing skipsize
...
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00] sprt @ 5+0.1 th 21
Total: 7068 W: 1121 L: 975 D: 4972
LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00] sprt @ 12+0.12 th 21
Total: 26691 W: 3594 L: 3481 D: 19616
No functional change with a single thread
Resolves #574
2016-01-24 14:08:01 +00:00
Joona Kiiski and Joona Kiiski
8c3a5bbc52
Do not probe syzygy bases when castling is possible
...
Almost no functional change. Bench is unchanged.
Resolves #230
Resolves #573
2016-01-20 15:24:21 +00:00
lucasart and Joona Kiiski
28933a580e
Retire RootNode template
...
There is no reason to compile 3 different copies of search(). PV nodes are on
the cold path, and PvNode is a template parameter, so there is no cost in
computing:
const bool RootNode = PvNode && (ss-1)->ply == 0;
And this simplifies code a tiny bit as well.
Speed impact is negligible on my machine (i7-3770k, linux 4.2, gcc 5.2):
nps +/-
test 2378605 3118
master 2383128 2793
diff -4523 2746
Bench: 7751425
No functional change.
Resolves #568
2016-01-18 22:21:42 +00:00
Marco Costalba
356147d99a
Rewrite time formula
...
Time management is really too complex, our aim is
to simplify it, but for time being at least rewrite
in an understandable way.
No functional change.
2016-01-18 17:12:18 +01:00
Lyudmil Antonov and Joona Kiiski
89723339d9
Assorted English grammar changes
...
No functional change
Resolves #567
2016-01-16 21:34:29 +00:00
Stefano80 and Joona Kiiski
74e2fa97b7
Adjust reductions based on history and cmh tables
...
STC:
LLR: 4.06 (-2.94,2.94) [0.00,5.00]
Total: 149395 W: 28029 L: 27208 D: 94158
LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 9628 W: 1368 L: 1217 D: 7043
bench: 8076724
Resolves #565
2016-01-13 16:18:35 +00:00
Stefano80 and Joona Kiiski
dcd8ce7094
Update comments in LMR step
...
No functional change
Resolves #564
2016-01-13 16:03:53 +00:00
Leonid Pechenik and Joona Kiiski
9eceb894ac
Adjust time used for move based on previous score
...
Use less time if evaluation is not worse than for previous move and even less time if in addition no fail low encountered for current iteration.
STC: 10+0.1
ELO: 5.37 +-2.9 (95%) LOS: 100.0%
Total: 20000 W: 3832 L: 3523 D: 12645
STC: 10+0.1
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 17527 W: 3334 L: 3132 D: 11061
LTC: 60+0.6
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 28233 W: 3939 L: 3725 D: 20569
LTC: 60+0.6
ELO: 2.43 +-1.4 (95%) LOS: 100.0%
Total: 60000 W: 8266 L: 7847 D: 43887
LTC: 60+0.06
LLR: 2.95 (-2.94,2.94) [-1.00,3.00]
Total: 38932 W: 5408 L: 5207 D: 28317
Resolves #547
2016-01-03 14:01:15 +00:00
ppigazzini and Joona Kiiski
d4af15f682
Update AUTHORS and copyright notice
...
No functional change
Resolves #555
2016-01-02 09:43:51 +00:00
Marco Costalba and Joona Kiiski
9742fb10fd
Update Copyright year
...
No functional change.
Resolves #554
2016-01-01 10:17:36 +00:00
Marco Costalba and Joona Kiiski
1b5b900a29
Move some globals into main thread scope
...
Make it explicit that those variables are not globals, but
are used only by main thread. I think it is a sensible
clarification because easy move is already tricky enough
and current patch makes the involved actors explicit.
No functional change.
Resolves #537
2015-12-27 19:29:16 +00:00
DU-jdto and Joona Kiiski
e3c85c314d
Remove another unnecessary Search::Stack field
...
No functional change
Resolves #535
2015-12-22 17:16:15 +00:00
VoyagerOne and Joona Kiiski
ed72a1e9ba
Remove killer move conditions from LMR
...
STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 8459 W: 1619 L: 1477 D: 5363
LTC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 32239 W: 4404 L: 4299 D: 23536
Bench: 7597031
Resolves #534
2015-12-20 20:41:17 +00:00
loco-loco and Joona Kiiski
5bbd944099
Remove unused field SearchStack::ttMove
...
No functional change
Resolves #533
2015-12-20 20:37:18 +00:00
Guenther Demetz and Joona Kiiski
38adb487ca
Distinct iteration paths for Lazy SMP threads
...
STC 5+0.1, threads 7
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 6026 W: 1047 L: 901 D: 4078
LTC: 20+0.2, threads 7
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 19739 W: 2910 L: 2721 D: 14108
STC 5+0.1, threads 20
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 2493 W: 462 L: 331 D: 1700
LTC 30+0.3, threads 20
ELO: 8.86 +-3.7 (95%) LOS: 100.0%
Total: 8000 W: 1076 L: 872 D: 6052
Bench: 8012530
Resolves #525
2015-12-18 21:59:09 +00:00