diff --git a/README.md b/README.md index 5d22b18..5b20015 100644 --- a/README.md +++ b/README.md @@ -9,8 +9,35 @@ are: * To make it easy to create stand-alone applications that use the Syzygy tablebases; -API ---- +Tool +---- + +Fathom includes a stand-alone command-line syzygy probing tool `fathom`. To +probe a position, simply run the command: + + fathom --path= "FEN-string" + +The tool will print out a PGN representation of the probe result, including: + +* Result: "1-0" (white wins), "1/2-1/2" (draw), or "0-1" (black wins) +* The Win-Draw-Loss (WDL) value for the next move: "Win", "Draw", "Loss", + "CursedWin" (win but 50-move draw) or "BlessedLoss" (loss but 50-move draw) +* The Distance-To-Zero (DTZ) value (in plys) for the next move +* WinningMoves: The list of all winning moves +* DrawingMoves: The list of all drawing moves +* LosingMoves: The list of all losing moves +* A pseudo "principle variation" of Syzygy vs. Syzygy for the input position. + +For more information, run the following command: + + fathom --help + +Pre-compiled versions of `fathom` (for all platforms) are available from here: + +* https://github.com/basil00/Fathom/releases + +Programming API +--------------- Fathom provides a simple API. There are three main function calls: @@ -25,14 +52,6 @@ to provide any additional functionality (e.g. move generation) unlike the traditional `tbprobe` code. However, chess engines can opt to replace some of the functionality of Fathom for better performance (see below). -Tool ----- - -Fathom includes a stand-alone command-line syzygy probing tool `fathom`. -Run the following command for more information: - - fathom --help - Chess Engines ------------- diff --git a/src/Makefile b/src/apps/Makefile similarity index 53% rename from src/Makefile rename to src/apps/Makefile index e2eab7a..f07abd2 100644 --- a/src/Makefile +++ b/src/apps/Makefile @@ -7,21 +7,31 @@ ifeq ($(UNAME),Darwin) endif CC=clang STRIP=strip -CFLAGS=-std=gnu99 -O2 -Wall -D TB_NO_THREADS -D TB_NO_HW_POP_COUNT +CFLAGS=-std=gnu99 -O2 -Wall -D TB_NO_THREADS -D TB_NO_HW_POP_COUNT -I.. main: $(TARGET) fathom.linux: - $(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.linux + $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.linux $(STRIP) fathom.linux fathom.macosx: - $(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.macosx + $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.macosx $(STRIP) fathom.macosx fathom.windows: CC=x86_64-w64-mingw32-gcc fathom.windows: STRIP=x86_64-w64-mingw32-strip fathom.windows: - $(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.exe + $(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.exe $(STRIP) fathom.exe +INSTALL=Fathom-1.0 +PACKAGE=Fathom-1.0.zip +release: + mkdir $(INSTALL) + cp fathom.linux $(INSTALL) + cp fathom.macosx $(INSTALL) + cp fathom.exe $(INSTALL) + zip -r $(PACKAGE) $(INSTALL) + rm -rf $(INSTALL) + diff --git a/src/fathom.c b/src/apps/fathom.c similarity index 100% rename from src/fathom.c rename to src/apps/fathom.c