Repository navigation
Add ChessTB tablebase support - #1194
Open
noobpwnftw wants to merge 1 commit into
Open
noobpwnftw wants to merge 1 commit into
noobpwnftw wants to merge 1 commit into
Conversation
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
7 times, most recently
from
July 1, 2026 01:08
a252d4c to
228bac6
Compare
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
22 times, most recently
from
August 15, 2026 02:34
836a63f to
838e047
Compare
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
from
August 16, 2026 16:17
838e047 to
661cc2e
Compare
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
18 times, most recently
from
August 26, 2026 14:22
2d82206 to
1f3a291
Compare
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
6 times, most recently
from
September 5, 2026 14:49
534e1b8 to
25a5747
Compare
noobpwnftw
force-pushed
the
add-chesstb-tablebases
branch
4 times, most recently
from
September 25, 2026 03:23
07b6259 to
c4484e8
Compare
Add chess.chesstb for WDL, DTZ, DTC, DTM and DTM50 probing, with memory-mapped tables, block caching and concurrent reads. Support castling tables, opposing pawn pairs and reconstruction of omitted frames. Build pawn-slice indexes with bitsets and per-material locks. Include API documentation, fixture tables and tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds
chess.chesstb, a pure-Python reader for ChessTB endgame tables: WDL, DTZ, DTC, DTM and DTM50.Tables are memory-mapped and decoded in blocks behind a shared cache.
Tablebasesupports concurrent probes, castling tables, opposing pawn pairs, en passant and reconstruction of omitted frames. DTC and DTM50 packs supply their embedded DTZ and DTM values when present. There are no new required dependencies; installedlz4is used for faster WDL decoding.Pawn-slice indexes use bitsets with the same numbering as the C++ generator. Index construction is synchronized per material. For the six-pawn opposing-pair material, construction takes 0.80 seconds instead of 151 seconds locally; the complete 152.7-million-cell bitmap and rank directory match the original implementation exactly.
Includes API documentation, fixture tables and 31 tests in
ChesstbTestCase. All pass locally, including enumeration checks for pawn indexes and concurrent index construction. Existing validation against the C++ prober covered all 145 shipped materials up to five pieces, with additional checks for clocked metrics, dropped frames, loss-only tables and en passant.ChessTB DTZ values are plain distances; unlike Syzygy's encoding, their magnitude does not carry the cursed/blessed WDL class. DTC returns
(pawn pushes owed, signed plies)at the requested halfmove clock.