TesujiGoFramework/GoTextProtocol

Sub-page of TesujiGoFramework

Go Text Protocol

The Go Text Protocol, or GTP, is a simple protocol that can be used to communicate with a Go plaing engine. The purpose of this protocol is to standardize at least a minimum set of text-based commands so that there's a common definition of how to interact with a Go playing engine. A Go playing engine that adheres to this protocol can be used to play by some online Go servers that support this protocol. There are also some front-ends that use this protocol to communicate with a Go engine, so that it can be used for more than one program. One example of such a front-end is [ext] GoGui by Markus Enzenberger.

The specifications of version 2.0 of the protocol can be found [ext] here.

The protocol is only that, a protocol. So it doesn't specify the means by which the protocol is actually communicated or in which programming language it is implemented. GoGui communicates through the standard terminal-in and terminal-out channels. There's also an implementation that communicates through sockets that allows you to have your engine play on a remote Go server.

The tesuji.games.go.gtp package contains some classes to deal with the GTP protocol. It's a Java implementation but it still doesn't specify the means of transportation, it only specifies that it needs an abstract InputStream and OutputStream. But it does all the nitty gritty work of dealing with the protocol for you, all you need to provide is an implementation of the GoEngine interface. And as the RandomGoEngine shows, you don't even need to actually implement most of those either. The next section: Make it work with GoGui will show how to use GoGui to make it actually do something.


This is a copy of the living page "TesujiGoFramework/GoTextProtocol" at Sensei's Library.
(OC) 2011 the Authors, published under the OpenContent License V1.0.
[Welcome to Sensei's Library!]
StartingPoints
ReferenceSection
About