Explanation
UCI stands for Universal Chess Interface, a text protocol through which a graphical interface communicates with a chess . Within that protocol, an ordinary move is sent as a compact string containing its origin square and destination square.
Each square uses a file letter from a to h and a rank number from 1 to 8. Thus e2e4 means move from e2 to e4. The string contains no moving-piece letter, capture sign, or check marker. The program derives those facts from the current position.
A promotion adds a fifth lowercase letter: q for queen, r for rook, b for bishop, or n for knight. Castling, the combined king-and-rook move, is encoded as a king move, such as e1g1 for White's kingside castling in standard chess.
The move string is only one part of the UCI protocol. Separate commands set the position, start a search, and return the best move. It also differs from , which may append an indicator for the captured piece.
Usage and context
The format is designed for unambiguous program-to-program exchange, not for a human-friendly scoresheet.
Common confusions
Standard algebraic notation
Standard notation usually omits the origin square and adds human-facing details. UCI always gives origin and destination.
The complete UCI protocol
A string such as e2e4 represents one move. The protocol also contains many commands for controlling an engine.
Sources
- 1.UCI Protocol, Rudolf Huber and Stefan Meyer-Kahlen
- 2.UCI Protocol and Stockfish Commands, Stockfish
