From: Marco Costalba Date: Wed, 27 Feb 2013 07:10:24 +0000 (+0100) Subject: Merge Lucas's "SEE pruning at PV nodes" X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=57b6df4874228ef6f0fc4d9b98e1db15b57000cf;hp=bc38efd1288c8cb25179935998cfa3dc6c9f4410 Merge Lucas's "SEE pruning at PV nodes" bench: 4922272 --- diff --git a/Readme.txt b/Readme.md similarity index 73% rename from Readme.txt rename to Readme.md index 9c80a876..9fd242de 100644 --- a/Readme.txt +++ b/Readme.md @@ -1,5 +1,4 @@ -1. Introduction ---------------- +### Overview Stockfish is a free UCI chess engine derived from Glaurung 2.1. It is not a complete chess program and requires some UCI-compatible GUI @@ -13,41 +12,36 @@ tested thoroughly with more than 4. The program tries to detect the number of CPUs on your computer and sets 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 +*Threads* UCI parameter, and to make sure it equals the number of CPU cores on your computer. If you are using more than eight threads, it is -recommended to raise the value of the "Min Split Depth" UCI parameter to -7. +recommended to raise the value of the *Min Split Depth* UCI parameter to 7. -2. Files --------- +### Files This distribution of Stockfish consists of the following files: - * Readme.txt, the file you are currently reading. + * Readme.md, 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. + * 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 below. * polyglot.ini, for using Stockfish with Fabien Letouzey's PolyGlot adapter. -3. Opening books ----------------- +### Opening books This version of Stockfish has 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 "Book File" +documentation. The book file can be selected by setting the *Book File* UCI parameter. -4. Compiling it yourself ------------------------- +### Compiling it yourself On Unix-like systems, it should be possible to compile Stockfish directly from the source code with the included Makefile. @@ -55,17 +49,16 @@ directly from the source code with the included Makefile. Stockfish has support for 32 or 64-bit CPUs, the hardware POPCNT instruction, big-endian machines such as Power PC, and other platforms. -In general it is recommended to run 'make help' to see a list of make +In general it is recommended to run `make help` to see a list of make targets with corresponding descriptions. When not using Makefile to compile (for instance with Microsoft MSVC) you need to manually -set/unset some switches in the compiler command line; see file "types.h" +set/unset some switches in the compiler command line; see file *types.h* for a quick reference. -5. Terms of use ---------------- +### Terms of use -Stockfish is free, and distributed under the GNU General Public License +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 @@ -78,4 +71,4 @@ 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. +*Copying.txt* diff --git a/src/Makefile b/src/Makefile index 6c90ac2b..b23d671f 100644 --- a/src/Makefile +++ b/src/Makefile @@ -256,6 +256,10 @@ endif ### 3.3 General linker settings LDFLAGS = $(EXTRALDFLAGS) +ifeq ($(comp),mingw) + LDFLAGS += -static-libstdc++ -static-libgcc +endif + ### On mingw use Windows threads, otherwise POSIX ifneq ($(comp),mingw) # Haiku has pthreads in its libroot, so only link it in on other platforms diff --git a/src/misc.cpp b/src/misc.cpp index e47e3775..c0c00b00 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -31,16 +31,16 @@ using namespace std; /// Version number. If Version is left empty, then Tag plus current -/// date (in the format YYMMDD) is used as a version number. +/// date, in the format DD-MM-YY, are used as a version number. static const string Version = ""; static const string Tag = ""; -/// engine_info() returns the full name of the current Stockfish version. -/// This will be either "Stockfish YYMMDD" (where YYMMDD is the date when -/// the program was compiled) or "Stockfish ", depending -/// on whether Version is empty. +/// engine_info() returns the full name of the current Stockfish version. This +/// will be either "Stockfish DD-MM-YY" (where DD-MM-YY is the date when +/// the program was compiled) or "Stockfish ", depending on whether +/// Version is empty. const string engine_info(bool to_uci) { @@ -57,8 +57,8 @@ const string engine_info(bool to_uci) { { date >> month >> day >> year; - s << Tag << setfill('0') << " " << year.substr(2) - << setw(2) << (1 + months.find(month) / 4) << setw(2) << day; + s << Tag << string(Tag.empty() ? "" : " ") << setfill('0') << setw(2) << day + << "-" << setw(2) << (1 + months.find(month) / 4) << "-" << year.substr(2); } s << cpu64 << popcnt << (to_uci ? "\nid author ": " by ") diff --git a/src/pawns.cpp b/src/pawns.cpp index fca33f28..c1a93169 100644 --- a/src/pawns.cpp +++ b/src/pawns.cpp @@ -231,7 +231,7 @@ Value Entry::shelter_storm(const Position& pos, Square ksq) { Rank rkUs, rkThem; File kf = file_of(ksq); - kf = (kf == FILE_A) ? kf++ : (kf == FILE_H) ? kf-- : kf; + kf = (kf == FILE_A) ? FILE_B : (kf == FILE_H) ? FILE_G : kf; for (int f = kf - 1; f <= kf + 1; f++) {