Some of you may remember the Gaia 4.1.0 announcement a few weeks ago. Werner Schüle spotted that Gaia couldn't mate with KQ vs K, Sylwy raised the tablebase question, and Frank Quisinsky put Gaia through its paces in his engine overview. That feedback was the push I needed to tackle endgame play properly.
I've written a clean-room, pure Rust implementation of Nalimov endgame tablebase probing and just published it:
GitHub: https://github.com/jromang/nalimov-rs
Crate: https://crates.io/crates/nalimov
Single file, zero dependencies, MIT licensed. It reads the original .nbw.emd / .nbb.emd compressed files and returns exact distance-to-mate (DTM) values for 3–6 piece endgames. Thread-safe with a built-in LRU block cache and a C API for easy integration into C/C++ engines.
I know Syzygy is the standard today — and deservedly so, Ronald de Man's work is a piece of art. But DTM has its charm: shortest path to mate, no ambiguity, great for analysis and endgame studies. I felt these tables deserved a modern, easily embeddable prober.
It still needs more testing — I've validated it against many positions but the more eyes on it the better. Bug reports and feedback are very welcome.
It will be integrated in the next version of GaiaChess.
For those who don't have Nalimov files anymore, I've uploaded the complete 3-4-5 piece set on Hugging Face. You can grab them with the hf CLI in one command:
hf download --repo-type dataset jromanghf/nalimov-tablebases --local-dir nalimov-tb
Dataset page: https://huggingface.co/datasets/jromang ... tablebases
Thanks to Werner Schüle, Sylwy, Frank Quisinsky and Graham Banks for the feedback that started this!
Cheers,
Jean-François