Pyrrhic-rs
pyrrhic-rs
is a library for use in chess engines to probe the Syzygy endgame tablesbases during a search.
Usage
Pyrrhic's original API is unsafe, with potential for memory corruption if used improperly. Therefore pyrrhic-rs
wraps this unsafe API in the TableBases
struct, which guards against memory- and thread-unsafe usage of the Pyrrhic API.
As pyrrhic-rs
is designed to be used within an existing engine, the user must implement the EngineAdapter
trait on a type for the probing code to be able to use the engine's own move generation code. Afterwards, Tablebases::new()
can be called using this type as a parameter.
Example using cozy_chess
:
use *;
;
Copyright
pyrrhic-rs
was initially transliterated from the original Pyrrhic library in C, and is therefore subject to the following copyrights:
- Fathom © 2015 basil, all rights reserved
- Modifications Copyright © 2016-2019 by Jon Dart
- Modifications Copyright © 2020-2020 by Andrew Grant
Acknowledgments
- Ronald "Syzygy" de Man, creator of the Syzygy tablebases
- C2Rust, used to initally translate the C code into Rust code