[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [computer-go] GTP and Tourney in SmartGo 1.4



William Shubert has asked me to post his answer to the list:


On Sun, Mar 14, 2004 at 09:51:10PM -0800, David Fotland wrote:

> You say that I might want to implement GTP to communicate with other
> programs, and you say that GTP is just a protocol, and says nothing
> about the communication channel that carries it.  But don't existing
> programs that implement GTP use pipes?  If I implement for  example, a
> TCP/IP version, I don't think it will talk with Gnugo.  That's where I
> got the impression about pipes.

Most engines using GTP right now just use stdin/stdout (for C
programmers, that means just using "scanf()" or "getchar()" to read GTP
commands, and "printf()" to write the responses back). I'm not sure if
this is what you meant by "pipes" or not, stdin/stdout are usually pipes
but could also be FIFOs or network sockets or whatever. In any case,
this mechanism makes things incredibly easy for the engine author. Then
the GTP server writer has to do the work of making sure that
printf/scanf gets to the server properly.

There are other ways you could do this - kgsGtp (my GTP server program)
can be configured to use any of 4 systems for the engine and server to
communicate - but this is the easiest for most engine authors. GTP
doesn't specify the means of connecting the engine to the server, but
one would hope that any tournament would specify the mechanism to use in
advance.

William Shubert


_______________________________________________
computer-go mailing list
computer-go@xxxxxxxxxxxxxxxxx
http://computer-go.org/mailman/listinfo/computer-go