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

Re: computer-go: Go Text Protocol (GTP)



Hi Daniel,

Here are my thoughts on the standardization of the GTP command set.  I
am posting it here now for discussion.  These are just suggestions.


First of  all, to answer your  question, what I have implement between
my interface and my go program is very  minimal and is just a subset
of what is in gnugo:

     black
     boardsize,
     genmove_black
     genmove_white
     komi
     new_score	
     quit
     showboard
     size
     white

What I would  suggest   is that a    "minimal  set" of  commands   get
documented.  A minimal set   would guarantee that your  software works
with  anyone elses interface, autoplayer,  etc, and any external tools
should be  designed to  work without  trouble using  this set.   There
should not be  commands in this set  that require an unusual amount of
effort to implement and this should  just include the basic mechanisms
of  making moves, taking them back   and reporting starting parameters
such as "boardsize."

Also,  and I'm not sure  if and how this   is currently handled, there
should  be   a provision and   documentation  for  supporting extended
commands.  For  instance, it should be  legal for a  user interface to
send an extended command  (not in the minimum  set) and recognize that
the client does not support that command.  The client should send back
"not_implemented" or  something similar  and  the server  or interface
should handle this gracefully.    

---

One complexity with a minimal set has to do with which rules are being
honored.  I don't  care about "prisoners" if I  am  not using Japanese
rules for  instance (even though I  could implement it anyway, in this
particular case it would be meaningless.)

How to handle  this?  There are 2 major  ruleset branches (Chinese and
Japanese) each  having various  minor  variations in the play  of  the
game.  The  minimal GTP  command set  should be complete  enough to be
capable of determining if  2 separate programs  are able to honor  the
same set of rules.  So I suggest that it's ok to say "not_implemented"
to any   question of  rules, as long   as ANY  program  that claims to
implement the minimal GTP set can default to Tromp/Taylor rules.  This
has 2 major side benefits:

   1. Any 2 programs can play a match with the same rules.

   2. The minimal GTP command set is easy to implement.


I take point 2 seriously, if we want to have  a protocol that will get
heavy use and become popular.

Later, we could concievable define  a "suggested extended command set"
to support popular features after we gain more experience.


Don



 

   Date: Mon, 30 Jul 2001 19:17:12 -0700
   X-Authentication-Warning: match.Stanford.EDU: bump set sender to bump@xxxxxxxxxxxxxxxxx using -f
   From: Daniel Bump <bump@xxxxxxxxxxxxxxxxx>
   References: <200107301332.JAA27682@xxxxxxxxxxxxxxxxx> <006101c1193d$7196eb20$0b01a8c0@pghome>
   Sender: owner-computer-go@xxxxxxxxxxxxxxxxx
   Precedence: bulk
   Reply-To: computer-go@xxxxxxxxxxxxxxxxx
   Content-Type: text
   Content-Length: 1465


   Philipp Garcia wrote:

   > I have implemented the following commands: boardsize, version, black, white,
   > quit, loadsgf, echo, new, print, is_legal, prisoners, showboard, all_legal,
   > what_color. It's certainly not complete and I'm not completely sure if the
   > output is the same as in GNU Go. A standards document would be helpful in
   > this area. I find that GTP very useful during development; especially when
   > testing. I can easily setup test problems and assert assumptions.

   Don Dailey wrote:

   > I am interested in a standards document for GTP too.  I  can go in and
   > start  making up my own commands,  but I want   whatever I use to have
   > some hope of being useful to others.

   It seems that a standards document is badly needed.

   Don, what commands does your implementation implement?
   I think seeing what commands the early applications make
   use of is a step towards a standard.

   I've put up a revised version of the twogtp script at:

   http://www.gnu.org/software/gnugo/patches/twogtp

   This GPL'd perl script (originally by Teun Burgers, and
   inspired by Jean-Louis Martineau's twogmp program) plays
   two gtp processes against each other. In its revised
   (useful!) form it can play tournaments consisting of
   multiple games and record each game in an sgf file. It
   gets the location of handicap stones from the gtp. It
   makes use of the following commands:

   boardsize, komi, fixed_handicap, genmove_black,
   genmove_white, black, white, new_score and quit.

   Dan