io-chess
UCI chess engine
Loading...
Searching...
No Matches
Tablebase.h File Reference

Syzygy tablebase probing via Fathom. More...

#include "../Types.h"
#include <string>
#include <optional>
Include dependency graph for Tablebase.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

namespace  Tablebase

Enumerations

enum class  Tablebase::WDL {
  Tablebase::WIN = 2 , Tablebase::CURSED_WIN = 1 , Tablebase::DRAW = 0 , Tablebase::BLESSED_LOSS = -1 ,
  Tablebase::LOSS = -2
}
 Tablebase probe result for Win-Draw-Loss. More...

Functions

bool Tablebase::init (const std::string &path)
 Initializes tablebases with the given path.
bool Tablebase::available (const Board &board)
 Checks if a position is within the tablebase piece limits.
std::optional< WDLTablebase::probeWDL (const Board &board)
 Probes the Win-Draw-Loss (WDL) table.
std::optional< std::tuple< Move, WDL, int > > Tablebase::probeRoot (const Board &board)
 Probes the Distance-to-Zero (DTZ) table for root moves.
int Tablebase::wdlToScore (WDL wdl, int mate_ply)
 Converts a WDL result to a centipawn score for search evaluation.
int Tablebase::maxPieces ()
 Gets the maximum number of pieces supported by the loaded tablebases.
bool Tablebase::isInitialized ()
 Checks if tablebases have been successfully initialized.

Detailed Description

Syzygy tablebase probing via Fathom.

Provides WDL (Win-Draw-Loss) and DTZ (Distance to Zero) lookups for endgame positions using the Fathom library.