All Projects → niklasf → lila-tablebase

niklasf / lila-tablebase

Licence: AGPL-3.0 license
Tablebase server

Programming Languages

rust
11053 projects
python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to lila-tablebase

lila-gif
Webservice to render Gifs of chess positions and games, and stream them frame by frame
Stars: ✭ 63 (+23.53%)
Mutual labels:  chess, lichess, http-api
lila-openingexplorer
Opening explorer for lichess.org that can handle all the variants and billions of unique positions
Stars: ✭ 89 (+74.51%)
Mutual labels:  chess, lichess, http-api
shakmaty-syzygy
A Rust library to probe Syzygy endgame tablebases
Stars: ✭ 14 (-72.55%)
Mutual labels:  chess, syzygy
chessops
Chess and chess variant rules and operations in TypeScript
Stars: ✭ 66 (+29.41%)
Mutual labels:  chess, lichess
should-i-play-f6
Chess project to analyze the statistical effect of playing f3 (as white) or f6 (as black) on the outcome of the game.
Stars: ✭ 15 (-70.59%)
Mutual labels:  chess, lichess
chess-openings
An aggregated data set of chess opening names
Stars: ✭ 223 (+337.25%)
Mutual labels:  chess, lichess
liground
A free, open-source and modern Chess Variant Analysis GUI for the 21st century
Stars: ✭ 41 (-19.61%)
Mutual labels:  chess, lichess
Lila
♞ lichess.org: the forever free, adless and open source chess server ♞
Stars: ✭ 10,315 (+20125.49%)
Mutual labels:  chess, lichess
bot-o-tron
Try out lichess' bot interface
Stars: ✭ 36 (-29.41%)
Mutual labels:  chess, lichess
chessground
Chessground React Wrapper
Stars: ✭ 15 (-70.59%)
Mutual labels:  chess, lichess
pgn-tactics-generator
Generate chess puzzles / tactics from a pgn file
Stars: ✭ 83 (+62.75%)
Mutual labels:  chess, lichess
liPGN
This program uses the lichess REST API to retrieve all the games of a user and transform them into a big PGN file that you can then import into your favourite game analysis tool (ie. scid)
Stars: ✭ 14 (-72.55%)
Mutual labels:  chess, lichess
stockfish.js
The strong open source chess engine Stockfish compiled to JavaScript and WebAssembly using Emscripten
Stars: ✭ 140 (+174.51%)
Mutual labels:  chess, lichess
chessboard-recognizer
Uses neural networks to extract chess positions from images
Stars: ✭ 59 (+15.69%)
Mutual labels:  chess
Chessman
Chess analysis Universal Windows 10 application.
Stars: ✭ 14 (-72.55%)
Mutual labels:  chess
azure-event-driven-data-pipeline
Building event-driven data ingestion pipelines in Azure
Stars: ✭ 13 (-74.51%)
Mutual labels:  http-api
lila-ws
Lichess' websocket server
Stars: ✭ 99 (+94.12%)
Mutual labels:  lichess
tea-chess
A chess-themed tutorial on writing an SPA in Bucklescript-TEA
Stars: ✭ 28 (-45.1%)
Mutual labels:  chess
bevy chess
Chess demo in Bevy
Stars: ✭ 59 (+15.69%)
Mutual labels:  chess
shogi-pieces
Shogi (Japanese Chess) pieces and boards
Stars: ✭ 25 (-50.98%)
Mutual labels:  chess

lila-tablebase

Check

Tablebase server for lichess.org, based on shakmaty-syzygy.

Usage

lila-tablebase

USAGE:
    lila-tablebase [OPTIONS]

OPTIONS:
        --standard <STANDARD>...      Directory with tablebase files for standard chess
        --antichess <ANTICHESS>...    Directory with tablebase files for antichess
        --atomic <ATOMIC>...          Directory with tablebase files for atomic chess
        --gaviota <GAVIOTA>...        Directory with Gaviota tablebase files
        --bind <BIND>                 Listen on this socket address [default: 127.0.0.1:9000]
    -h, --help                        Print help information

HTTP API

GET /standard

curl http://tablebase.lichess.ovh/standard?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1
name type default description
fen string required FEN of the position. Underscores allowed.
{
  "dtz": 1, // dtz50'' with rounding or null if unknown
  "precise_dtz": 1, // dtz50'' (only if guaranteed to be not rounded) or null if unknown
  "dtm": 17, // depth to mate or null if unknown
  "checkmate": false,
  "stalemate": false,
  "variant_win": false, // only in chess variants (atomic, antichess)
  "variant_loss": false, // only in chess variants
  "insufficient_material": false,
  "category": "win", // win, unknown, maybe-win, cursed-win, draw, blessed-loss, maybe-loss, loss
  "moves": [ // information about legal moves, best first
    {
      "uci": "h7h8q",
      "san": "h8=Q+",
      "dtz": -2,
      "precise_dtz": -2,
      "dtm": -16,
      "zeroing": true,
      "checkmate": false,
      "stalemate": false,
      "variant_win": false,
      "variant_loss": false,
      "insufficient_material": false,
      "category": "loss" // loss, unknown, maybe-loss, blessed-loss, draw, cursed-win, maybe-win, win
    },
    // ...
  ]
}

GET /standard/mainline

curl http://tablebase.lichess.ovh/standard/mainline?fen=4k3/6KP/8/8/8/8/7p/8_w_-_-_0_1
name type default description
fen string required FEN of the position. Underscores allowed.
{
  "dtz": 1,
  "mainline": [ // dtz mainline or empty if drawn
    { "uci": "h7h8q", "san": "h8=Q+", "dtz": -2 },
    { "uci": "e8d7", "san": "Kd7", "dtz": 1 },
    { "uci": "h8h2", "san": "Qxh2", "dtz": -14 },
    { "uci": "d7c6", "san": "Kc6", "dtz": 13 },
    { "uci": "h2e5", "san": "Qe5", "dtz": -12 },
    { "uci": "c6b6", "san": "Kb6", "dtz": 11 },
    { "uci": "g7f6", "san": "Kf6", "dtz": -10 },
    { "uci": "b6a6", "san": "Ka6", "dtz": 9 },
    { "uci": "e5b2", "san": "Qb2", "dtz": -8 },
    { "uci": "a6a5", "san": "Ka5", "dtz": 7 },
    { "uci": "f6e5", "san": "Ke5", "dtz": -6 },
    { "uci": "a5a4", "san": "Ka4", "dtz": 5 },
    { "uci": "e5d4", "san": "Kd4", "dtz": -4 },
    { "uci": "a4a5", "san": "Ka5", "dtz": 3 },
    { "uci": "d4c5", "san": "Kc5", "dtz": -2 },
    { "uci": "a5a4", "san": "Ka4", "dtz": 1 },
    { "uci": "b2a2", "san": "Qa2#", "dtz": -1 }
  ],
  "winner": "w" // (w) white, (b) black, (null) draw
}

Claims draw by 50-move rule as soon as possible and ends the mainline. Error 404 if not a tablebase position or required tables not present.

GET /atomic

GET /antichess

Acknowledgements

Thanks to Ronald de Man for his Syzygy endgame tables. Thanks to Bojun Guo for generating and sharing 7-piece tables.

License

lila-tablebase is licensed under the GNU Affero General Public License 3.0 (or any later version at your option). See the COPYING file for the full license text.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].