GNU Go Documentation
20.2 Protocol applications
The protocol is asymmetric and involves two parties, which we may
call `A' and `B'. `A' is typically some kind of arbiter or
relay and `B' is a go engine. All communication is initiated by `A'
in form of commands, to which `B' responds.
Potential setups include:
- Regression testing.
A (regression script) -- B (engine).
A sets up a board position and asks B to e.g. generate a move or
find an attack on a specific string.
- Human vs program.
The GUI relays moves between the human and the engine and asks the
engine to generate moves. Optionally the GUI may also use GTP to
ask the engine which moves are legal or give a score when the game
- Program vs program with arbiter.
B1 (engine 1) -- A (arbiter) -- B2 (engine 2)
A relays moves between the two engines and alternately asks the
engines to generate moves. This involves two different GTP
channels, the first between A and B1, and the second between A and
B2. There is no direct communication between B1 and B2. The
arbiter dictates board size, komi, rules, etc.
- Program vs program without arbiter.
The same as above except that B1 includes the arbiter
functionality and the first GTP link is shortcut.
- Connection between go server and program.
Go server -- A (relay) -- B (engine)
A talks with a go server using whatever protocol is needed and
listens for match requests. When one arrives it accepts it, starts
the go engine and issues GTP commands to set up board size, komi,
etc. and if a game is restarted it also sets up the position. Then
it relays moves between the server and the engine and asks the
engine to generate new moves when it is in turn.
Setups 1 and 5 are in active and regular use with GNU Go. Programs
implementing setup 3 are also distributed with GNU Go (the files