Marco Costalba 36437f14e8 Disable POPCNT support per default
This is mainly intended to allow 64 bit compiles on any
system and avoid to crash when the binary, compiled on a
box where POPCNT is not supported, is run on a Core i7
system or similar CPU.

What could happen is that when compiled in a standard 64 bit
system, because the correct headers for the POPCNT intrinsic
are not found, the compiler creates dummy bit count functions
instead, these are never called at runtime on the machine where
Stockfish has been compiled. But if we run the same binary on a
Core i7 system, because POPCNT is detected at run time, the dummy
bitcount functions will be called giving false results that will
crash the application.

Note that would be possible to fallback on software bit count in
these cases, but this is even more subtle because POPCNT path is not
optimized so that we have an application working but at sub-optimal
speed, so better to crash, at least user is loudly warned that there
is something wrong.

If, instead, Stockfish is compiled on a Core i7 system with POPCNT
enabled, then if the PGO compile has been done properly, the same binary
will run at optimal speed _both_ on the Core i7 machine and on any other
64 bit standard machine. This is the ideal mode for binary distribution.

Finally this patch disables bsfq support under Windows, because it seems
inline assembly is not supported both by MSVC and by Intel Windows version.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
2009-07-04 09:20:28 +01:00
2009-07-04 09:20:28 +01:00
2008-09-01 07:59:13 +02:00
2009-04-30 15:16:35 +01:00
2009-07-04 09:20:28 +01:00

1. Introduction

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



Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is

not a complete chess program, but requires some UCI compatible GUI

(like XBoard with PolyGlot, eboard, Jos, Arena, Sigma Chess, Shredder,

Chess Partner, or Fritz) in order to be used comfortably.  Read the

documentation for your GUI of choice for information about how to use

Stockfish with your GUI.



This version of Stockfish supports up to 8 CPUs, but has not been

tested thoroughly with more than 2.  The program tries to detect the

number of CPUs on your computer and set the number of search threads

accordingly, but please be aware that the detection is not always

correct.  It is therefore recommended to inspect the value of the

"Threads" UCI parameter, and to make sure it equals the number of CPU

cores on your computer.





2. Files

--------



This distribution of Stockfish consists of the following files:



  * Readme.txt, the file you are currently reading.



  * Copying.txt, a text file containing the GNU General Public

    License.



  * src/, a subdirectory containing the full source code, including a

    Makefile that can be used to compile Stockfish on Unix-like

    systems.  For further information about how to compile Stockfish

    yourself, read section 4 below.



  * polyglot.ini, for using Stockfish with Fabien Letouzey's PolyGlot

    adapter.





3. Opening books

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



This version of Stockfish has experimental support for PolyGlot opening

books. For information about how to create such books, consult the

PolyGlot documentation.  The book file can be selected by setting the

UCI parameter "Book File".





4. Compiling it yourself

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



On Unix-like systems, it should usually be possible to compile

Stockfish directly from the source code with the included Makefile.

The exception is computer with big-endian CPUs, like PowerPC

Macintoshes. Some of the bitboard routines in the current version of

Stockfish are endianness-sensitive, and won't work on a big-endian CPU.



Stockfish has POPCNT instruction runtime detection and support. This can

give an extra speed on Core i7 or similar systems. To enable this feature

(disabled by default) simply uncomment #define USE_POPCNT in bitcount.h

before to compile.



On 64 bit Unix-like systems the 'bsfq' assembly instruction will be used

for bit counting. Detection is automatic at compile time, but in case you

experience compile problems you can comment out #define USE_BSFQ line in types.h





5. Terms of use

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



Stockfish is free, and distributed under the GNU General Public License

(GPL).  Essentially, this means that you are free to do almost exactly

what you want with the program, including distributing it among your

friends, making it available for download from your web site, selling

it (either by itself or as part of some bigger software package), or

using it as the starting point for a software project of your own.



The only real limitation is that whenever you distribute Stockfish in

some way, you must always include the full source code, or a pointer

to where the source code can be found.  If you make any changes to the

source code, these changes must also be made available under the GPL.



For full details, read the copy of the GPL found in the file named

Copying.txt.





6. Feedback

-----------



The author's e-mail address is mcostalba@gmail.com

S
Description
A free and strong UCI chess engine
Readme 20 MiB
Languages
C++ 88.3%
Makefile 4.2%
Python 4%
C 2.2%
Shell 1.3%