1
0
Fork 0
Commit Graph

3940 Commits (1e76ba7cec535e431a8d7486bfd41b3efbfad68e)

Author SHA1 Message Date
Joost VandeVondele 1e76ba7cec 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
2016-12-01 14:55:00 +01:00
ElbertoOne 535435b7fc 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
2016-11-27 17:42:20 +01:00
theo77186 7a3844e6ef Fix PGO build with GCC (#904) 2016-11-27 14:43:52 +01:00
Michael Byrne fbb2ffacfd Fix PGO Build for clang
This fixes https://github.com/official-stockfish/Stockfish/issues/167.

Additional improvments by Joost VandeVondele.
2016-11-27 10:03:52 +01:00
joergoster 8f30d233f8 Fix trace in case of space evaluation
We only compute space eval during the opening/early midgame.
Apply the same logic for DoTrace.

No functional change.
2016-11-27 09:28:32 +01:00
Marco Costalba ec83e8a72c Fix regression: print const position
Fix a regression introduced with new TB code.

No functional change.
2016-11-27 09:11:56 +01:00
mbootsector e7289465b9 Rank based threats
STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 19404 W: 3581 L: 3374 D: 12449

LTC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 16204 W: 2194 L: 2023 D: 11987

Bench: 5757843
2016-11-27 09:05:57 +01:00
Joost VandeVondele 8ceb1ff53b Fix undefined behavior
This fixes #892. Undefined behavior as seen with
clang -fsanitize=undefined.

No functional change.
2016-11-26 16:49:59 +01:00
Marco Costalba 2ec626ddae Fix compile under Windows XP
The needed Windows API for processor groups could be missed from old Windows
versions, so instead of calling them directly (forcing the linker to resolve
the calls at compile time), try to load them at runtime. To do this we need
first to define the corresponding function pointers.

Also don't interfere with running fishtest on numa hardware with Windows.
Avoid all stockfish one-threaded processes will run on the same node

No functional change.
2016-11-26 07:04:17 +01:00
Aram Tumanian 9eccba7761 Fix the pawn hash failure when the pawn key is 0
This patch fixed bugs #859 and #882.
At initialization we generate a new random key (Zobrist::noPawns).
It's added to the pawn key of all positions, so that the pawn key
of a pawnless position is no longer 0.

STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 21307 W: 3738 L: 3618 D: 13951

LTC:
LLR: 2.94 (-2.94,2.94) [-3.00,1.00]
Total: 45270 W: 5737 L: 5648 D: 33885

No functional change.
2016-11-25 08:48:35 +01:00
erbsenzaehler ca464fc89e Cleanup Makfile for MacOs
1) Explicitly setting the default lib to the system-default is not
   needed on a Mac. See:
   http://libcxx.llvm.org/docs/UsingLibcxx.html

2) We do no longer need to exclude bmi2-builds from LTO. See:
   https://llvm.org/bugs/show_bug.cgi?id=19416

Changes tested and discussed on FishCooking:
   https://groups.google.com/forum/?fromgroups=#!topic/fishcooking/acUQtKtEzMM

No functional change.
2016-11-25 08:46:20 +01:00
Marco Costalba 0d9a9f5e98 Handle Windows Processors Groups
Under Windows it is not possible for a process to run on more than one
logical processor group. This usually means to be limited to use max 64
cores. To overcome this, some special platform specific API should be
called to set group affinity for each thread. Original code from Texel by
Peter Österlund.

Tested by Jean-Paul Vael on a Xeon E7-8890 v4 with 88 threads and confimed
speed up between 44 and 88 threads is about 30%, as expected.

No functional change.
2016-11-22 07:56:04 +01:00
Joost VandeVondele 6036303bb6 Avoid touching source files in profile-build
This refines the profile-build target to avoid 'touch'ing the sources,
keeping meaningful modification dates and avoiding editor warnings like vi's:

WARNING: The file has been changed since reading it!!!
Do you really want to write to it (y/n)?

Instead of touching sources, the (instrumented) object files are removed,
which has the same effect of rebuilding them in the next step.

As a side effect, this simplifies the Makefile a bit.

No functional change.
2016-11-20 10:51:42 +01:00
Fabian Beuke b5d10d17c2 Reduce variable scope in swap_byte
Added a specialization to remove the 'if' condition

No functional change.
2016-11-19 21:31:24 +01:00
Aram Tumanian 797602938d Start searching for a repetition from the 4th ply behind
A position can never repeat the one on the previous move.
Thus we can start searching for a repetition from the 4th
ply behind. In the case:

 std::min(st->rule50, st->pliesFromNull) < 4

We don't need to do any more calculations. This case happens
very often - in more than a half of all calls of the function.

No functional change.
2016-11-19 10:20:28 +01:00
Alain SAVARD 76d113f5f0 Pawn shelter and pawn storm tuned
Based on SPSA tuned values

Passed STC
http://tests.stockfishchess.org/tests/view/582363b30ebc5910626b9ca8
LLR: 2.95 (-2.94,2.94) [0.00,4.00]
Total: 40628 W: 7380 L: 7087 D: 26161

and passed LTC
http://tests.stockfishchess.org/tests/view/5823b73b0ebc5910626b9cb5
LLR: 2.96 (-2.94,2.94) [0.00,4.00]
Total: 273312 W: 35991 L: 35131 D: 202190

bench: 5773672
2016-11-19 09:42:11 +01:00
Marco Costalba 18df1698f4 Fix compile error from previous patch
Due to different types on some platforms.

No functional change.
2016-11-19 09:35:57 +01:00
Stéphane Nicolet 7f4de0196b Do not use GCC extension for anonymous unions
Anonymous struct inside anonymous unions are a GCC extension.
This patch uses named structs to stick to the C+11 standard.

Avoids a string of warnings on the Clang compiler.

Non functional change (same bench and same MD5 signature,
so compiled code is exactly the same as in current master)
2016-11-19 09:22:49 +01:00
Joost VandeVondele cddc8d4546 More accurate 'go nodes' searches at low count
Makes the actual number of nodes searched match closely
the number of nodes requested, by increasing the frequency
of checking the number of nodes searched at low node count.
All other searches retain the default checking frequency of
once per 4096 nodes, and are thus unaffected.

Passed STC as non-regression
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 26643 W: 4766 L: 4655 D: 17222

No functional change.
2016-11-19 08:47:41 +01:00
Stefan Geschwentner a90fc4c877 Non-quiet pruning tweak
Count in the difference of static evaluation
and alpha for pruning threshold.

STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 16885 W: 3061 L: 2866 D: 10958

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 33566 W: 4428 L: 4202 D: 24936

Bench: 5513149
2016-11-19 08:37:52 +01:00
Aram Tumanian e6c2899020 Make a version of Position::do_move() without the givesCheck parameter
In 10 of 12 calls total to Position::do_move()the givesCheck argument is
simply gives_check(m). So it's reasonable to make an overload without
this parameter, which wraps the existing version.

No functional change.
2016-11-12 09:55:12 +01:00
joergoster de269ee18e FEN parsing: add a second check for correctly setting e.p. square
Currently, we only check if there is a pawn in place
to make the en-passant capture. Now also check that
there is a pawn that could just have advanced two
squares. Also update the corresponding comment.

This makes the parsing of FENs a bit more robust, and
now correctly handles positions like the one reported by Dann Corbit.

position fen rnbqkb1r/ppp3pp/3p1n2/3P4/8/2P5/PP3PPP/RNBQKB1R w KQkq e6
d

 +---+---+---+---+---+---+---+---+
 | r | n | b | q | k | b |   | r |
 +---+---+---+---+---+---+---+---+
 | p | p | p |   |   |   | p | p |
 +---+---+---+---+---+---+---+---+
 |   |   |   | p |   | n |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   | P |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   |   |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 |   |   | P |   |   |   |   |   |
 +---+---+---+---+---+---+---+---+
 | P | P |   |   |   | P | P | P |
 +---+---+---+---+---+---+---+---+
 | R | N | B | Q | K | B |   | R |
 +---+---+---+---+---+---+---+---+

Fen: rnbqkb1r/ppp3pp/3p1n2/3P4/8/2P5/PP3PPP/RNBQKB1R w KQkq - 0 1

No functional change.
2016-11-10 11:45:51 +01:00
Mira dc4655e1f9 Stack offset changed from -5 to -4
Non functional change, tests under sanitizers OK.

Rationales for change

- Offset in code is in range -4 ... 2
- There was an error by (pathological) corner case MAX_PLY=0

No functional change.
2016-11-10 11:43:21 +01:00
atumanian 0fa80c9ba3 Update comments related after new see_ge()
Update comments according to changes from my patch: #822

No functional change.
2016-11-10 11:40:31 +01:00
Joost VandeVondele 61c727fdcb Allow benches with more than 2G nodes.
./stockfish bench 128 1 4000000000 default nodes

    crashes before, works after.

    No functional change.
2016-11-07 13:35:28 +01:00
Joost VandeVondele 876f07cbee Fix undefined behaviour with unaligned loads in syzygy code
Casting a pointer to a different type with stricter alignment
requirements yields to implementation dependent behaviour.
Practicaly everything is fine for common platforms because the
CPU/OS/compiler will generate correct code, but anyhow it is
better to be safe than sorry.

Testing with dbg_hit_on() shows that the unalignment accesses are
very rare (below 0.1%) so it makes sense to split the code in a
fast path for the common case and a slower path as a fallback.

No functional change (verified with TB enabled).
2016-11-06 11:48:07 +01:00
ppigazzini f5d3f0ded6 Update AUTHORS for SF8
And format top contriutor (space instead of tabs, proper Unix
line endings).
2016-11-06 10:28:17 +01:00
Marco Costalba e4659693de Fix a warning with debug=no
Warning in TB code due to unused variable.

Verified same bench with TB code enabled.

No functional change.
2016-11-06 09:45:25 +01:00
Joost VandeVondele 52cb348023 Reproducible searches after ucinewgame
Fixes issue #859.

thisThread->callsCnt in search<>() was different (by 1) for the first and second game played.

No functional change.
2016-11-05 22:25:55 +01:00
Marco Costalba 0d669be76c Restore development version
No functional change.
2016-11-05 09:32:39 +01:00
Marco Costalba 23f384cac3 Add explicit braces and fix a warning
Warning under both gcc and clang.

No functional change.
2016-11-05 09:29:22 +01:00
VoyagerOne b915fdc889 Reduction Simplification
Simplify reduction formula by removing a parameter.

STC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 35798 W: 6368 L: 6272 D: 23158

LTC:
LLR: 2.96 (-2.94,2.94) [-3.00,1.00]
Total: 125375 W: 15827 L: 15839 D: 93709

Bench: 4735038
2016-11-05 08:17:42 +01:00
Joost VandeVondele 67d19447f4 Makefile fix for sanitize
Small fixes for compilation with sanitize=yes optimize=no,
by always adding -fsanitize=undefined to the LDFLAGS as required.
Updates config-sanity to check&report the status of the flag.

No functional change.
2016-11-05 08:15:56 +01:00
VoyagerOne d4abf54247 Top CPU Contributors
Give some well needed credit...

No functional change.
2016-11-05 08:12:22 +01:00
Miroslav Fontán 445aade39c Simplify code, delete else after return 2016-11-05 08:08:25 +01:00
Miroslav Fontán f3cd7002aa Sync variable names in decl vs def 2016-11-05 08:05:22 +01:00
Joost VandeVondele c43146edb7 Travis-ci: integrate perft checking
makes verifying perft numbers for a few positions
part of travis-ci. Adds <5s testing time.

No functional change.
2016-11-05 08:03:34 +01:00
Marco Costalba c0bb041539 Rewrite syzygy in C++
Rewrite the code in SF style, simplify and
document it.

Code is now much clear and bug free (no mem-leaks and
other small issues) and is also smaller (more than
600 lines of code removed).

All the code has been rewritten but root_probe() and
root_probe_wdl() that are completely misplaced and should
be retired altogheter. For now just leave them in the
original version.

Code is fully and deeply tested for equivalency both in
functionality and in speed with hundreds of games and
test positions and is guaranteed to be 100% equivalent
to the original.

Tested with tb_dbg branch for functional equivalency on
more than 12M positions.

stockfish.exe bench 128 1 16 syzygy.epd

Position: 2016/2016
Total 12121156 Hits 0 hit rate (%) 0
Total time (ms) : 4417851
Nodes searched : 1100151204
Nodes/second : 249024

Tested with 5,000 games match against master, 1 Thread,
128 MB Hash each, tc 40+0.4, which is almost equivalent
to LTC in Fishtest on this machine. 3-, 4- and 5-men syzygy
bases on SSD, 12-moves opening book to emphasize mid- and endgame.

Score of SF-SyzygyC++ vs SF-Master: 633 - 617 - 3750  [0.502] 5000
ELO difference: 1

No functional change.
2016-11-05 07:55:08 +01:00
Marco Costalba 369eff437c Stockfish 8
Bench: 5926706

No functional change
2016-11-01 10:19:17 +01:00
Stefan Geschwentner 344616e917 Bonus for attacked passed pawn promotion path
Bonus for each attacked square on the promotion path
of an enemy passed pawn.

STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 141511 W: 25295 L: 24579 D: 91637

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 23161 W: 3022 L: 2831 D: 17308

Bench: 5926706
2016-10-30 13:48:03 +01:00
Joost Vandevondele 40b1b27178 Fix a series of undefined behaviours
Avoid shifting negative signed integers and use typed
enum to avoids decrementing a variable beyond its defined
range, like:
       for (Rank r = RANK_8; r >= RANK_1; --r)

Changes were tested individually and passed SPRT[-3, 1].

With this patch gcc --sanitize builds cleanly.

No functional change.
2016-10-27 06:44:41 +02:00
Joost VandeVondele bf51b4796a travis-ci: Enable undefined behavior checking 2016-10-27 06:29:24 +02:00
syzygy e18e557e77 Output PV if last iteration does not complete
Instead of outputting "info nodes ... time ..." when the last
iteration is interrupted, simply call UCI::pv() to output the PV.

I thought about calling UCI:pv() with bounds -VALUE_INFINITE, VALUE_INFINITE
to avoid "lowerbound" or "upperbound" appearing in it, but I'm not sure that
would be any better.

This patch fixes rare inconsistencies between the first move of
the last PV output and the bestmove played. It also makes sure
that all the latest statistics are sent to the GUI (not only nodes
and time but also nps, tbhits, hashfull).

No functional change.
2016-10-27 06:26:22 +02:00
Stéphane Nicolet 818b4a126d Endgame malus for having a king in a pawnless flank
Original idea by "ElbertoOne", while "FauziAkram" suggested to put a
small midgame penalty too.

STC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 71808 W: 13038 L: 12610 D: 46160

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 150874 W: 19828 L: 19221 D: 111825

Bench: 6077005
2016-10-25 06:57:29 +02:00
VoyagerOne e77f38c431 History Stat Comparison
Adjust LMR by comparing history stats
with opponent (prior ply).

STC:
LLR: 2.96 (-2.94,2.94) [0.00,5.00]
Total: 27754 W: 5066 L: 4824 D: 17864

LTC:
LLR: 2.95 (-2.94,2.94) [0.00,5.00]
Total: 216596 W: 28157 L: 27343 D: 161096

Bench: 5437729
2016-10-25 06:44:19 +02:00
Marco Costalba e18321f55a Correcty resey TB hit counter
Restore original behaviour to reset
the counter before a new move search.

Also fixed some warnings and added const
qualifier to a couple of functions, as
suggested by m_stembera.

Thanks to Werner Bergmans for reporting
the regression.

No functional change.
2016-10-22 08:22:13 +02:00
syzygy ca67752645 Per-thread TB hit counters
Use a per-thread counter to reduce contention
with many cores and endgame positions.

Measured around 1% speed-up on a 12 core and 8%
on 28 cores with 6-men, searching on:
 7R/1p3k2/2p2P2/3nR1P1/8/3b1P2/7K/r7 b - - 3 38

Also retire the unused set_nodes_searched() and fix
a couple of return types and naming conventions.

No functional change.
2016-10-21 06:15:45 +02:00
Joost Vandevondele 3686e719a1 Simplify next_move by always scoring evasions
For a default bench, this fixes the last valgrind
error (jump on uninitialised value).

Passed STC:
LLR: 2.95 (-2.94,2.94) [-3.00,1.00]
Total: 187869 W: 33303 L: 33463 D: 121103

No functional change.
2016-10-20 17:17:14 +02:00
Joost Vandevondele 9893e7fd53 Make valgrind testing part of travis ci. 2016-10-19 21:29:00 +02:00
ajithcj 99f3ad6858 Remove useless assignments to currentMove
We reference (ss-1)->currentMove, i.e. we peek
current move of the parent node, so currentMove
should be valid in the main move loop, when we
search() the subtree, but outside of main loop
it is useless.

No functional change.
2016-10-18 09:00:52 +02:00