Also replace platform specific byte swap with
a software version. Amazingly it seems it is
even faster now!
Also removing the templatized form does not slow down.
* document 0x38
* remove useless enc_type
For whatever reason (?), syzygy tables have the information to play a stupid
chess variant that (apparently) can result in having only 1 King on the board
instead of 2. Obviously, we do not care about this "game" which is neither
Chess, nor Chess960, so get rid of that useless code.
No functional change.
* Properly include tbcore.cpp
* Merge *cpp files
* Additional reshuffle and consolidation
* Cosmetic touch
- run: astyle -A3 -s4 -f -xn -xc -xl *.cpp *.h. Mainly this breaks blocks (if,
do, while, for etc.)
- remove static_cast<>: inconsistently used, and ugly. Prefer C-style cast.
Eventually, the code will be rewritten so that less casting is needed...
No functional change.
* Avoid encode/decode madness in init_tb
We encode pieces in a string passed to init_tb() that
just decodes the exactly same string to get the pieces back!
Sanitize this madness.
No functional change.
* Further cleanup init_tb
* Avoid useless intermediate conversions of TB paths
In many cases original information is converted to
an intermediate form to be then further used later.
In many cases this intermediate form is useless and
the original information can be used directly instead.
This patch removes a typical case.
Also simplified open_tb() signature.
* Address some Lucas review comments
Also a speedup(about 1%) on 64-bit w/o hardware popcnt
Retire Max15 and Full template parameters
(Contributed by Marco Costalba)
Now that we have just SW and HW versions, use
template default parameter to get rid of explicit
template parameters.
Retire bitcount.h and move the only defined
function to bitboard.h
No functional change
Resolves#620
v = value without ep capture being considered
v1 = value of the ep capture
The correct logic is:
if without e.p. capture we are losing, and the value of e.p is either draw, or win or "loss, but 50 move rule saves us", then we should use the value of ep capture.
Credit and thanks to syzygy1 and lantonov !
No functional change (except with syzygy bases)
Resolves#415Resolves#394
This micro-optimization only complicates the code and provides no benefit.
Removing it is even a speedup on my machine (i7-3770k, linux, gcc 4.9.1):
stat test master diff
mean 2,403,118 2,390,904 12,214
stdev 12,043 10,620 3,677
speedup 0.51%
P(speedup>0) 100.0%
No functional change.
Currently Search::RootMoves is accessed and even
modified by TB probing functions in a hidden
and sneaky way.
This is bad practice and makes the code tricky.
Instead explicily pass the vector as function
argument so to clarify that the vector is modified
inside the functions.
No functional change.
Adds support for Syzygy tablebases to Stockfish. See
the Readme for information on using the tablebases.
Tablebase support can be enabled/disabled at the Makefile
level as well, by setting syzygy=yes or syzygy=no.
Big/little endian are both supported.
No functional change (if Tablebases are not used).
Resolves#6