Chapter 3. Compatibility

Table of Contents

Required Commands
Optional Commands

GoGui will work with all programs that can understand the most basic commands of version 1 or 2 of the Go Text Protocol.

Required Commands

It is required that the Go program can handle the following commands:

  • boardsize, clear_board (boardsize)
  • play (black, white)
  • genmove (genmove_black, genmove_white)

The commands in parentheses are used if the program supports the protocol_version command and responds with 1.

If the Go engine does not support generating moves, because it provides only other functionality, it is recommended that it implements list_commands, so that GoGui can detect that genmove is not supported. In this case, GoGui will always set the computer color by default to None, so that the engine should not be made playing moves automatically. Since the user can still issue play commands, it is recommended that the engine responds to a genmove command with a meaningful failure response.

Optional Commands

The following other commands are used by GoGui:

  • name
  • final_status_list dead
  • gg-undo
  • list_commands (help)
  • kgs-genmove_cleanup
  • komi
  • set_free_handicap
  • time_left
  • time_settings
  • undo
  • version
  • quit

If the Go program does not understand them, you will still be able to play games, but you cannot use all of the functionality of GoGui. If undo is not supported, the position will be synchronized with the Go program after an undo by sending the complete game from the beginning. If set_free_handicap is not supported, GoGui will transmit handicap stones with play commands.

The command gg-undo is en extension command used by GNU Go, which differs from undo by an optional integer argument to undo multiple moves.

The following GoGui specific GTP extension commands are used if supported by the program:

gogui-analyze_commands

See Chapter 7, Analyze Commands.

gogui-interrupt

See Chapter 10, Interrupting Commands.

gogui-sigint

See Chapter 10, Interrupting Commands.

gogui-title

For providing a window title, which may be game specific, or include a player name that is not known at program creation time. The title is queried and set after a new game is started.

gogui-play_sequence

This is an extension to the standard play command which can take a sequence of moves. If the Go program supports it (together with GNU Go's gg-undo for multiple undo), then navigating in games will be much faster, because only a single command is used instead of a large number of play and undo commands). Note that the command line length can become large for this command; the Go program should not use a limit for the command length. The Go program is expected to return a failure and not to change its current board state if it cannot execute all of the moves in the sequence.

gogui-setup

See Chapter 9, Setup Commands.

gogui-setup_player

See Chapter 9, Setup Commands.