Skip to content

Commit 70d0091

Browse files
committed
Towards release 1.0 of the Fathom tool.
1 parent 12faf8a commit 70d0091

File tree

3 files changed

+43
-14
lines changed

3 files changed

+43
-14
lines changed

README.md

Lines changed: 29 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,35 @@ are:
99
* To make it easy to create stand-alone applications that use the Syzygy
1010
tablebases;
1111

12-
API
13-
---
12+
Tool
13+
----
14+
15+
Fathom includes a stand-alone command-line syzygy probing tool `fathom`. To
16+
probe a position, simply run the command:
17+
18+
fathom --path=<path-to-TB-files> "FEN-string"
19+
20+
The tool will print out a PGN representation of the probe result, including:
21+
22+
* Result: "1-0" (white wins), "1/2-1/2" (draw), or "0-1" (black wins)
23+
* The Win-Draw-Loss (WDL) value for the next move: "Win", "Draw", "Loss",
24+
"CursedWin" (win but 50-move draw) or "BlessedLoss" (loss but 50-move draw)
25+
* The Distance-To-Zero (DTZ) value (in plys) for the next move
26+
* WinningMoves: The list of all winning moves
27+
* DrawingMoves: The list of all drawing moves
28+
* LosingMoves: The list of all losing moves
29+
* A pseudo "principle variation" of Syzygy vs. Syzygy for the input position.
30+
31+
For more information, run the following command:
32+
33+
fathom --help
34+
35+
Pre-compiled versions of `fathom` (for all platforms) are available from here:
36+
37+
* https://github.com/basil00/Fathom/releases
38+
39+
Programming API
40+
---------------
1441

1542
Fathom provides a simple API. There are three main function calls:
1643

@@ -25,14 +52,6 @@ to provide any additional functionality (e.g. move generation) unlike the
2552
traditional `tbprobe` code. However, chess engines can opt to replace some
2653
of the functionality of Fathom for better performance (see below).
2754

28-
Tool
29-
----
30-
31-
Fathom includes a stand-alone command-line syzygy probing tool `fathom`.
32-
Run the following command for more information:
33-
34-
fathom --help
35-
3655
Chess Engines
3756
-------------
3857

src/Makefile renamed to src/apps/Makefile

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,21 +7,31 @@ ifeq ($(UNAME),Darwin)
77
endif
88
CC=clang
99
STRIP=strip
10-
CFLAGS=-std=gnu99 -O2 -Wall -D TB_NO_THREADS -D TB_NO_HW_POP_COUNT
10+
CFLAGS=-std=gnu99 -O2 -Wall -D TB_NO_THREADS -D TB_NO_HW_POP_COUNT -I..
1111

1212
main: $(TARGET)
1313

1414
fathom.linux:
15-
$(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.linux
15+
$(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.linux
1616
$(STRIP) fathom.linux
1717

1818
fathom.macosx:
19-
$(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.macosx
19+
$(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.macosx
2020
$(STRIP) fathom.macosx
2121

2222
fathom.windows: CC=x86_64-w64-mingw32-gcc
2323
fathom.windows: STRIP=x86_64-w64-mingw32-strip
2424
fathom.windows:
25-
$(CC) $(CFLAGS) fathom.c tbprobe.c -o fathom.exe
25+
$(CC) $(CFLAGS) fathom.c ../tbprobe.c -o fathom.exe
2626
$(STRIP) fathom.exe
2727

28+
INSTALL=Fathom-1.0
29+
PACKAGE=Fathom-1.0.zip
30+
release:
31+
mkdir $(INSTALL)
32+
cp fathom.linux $(INSTALL)
33+
cp fathom.macosx $(INSTALL)
34+
cp fathom.exe $(INSTALL)
35+
zip -r $(PACKAGE) $(INSTALL)
36+
rm -rf $(INSTALL)
37+
File renamed without changes.

0 commit comments

Comments
 (0)