|
Cute Chess
0.1
|
A wrapper for probing Syzygy endgame tablebases. More...
#include <syzygytablebase.h>
Public Types | |
| enum | CastlingFlag { NoCastling = 0x0, WhiteKingSide = 0x8, WhiteQueenSide = 0x4, BlackKingSide = 0x2, BlackQueenSide = 0x1 } |
| typedef QList< QPair< Chess::Square, Chess::Piece > > | PieceList |
Static Public Member Functions | |
| static bool | initialize (const QString &paths) |
| static Chess::Result | result (const Chess::Side &side, const Chess::Square &enpassantSq, Castling castling, int rule50, const PieceList &pieces, unsigned int *dtz=nullptr) |
| static void | setNoRule50 () |
| static void | setPieces (int pieces) |
| static bool | tbAvailable (int pieces) |
A wrapper for probing Syzygy endgame tablebases.
Syzygy tablebases are heavily compressed tables that contain the expected result and "distance to zero" information for positions where only 2-6 pieces are left on the board. The tablebases can be used to adjudicate games or to provide perfect play in endgame positions. The Syzygy tablebases take the 50-move-rule into account. Syzygy tablebases can only be used in standard chess and Fischer Random chess.
| typedef QList< QPair<Chess::Square, Chess::Piece> > SyzygyTablebase::PieceList |
Synonym for QList< QPair<Chess::Square, Chess::Piece> >.
|
static |
Initializes the tablebases.
Returns true if successful; otherwise returns false.
The tablebases should be located in the directories listed in paths.
|
static |
Returns the expected game result for the positions specified by side, enpassantSq, castling and pieces.
If the position is a win for either player, dtz is set to the distance to zero, ie. the number of plies it takes to force a non-reversible move or mate.
If the position isn't found in the tablebases, a null result is returned.
|
static |
Disable the 50 move rule from consideration.
|
static |
Set the maximum number of pieces to be used for tablebase adjudication. Default is no limit.
|
static |
Returns true if complete tablebases for pieces pieces are available; otherwise returns false.
1.8.11