Interface UCICommand

All Known Subinterfaces:
UCIRequest, UCIResponse
All Known Implementing Classes:
ReqGo, ReqGoDepth, ReqGoFast, ReqGoInfinite, ReqGoTime, ReqIsReady, ReqPosition, ReqQuit, ReqSetOption, ReqStop, ReqUci, ReqUciNewGame, RspBestMove, RspId, RspInfo, RspOption, RspReadyOk, RspUciOk, UCICommandUnknown

public interface UCICommand
Represents a command in the Universal Chess Interface (UCI) protocol.

The UCI protocol facilitates communication between a chess GUI (Graphical User Interface) and a chess engine, providing a standardized way to exchange information such as commands, responses, and other data. This interface defines the base structure for UCI commands, categorizing them by their type and enabling identification of messages exchanged between the engine and GUI.

The protocol operates via text-based commands transmitted through standard input and output, ensuring platform independence. Commands must always end with a line feed (`\n`) and whitespace between tokens is ignored. Commands are categorized broadly into requests and responses.

Key components of the UCI protocol from which this interface derives relevance include:

  • Requests from the GUI (e.g., `uci`, `debug`, `isready`, `position`, and others).
  • Responses from the chess engine (e.g., `uciok`, `readyok`, move outputs, etc.).
  • Handling of unknown or unexpected commands gracefully by ignoring them.
Author:
Mauricio Coria
See Also: