mwg API
    Preparing search index...

    Type Alias TablebaseExtra

    TablebaseExtra: "queen" | "rook" | "bishop" | "knight"

    Pawnless endgame tablebases: WDL outcomes with distance-to-mate, generated by tools/build-tablebases.mjs and probed here. This module ships the probe logic and no table: even a 4-piece ending is megabytes of positions, so a game loads only the endings it wants and keeps them out of the browser bundle otherwise.

    Scope is exactly white extras against a lone black king (KQK, KRK, KBK, KNK, KQBK, ...): no pawns, no castling rights, nothing for the black side but its king. Anything outside that is a miss (null), never an error.

    Positions are indexed square-major in a fixed piece order (white king, white extras strongest-first, black king) times the side to move. Values are side-to-move-relative: 0 unknown (illegal sub-positions only), 1 loss, 2 draw, 3 win. The fifty-move rule is adjudicated at probe time from the stored distance: a win too far to force inside the remaining halfmoves is reported a draw (cursed), and likewise a loss too far away (blessed).