Skip to content

0.3.0

Choose a tag to compare

@amyodov amyodov released this 04 Sep 18:23
· 10 commits to main since this release
  • The explain layer answers a rules question with the evidence behind it,
    every reason that applies at once and each carrying the squares it was read
    off. Position::castling names the right, the rook, the check, every
    covered square of the king's path with the units covering it, and every
    unit standing on the path; en_passant_status names each pawn that could
    take and what forbids it, the rank pin that binds neither pawn alone
    included. checkers, attackers, between, pins and skewers hand over
    the squares behind an answer. Chess960 throughout: the castling path is the
    one the variant's rule names, so a king that never moves and a rook the king
    crosses are answered by the same fields.
  • Game::repetition_status lists the plies the position has stood at and the
    earlier plies with the same placement that do not count, with what differs;
    fifty_move_status counts the clock down to the claim and to the automatic
    draw and names the move that last cleared it; draw_status lists every draw
    that holds rather than the first, a stalemate carrying the king's covered
    escape squares and what holds each other unit; claims_after says what a
    move would earn without playing it.
  • Python has it as esca.explain, reached from methods on Position and
    Game. None of it is part of the feature schema.
  • The UCI client speaks asynchronously on both surfaces. Rust gains the tokio
    feature and uci::tokio::Engine: the same conversation, the same values and
    the same Error as the blocking Engine, with every method awaited and
    every future cancellation-safe. A search let go of unanswered asks the engine
    to stop, and the engine settles on its next call, since a drop cannot wait.
  • esca.uci.AsyncEngine is asyncio all the way down: it drives the process
    itself, with no worker thread and no blocking call under it, so run, which
    named that thread, is gone. Cancelling an awaited play, analyse or
    answer stops the search and leaves the engine usable. Its timeout is
    settable, as the blocking Engine's is.
  • esca.uci.protocol puts the protocol core on the Python surface, for a
    client of one's own: Command constructors that render a line, parse
    reading one line of engine output into a Message, and Session saying what
    may come next.
  • Both Rust clients and the asyncio one cap the lines an engine has written and
    the client has not read at 4096. The oldest line that carries no part of the
    conversation goes first, and dropped_lines counts what went, so an engine
    writing faster than it is read costs a bounded amount of memory rather than
    its answer.
  • Position::polyglot_key, needing no feature: the key the Polyglot format
    fixes, the same number in every run and in every program that implements it,
    so it is a key to store and to send where Position::key is not. Python
    reads it as position.polyglot_key.
  • Opening books, behind the polyglot feature and always in the wheel:
    polyglot::Book memory-maps a book and answers a position with its entries
    in book order, its heaviest, or one drawn by weight from a seed; a move that
    is not legal in the position asked about is refused, never guessed.
    Book::write and polyglot::Builder go the other way, counting the moves
    of played games or of a PGN source into a sorted, merged book with a maximum
    ply and a minimum count. Python mirrors it as esca.polyglot, which also
    has download for fetching a book to a path with an optional digest.
  • The ECO catalogue, behind the openings feature and always in the wheel:
    openings::lookup gives a position its code and name, and Game::opening
    the deepest one a game has reached. Keyed by position, so a transposition is
    named. Python mirrors it as esca.openings and game.opening().