Skip to content

Releases

v0.4.0 — the API to start from

Choose a tag to compare

@amyodov amyodov released this 11 Sep 16:24

The largest release so far, and a breaking one: nearly every public name changed shape between 0.3.0 and here. It is also the first release whose API we would call decent and convenient. 0.3.x code does not compile or import against it unchanged; every rename is listed in the CHANGELOG, old → new. Treat 0.4.0 as the version to start from.

  • Typed facts are the API. Position::facts() answers 221 named facts in 14 groups, plus 27 per legal move, each with a real type, read by absolute colour (.white, .black), documented in one generated catalogue (docs/features.md) that the code cannot drift from.
  • One JSON form for the facts, identical from Rust (serde) and Python (to_dict()), with a JSON Schema.
  • Typed tensors (esca::facts::tensors, esca.tensors): one array per fact with its own dtype and shape, expanded or bit-packed, saved as safetensors. No normalisation; that is the trainer's business.
  • Named endings with theory verdicts and technique names, and a plain-English describe() beside every explanation enum.
  • A Position answers rules questions (legal_moves, san, play, outcome) without a Game; the vocabulary parses from text and prints as text; a Game pickles; errors say what they refused.
  • chess-esca-mcp: an MCP server over the library, released from this same tag as the PyPI package chess-esca-mcp (uvx chess-esca-mcp), with a Claude Code plugin in AnglerfishChess/plugins.
  • Examples in examples/ and python/examples/: the three programs each reviewer wrote as a newcomer, kept as they were written.

The f32 training encoder left the library; it belongs to the anglerfish trainer.

0.3.0

Choose a tag to compare

@amyodov amyodov released this 04 Sep 18:23
  • 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().

0.2.1

Choose a tag to compare

@amyodov amyodov released this 04 Sep 07:58
  • The PyPI wheels carry esca.pgn and esca.uci; 0.2.0's were built without them.

0.2.0

Choose a tag to compare

@amyodov amyodov released this 03 Sep 21:27
  • PGN, behind the pgn feature and always in the wheel: pgn::Reader over a
    file or a string, tolerant of the archives in the wild and, with
    skipping(), of one bad game among many; pgn::Game with headers,
    mainline, variations, comments and NAGs, mainline_game() to play it and
    Game::to_pgn() to write one, X-FEN setups included. Python mirrors it as
    esca.pgn.
  • A UCI client, behind the uci feature and always in the wheel:
    uci::protocol is the protocol as values and does no I/O; uci::Engine
    runs the process with every wait bounded, so a silent or dead engine is an
    error, not a hang. set_position sets UCI_Chess960 and the castling
    spelling from the game's variant, and refuses a Chess960 game to an engine
    that does not offer the option. Python has esca.uci.Engine (GIL released
    around every wait) and AsyncEngine, the same surface as coroutines, with
    no async runtime under it.
  • The v1 schema, schema_semver 1.0.0: fourteen groups in the order
    features.md §2 gives them. Schema::v1 replaces Schema::v0, which is
    gone, as is every net trained on it; Python names it esca.SCHEMA_V1 and
    esca.SCHEMA.
  • The clock and repetition facts move out of state into the new history
    group, so a training source without clocks omits one group name.
    Facts::history carries them; StateFacts no longer does. The group also
    says what the recent plies did: captures and checks in the last eight, the
    plies since either, the material trend over them, and what the last move
    moved, took and gave. A Game supplies them; a bare Position does not.
  • pawns gains the structure a player names out loud: the longest chain and
    whether its base is under attack, the majority on each wing, the holes a
    side can never cover again and the enemy minors sitting on them, fixed and
    blockaded pawns, the lead passer's distance to promotion, both kings'
    distances to its promotion square, whether the defending king is in its
    square and whether its path is empty, the files semi-open at the enemy king,
    and the backward pawns the enemy can actually attack.
  • pieces.knights_on_outpost becomes pieces.minors_on_outpost, which counts
    bishops too; king.king_distance drops the two distances two kings can
    never stand at; state.repetition_available_them is gone.
  • pieces gains what makes a minor good or bad and a rook worth its rank: the
    own fixed pawns standing on an own bishop's colour, the bishop pair against a
    knight pair as one signed value, a rook on the seventh with the enemy king
    shut on the eighth, and the units with nowhere safe to go, by count and by
    value. A trapped unit is mobility.immobile_pieces with safety asked of the
    squares it does reach.
  • attacks gains the value twins attacked_count, attacked_value,
    en_prise_value and pinned_value.
  • The new placement group: the raw board as twelve 64-square planes in the
    mover's view, so a run measuring the augmentation against the board alone
    selects a group instead of building its own input. Facts::placement.
  • The endgame group fills in: how central each king stands, the plies each
    side's leading passer still needs and the difference between them, the
    opposition the kings stand in, a king on a key square of its own passer, a
    wrong-colour bishop, and the three drawn material configurations
    material.insufficient_material deliberately excludes. Facts::endgame,
    with the Opposition and DrawishMaterial enums. The opposition is no
    longer on the excluded list of features.md §4.
  • history.last_move_was_check is gone: with a history it is state.in_check
    read from the other end, and a check cannot survive the move that answers
    it.
  • Static exchange evaluation: Position::see and Position::see_capture, the
    new exchange group over them, and tactics.winning_capture_available,
    winning_capture_max_gain, equal_capture_count and losing_capture_count
    redefined from the exchange instead of the 1-ply victim-versus-capturer
    test. SEE is no longer on the excluded list of features.md §4.
  • The new threats group, Facts::threats: what each side stands to lose,
    read from the exchange on each of its own units — which are threatened, what
    they are worth and the largest gain against them — plus the units a lesser
    enemy unit attacks, the overloaded and removable defenders, the loose units,
    the units more cheap attackers bear on than defenders, and the slider
    geometry a threat comes from: x-rays through an enemy unit, batteries, and
    batteries whose line meets the enemy king ring.
  • The move schema grows from 24 values to 40. Each legal move now also
    carries its SEE, the largest one it leaves us next, whether it moves an
    attacked unit or interposes on a check, whether it advances or creates a
    passer, the isolated, doubled and backward pawns it makes, a king file it
    opens for us, what it does to both king rings and to both hanging counts,
    whether it leaves a piece hanging, and whether it uncovers a slider.
    esca.MOVE_WIDTH and MoveFacts::WIDTH say 40.
  • king gains the defensive half of the siege and the exposure a player reads
    off the board: the pieces defending their own king's ring and their weight,
    the besieging weight less that, the open rays off the king, whether it has
    luft, which side it reads as having castled to, and whether the two kings
    stand on opposite wings. KingFacts carries them, with the CastledSide
    enum and KingFacts::ring_attacker_surplus; castled_side joins the
    features features.md §4 keeps to classic chess.
  • tactics gains six bits per side: a check that also captures safely, a
    discovery onto the enemy queen, a back-rank mate threat, a quiet move that
    leaves more to be won than stands to be won now, a side with no safe move at
    all, and a promotion the exchange on its square makes profitable.
  • The move row is a section of the schema of its own, named move, with a
    version, named features, widths and encodings, and its text folded into the
    one schema_id. A checkpoint that stores the id now refuses a move row of
    another shape as surely as a position row of one. Schema::moves,
    GroupSpec::canonical and GroupSpec::feature; esca.MOVE_SCHEMA and
    Schema.moves() in Python.
  • material gains the bishop-pair imbalance and the piece-value difference,
    mobility the safe-mobility difference per type, and planes a ninth
    plane: where their threatened units stand.

v0.1.0

Choose a tag to compare

@amyodov amyodov released this 03 Sep 01:41

First release. esca is published to crates.io and PyPI; the engine and the
trainer ship in the repository only.

  • esca: Position, Game and the Variant trait, with Classic and
    Chess960 behind it; FEN and EPD, X-FEN and Shredder-FEN castling, legal
    move generation, UCI and SAN move text, and every terminal and claimable
    outcome.
  • Facts, the v0 schema: nine groups of side-relative position facts plus
    per-move facts, a schema_id pinned by golden fixtures, and batch encoders
    that write 1065-wide f32 rows.
  • The esca Python package: an abi3-py312 wheel built from the crate, typed,
    with NumPy batch encoding.
  • The lichess reader: streams the Lichess evaluation dump into encoded
    batches with their targets.
  • anglerfish-core: the anglerfish UCI binary — protocol loop, bounded
    search, move-picking strategies, and the Evaluator/Policy traits a net
    will plug into (Uniform and Material until then).