Wire Fathom into the local tablebase backend (#30)

Add Backend.Fathom: probes positions with five or fewer pieces via the Fathom NIF, maps WDL/DTZ to the trainer structs (flipping per-move perspective), generates SAN, sorts moves best-first, and falls back to Lichess on any failure. The local directory is configured with TABLEBASE_PATH; local answers are no longer cached.

Add Tablebase.normalize_wdl/1 and flip/1, plus tests for the WDL mapping, SAN, checkmate, fallback, and a cache-free end-to-end local probe.
This commit is contained in:
2026-11-03 14:23:46 +01:00
parent e60c161a3a
commit cb35351f8c
11 changed files with 430 additions and 5 deletions
+3
View File
@@ -1,5 +1,8 @@
import Config
# Point the local Fathom backend at the committed 3-piece fixtures.
config :chesstrainer, :tablebase_path, Path.expand("../test/fixtures/tablebase", __DIR__)
# Configure your database
#
# The MIX_TEST_PARTITION environment variable can be used