Opening explorer for lichess.org

Overview

lila-openingexplorer3

Personal opening explorer under development.

Usage

EXPLORER_LOG=lila_openingexplorer3=debug cargo run --release -- --lila https://lichess:***@lichess.dev --bearer lip_***

HTTP API

Example:

curl http://localhost:9000/personal?player=foo&color=white&play=e2e4&update=true

Query parameters:

name type default description
variant string chess antichess, atomic, chess (or standard, chess960, fromPosition), crazyhouse, horde, kingOfTheHill, racingKings, threeCheck
fen string starting position of variant FEN of the root position
play string empty Comma separated moves in UCI notation. Play additional moves starting from fen. Required to find an opening name, if fen is not an exact match for a named position.
player string required Username to filter for
color string required Filter for games where player is white or black
modes string all Comma separated list of game modes (rated, casual) to filter for
speeds string all Comma separated list of speeds (ultraBullet, bullet, blitz, rapid, classical, correspondence) to filter for
since string 0000/01 Year/Month. Filter for games played in this month or later
until string 3000/12 Year/Month. Filter for games played in this month or earlier
update bool false Index new games from lila

Response: Streamed application/x-ndjson with rows as follows.

If update has not been requested the stream immediately terminates after the first row. Otherwise updated rows will be streamed until indexing has been completed. Updates are throttled. The same row may be repeated to avoid timeouts.

{
    "white": 10, // total number of white wins from this position
    "draws": 1,
    "black": 22,
    "moves": [
        {
            "uci": "e7e5",
            "san": "e5",
            "white": 6, // total number of white wins with this move.
                        // more may transpose to resulting position.
            "draws": 1,
            "black": 9,
            "game": { // latest game for this move.
                      // perhaps useful to show when it is the only game
                      // for the move
                "id": "uPdCG6Ts",
                "winner": "black",
                "speed": "correspondence",
                "rated": false,
                "white": {
                    "name": "foo",
                    "rating": 1500
                },
                "black": {
                    "name": null,
                    "rating": null
                },
                "month": "2015/09"
            }
        },
        // ...
    ],
    "recentGames": [ // currently up to 15 recent games.
                     // limit is up to discussion.
        {
            "uci": "e7e5",
            "id": "uPdCG6Ts",
            "winner": "black",
            "speed": "correspondence",
            "rated": false,
            "white": {
                "name": "foo",
                "rating": 1500
            },
            "black": {
                "name": null,
                "rating": null
            },
            "month": "2015/09"
        },
        // ...
    ],
    "opening": {
        "eco": "B00",
        "name": "King's Pawn"
    }
}

Indexing process

At each point in time, there will never be more than one game stream requested for each player, and no more than --indexers (default 16) in total.

Indexing requests are added to a bounded queue. If the queue is full, backpressure is applied to the HTTP request that tried to queue it, eventually discarding the request if it takes longer than a timeout.

Indexing requests are ignored if they are submitted within 60 seconds of the last indexing request for the same player, but it is ok to have multiple concurrent streams watching one indexing process. Ongoing games are revisited only once every 24 hours.

Column families

game

  • Key
    • Game ID (6 bytes)
  • Value
    • Game information

personal

  • Key
    • Hash (12 bytes)
      • Player
      • Color
      • Zobrist hash of position and variant
    • Tree (2 byte)
      • Year and month
  • Value (>= 12 bytes)
    • Move
      • Speed
        • Mode
          • Stats
          • Game IDs with sequence number

player

  • Key
    • User ID
  • Value
    • createdAt of last seen game
    • createdAt of oldest seen ongoing game
    • Time of last index run

License

Licensed under the GNU Affero General Public License v3. See the LICENSE file for details.

You might also like...
🔵🟠 Portal Explorer — web visualization of mind-blowing portals using ray-tracing.
🔵🟠 Portal Explorer — web visualization of mind-blowing portals using ray-tracing.

In Portal Explorer you can view how interesting portals are constructed, and visually explore their properties by moving and rotating them. This program doesn't work well on mobile, better opened from PC.

🖥  A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3
🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3

🖥 A feature rich terminal UI file transfer and explorer with support for SCP/SFTP/FTP/S3

A gui api explorer written in Rust.

Zzz - GUI Api platform Pronounced "Zees"; as in "catching some Z's". A pun on RESTful APIs. example URL: https://jsonplaceholder.typicode.com/todos/ T

A small block explorer for geth PoAs written in rust
A small block explorer for geth PoAs written in rust

Tesseracts A minimalistic block explorer initially created to learn rust. This block explorer has been created as a rust self-learning project to give

Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.
Spacedrive is an open source cross-platform file explorer, powered by a virtual distributed filesystem written in Rust.

Spacedrive A file explorer from the future. spacedrive.com » Download for macOS · Windows · Linux · iOS · watchOS · Android ~ Links will be added once

Git Explorer: cross-platform git workflow improvement tool inspired by Magit
Git Explorer: cross-platform git workflow improvement tool inspired by Magit

Gex Git workflow improvement CLI tool inspired by Magit. This project is still under initial development, but I am actively dogfooding it and features

Mirror of https://gitlab.redox-os.org/redox-os/redox
Mirror of https://gitlab.redox-os.org/redox-os/redox

Redox is an operating system written in Rust, a language with focus on safety and high performance. Redox, following the microkernel design, aims to b

This project now lives on in a rewrite at https://gitlab.redox-os.org/redox-os/parallel

MIT/Rust Parallel: A Command-line CPU Load Balancer Written in Rust This is an attempt at recreating the functionality of GNU Parallel, a work-stealer

Mirror of https://gitlab.redox-os.org/redox-os/ion
Mirror of https://gitlab.redox-os.org/redox-os/ion

Introduction Ion is a modern system shell that features a simple, yet powerful, syntax. It is written entirely in Rust, which greatly increases the ov

Mirror of https://gitlab.redox-os.org/redox-os/termion
Mirror of https://gitlab.redox-os.org/redox-os/termion

Documentation Examples Changelog Tutorial Termion is a pure Rust, bindless library for low-level handling, manipulating and reading information about

MessagePack implementation for Rust / msgpack.org[Rust]

RMP - Rust MessagePack RMP is a pure Rust MessagePack implementation. This repository consists of three separate crates: the RMP core and two implemen

Mirror of https://gitlab.redox-os.org/redox-os/rusttype

RustType RustType is a pure Rust alternative to libraries like FreeType. The current capabilities of RustType: Reading OpenType formatted fonts and fo

A fast static site generator in a single binary with everything built-in. https://www.getzola.org

zola (né Gutenberg) A fast static site generator in a single binary with everything built-in. Documentation is available on its site or in the docs/co

A fast static site generator in a single binary with everything built-in. https://www.getzola.org

zola (né Gutenberg) A fast static site generator in a single binary with everything built-in. Documentation is available on its site or in the docs/co

Msgpack serialization/deserialization library for Python, written in Rust using PyO3, and rust-msgpack. Reboot of orjson. msgpack.org[Python]

ormsgpack ormsgpack is a fast msgpack library for Python. It is a fork/reboot of orjson It serializes faster than msgpack-python and deserializes a bi

A library for extracting #[no_mangle] pub extern "C" functions (https://docs.rust-embedded.org/book/interoperability/rust-with-c.html#no_mangle)

A library for extracting #[no_mangle] pub extern "C" functions In order to expose a function with C binary interface for interoperability with other p

Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes.

Introduction Org mode structural parser/emitter with an emphasis on modularity and avoiding edits unrelated to changes. The goal of this library is to

Data for this-week-in-rust.org

This Week in Rust Content for this-week-in-rust.org. Made available under CC-BY-SA. All code Copyright 2014 Ember Arlynx, made available under the MIT

Flashcards: A spaced repetition app designed around org files.

Flashcards Since it's easy to create notes in org-mode and difficult to create flashcards, this app tries to ease the process of making cards! For you

handle some lichess.org/tournament load with rust, while learning rust

lila-http Take some of the HTTP load away from lila. WIP! Arena tournaments Clients connected to a tournament page request new data about the tourname

Thibault Duplessis 22 Jan 2, 2023
Handle some lichess.org/tournament load with Rust, while learning Rust

lila-http Take some of the HTTP load away from lila. WIP! Arena tournaments Clients connected to a tournament page request new data about the tourname

Lichess 22 Jan 2, 2023
A small utility for tracking the change in opening and closing of issues in a GitHub repo

A small utility for tracking the change in opening and closing of issues in a GitHub repo. This tool can be used to build visualizations for issue triage over time with the hope of motivating closing more issues than are opened.

Ryan Levick 12 Sep 29, 2021
Lightning Optimizing Opening Server

Lightning Optimizing Opening Server (loptoš ~ naughty boy/brat/hooligan/..., not to be confused with lopta == ball) WARNING: ULTRA-EXPERIMENTAL SOFTWA

Martin Habovštiak 16 Dec 7, 2022
Opening randomizer for Chess

chess-randomizer chess-randomizer is a simple opening randomizer written in Rust using WASM and the Lichess API. To build the project, you need Rust a

null 1 Jan 31, 2022
A Monte Carlo simulation of getting all possible outcomes of loot boxes opening

lootboxes_monte_carlo A monte-carlo simulation of the number of "lootboxes" to open to get at least one of each possible outcome I wondered how many l

Adssx 2 Dec 1, 2022
Tool to view and solve puzzles from the lichess puzzle database

offline-chess-puzzles Tool to view and solve puzzles from the lichess puzzle database. It's a very simple tool for those who want to practice offline,

null 57 Dec 21, 2022
A Discord bot for lichess and Rosen related things

liro Liro is a Discord bot that follows in the footsteps of Lichess-discord-bot, without necessarily aiming to replace it. The main pain point that th

Sebastian Lauwers 5 Feb 16, 2022
A nginx log explorer

Rhit reads your nginx log files in their standard location(even gzipped), does some analysis and tells you about it in pretty tables in your console,

Canop 700 Dec 27, 2022
A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf.

xplr A hackable, minimal, fast TUI file explorer, stealing ideas from nnn and fzf. [Quickstart] [Features] [Plugins] [Documentation] [Upgrade Guide] [

Arijit Basu 2.6k Jan 1, 2023