The Universal Chess Interface (UCI) is an open communication protocol that enables chess engines to communicate with user interfaces
UCI tells what position the game is in
position
command
position startpos moves e2e4 e7e5 g1f3
- startpos - the normal chess starting position
- moves - followed by a long list of sequential moves
Start from an arbitrary FEN position
position fen rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1 moves e2e4
- fen - tells the engine the exact board setup using a FEN string
Move Syntax
- Pawn moves:
e2e4
,a7a8q
(the last letter q = promotion to queen, can also ben
,b
,r
) - Piece moves: No piece letters just squares
- Knight from g1 to f3
g1f3
- Bishop from f1 to c4
f1c4
- Knight from g1 to f3
- Castling:
- Kingside castling
e1g1
(White),e8g8
(Black) - Queenside castling
e1c1
(White),e8c8
(Black)
- Kingside castling