Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Forward all top-level make targets to the engine build system in src/
.PHONY: default

default:
$(MAKE) -C src

%:
$(MAKE) -C src $@
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
else:
args = ["-std=c++17", "-flto", "-Wno-date-time"]

args.extend(["-DLARGEBOARDS", "-DALLVARS", "-DPRECOMPUTED_MAGICS", "-DNNUE_EMBEDDING_OFF"])
args.extend(["-DVERY_LARGE_BOARDS", "-DALLVARS", "-DNNUE_EMBEDDING_OFF"])

Comment on lines 12 to 16
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] Extend wide-board FEN parser to VERY_LARGE_BOARDS

Switching the Python extension to compile with -DVERY_LARGE_BOARDS (setup.py line 15) enables 12×12 Omega FENs that contain multi‑digit empty counts such as *10*. The parser in Position::set() only accepts two‑digit numbers when LARGEBOARDS is defined, so the new build falls back to the 8×8 logic and reads 10 as two separate digits. That leaves each rank two squares short and produces an invalid position before any move is played. The Omega start position added in this commit will therefore be misloaded. Please gate the two‑digit handling with || defined(VERY_LARGE_BOARDS) wherever FEN parsing depends on board width.

Useful? React with 👍 / 👎.

if "64bit" in platform.architecture():
args.append("-DIS_64BIT")
Expand Down
48 changes: 30 additions & 18 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ endif

### 2.1. General and architecture defaults
largeboards = no
verylargeboards = no
all = no
precomputedmagics = yes
nnue = no
Expand Down Expand Up @@ -336,11 +337,15 @@ CXXFLAGS += -Wno-profile-instr-out-of-date

# Compile version with support for large board variants
# Use precomputed magics by default if pext is not available
ifneq ($(verylargeboards),no)
largeboards = no
CXXFLAGS += -DVERY_LARGE_BOARDS
endif
ifneq ($(largeboards),no)
CXXFLAGS += -DLARGEBOARDS
ifeq ($(precomputedmagics),yes)
CXXFLAGS += -DPRECOMPUTED_MAGICS
endif
CXXFLAGS += -DLARGEBOARDS
ifeq ($(precomputedmagics),yes)
CXXFLAGS += -DPRECOMPUTED_MAGICS
endif
endif

# Embed and enable NNUE
Expand All @@ -361,9 +366,11 @@ ifeq ($(COMP),gcc)
comp=gcc
CXX=g++
CXXFLAGS += -Wextra -Wshadow
ifeq ($(largeboards),no)
CXXFLAGS += -pedantic
endif
ifeq ($(largeboards),no)
ifeq ($(verylargeboards),no)
CXXFLAGS += -pedantic
endif
endif

ifeq ($(arch),$(filter $(arch),armv7 armv8))
ifeq ($(OS),Android)
Expand Down Expand Up @@ -775,14 +782,18 @@ else
@echo "make build ARCH=x86-64 nnue=yes"
@echo ""
@echo "-------------------------------"
@echo "Version for large boards: "
@echo ""
@echo "make build ARCH=x86-64 COMP=gcc largeboards=yes"
@echo ""
@echo "Include all variants (adds Game of the Amazons): "
@echo ""
@echo "make build ARCH=x86-64 largeboards=yes all=yes"
@echo ""
@echo "Version for large boards: "
@echo ""
@echo "make build ARCH=x86-64 COMP=gcc largeboards=yes"
@echo ""
@echo "Version for very large boards: "
@echo ""
@echo "make build ARCH=x86-64 COMP=gcc verylargeboards=yes"
@echo ""
@echo "Include all variants (adds Game of the Amazons): "
@echo ""
@echo "make build ARCH=x86-64 largeboards=yes all=yes"
@echo ""
endif


Expand Down Expand Up @@ -900,9 +911,10 @@ config-sanity: $(load_net)
@echo "vnni512: '$(vnni512)'"
@echo "neon: '$(neon)'"
@echo ""
@echo "Fairy-Stockfish specific:"
@echo "largeboards: '$(largeboards)'"
@echo "all: '$(all)'"
@echo "Fairy-Stockfish specific:"
@echo "largeboards: '$(largeboards)'"
@echo "verylargeboards: '$(verylargeboards)'"
@echo "all: '$(all)'"
@echo "precomputedmagics: '$(precomputedmagics)'"
@echo "nnue: '$(nnue)'"
@echo ""
Expand Down
2 changes: 1 addition & 1 deletion src/bitbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ bool Bitbases::probe(Square wksq, Square wpsq, Square bksq, Color stm) {

void Bitbases::init() {

#ifdef LARGEBOARDS
#if defined(LARGEBOARDS) || defined(VERY_LARGE_BOARDS)
// Bitbases are not working for large-board version
return;
#endif
Expand Down
Loading
Loading