From: Fabian Fichter Date: Sat, 15 Aug 2020 14:06:57 +0000 (+0200) Subject: Exclude Game of the Amazons by default X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=b6e772bf5ad6209b841d5ffa981a2bef1d95df7f;p=fairystockfish.git Exclude Game of the Amazons by default Avoids big stack size for standard builds. --- diff --git a/.travis.yml b/.travis.yml index 4a34f22..73bfc1c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -41,12 +41,12 @@ before_script: script: # Check perft of large-board version - - make clean && make -j2 ARCH=x86-64 largeboards=yes debug=yes build && ../tests/perft.sh largeboard + - make clean && make -j2 ARCH=x86-64 largeboards=yes all=yes debug=yes build && ../tests/perft.sh largeboard - ./stockfish bench xiangqi > /dev/null 2>&1 - ./stockfish bench shogi > /dev/null 2>&1 - ./stockfish bench capablanca > /dev/null 2>&1 - ./stockfish bench sittuyin > /dev/null 2>&1 - - make clean && make -j2 ARCH=x86-32 largeboards=yes debug=yes build && ../tests/perft.sh largeboard + - make clean && make -j2 ARCH=x86-32 largeboards=yes all=yes debug=yes build && ../tests/perft.sh largeboard # # Obtain bench reference from git log - git log HEAD | grep "\b[Bb]ench[ :]\+[0-9]\{7\}" | head -n 1 | sed "s/[^0-9]*\([0-9]*\).*/\1/g" > git_sig diff --git a/src/Makefile b/src/Makefile index a40231d..a5fdd65 100644 --- a/src/Makefile +++ b/src/Makefile @@ -75,6 +75,7 @@ endif ### 2.1. General and architecture defaults largeboards = no +all = no precomputedmagics = yes optimize = yes debug = no @@ -167,6 +168,11 @@ ifneq ($(largeboards),no) endif endif +# Enable all variants, even heavyweight ones like amazons +ifneq ($(all),no) + CXXFLAGS += -DALLVARS +endif + ifeq ($(COMP),) COMP=gcc endif @@ -426,10 +432,14 @@ help: @echo "make build ARCH=x86-64 COMP=clang" @echo "make profile-build ARCH=x86-64-bmi2 COMP=gcc COMPCXX=g++-4.8" @echo "" - @echo "Version for large boards (only GCC and mingw, 64-bit required): " + @echo "Version for large boards: " @echo "" @echo "make build ARCH=x86-64 COMP=gcc largeboards=yes" @echo "" + @echo "Include all variants: " + @echo "" + @echo "make build ARCH=x86-64 largeboards=yes all=yes" + @echo "" .PHONY: help build profile-build strip install clean objclean profileclean \ diff --git a/src/types.h b/src/types.h index 9f0229d..9c8712b 100644 --- a/src/types.h +++ b/src/types.h @@ -218,7 +218,11 @@ typedef uint64_t Bitboard; constexpr int SQUARE_BITS = 6; #endif +#ifdef ALLVARS constexpr int MAX_MOVES = 4096; +#else +constexpr int MAX_MOVES = 1024; +#endif constexpr int MAX_PLY = 246; /// A move needs 16 bits to be stored diff --git a/src/variant.cpp b/src/variant.cpp index 3e4bddf..7724b4c 100644 --- a/src/variant.cpp +++ b/src/variant.cpp @@ -837,6 +837,7 @@ namespace { "pPpPpPpPpP/PpPpPpPpPp/pPpPpPpPpP/PpPpPpPpPp/pPpPpPpPpP w 0 1"; return v; } +#ifdef ALLVARS // Game of the Amazons // https://en.wikipedia.org/wiki/Game_of_the_Amazons Variant* amazons_variant() { @@ -852,6 +853,7 @@ namespace { v->arrowGating = true; return v; } +#endif Variant* xiangqi_variant() { Variant* v = minixiangqi_variant(); v->pieceToCharTable = "PN.R.AB..K.C..........pn.r.ab..k.c.........."; @@ -1021,7 +1023,9 @@ void VariantMap::init() { add("grand", grand_variant()); add("shako", shako_variant()); add("clobber10", clobber10_variant()); +#ifdef ALLVARS add("amazons", amazons_variant()); +#endif add("xiangqi", xiangqi_variant()); add("manchu", manchu_variant()); add("supply", supply_variant());