gtpserver.py --port <port to listen on> [twogtp options] Possible twogtp options: --verbose 1 (to list moves) or --verbose 2 (to draw board) --komi <amount> --handicap <amount> --free-handicap <amount> --adjust-handicap <length> (change handicap by 1 after <length> wins in a row) --size <board size> (default 19) --games <number of games to play> (default 1) --sgfbase <filename> (create sgf files with sgfbase as basename) --endgame <moves before end> (endgame contest - add filenames of games to be replayed after last option)
Gtpserver.py is a decently modified version of GnuGo’s twogtp.py engine vs. engine script. The modifications are mostly concerned with putting it online so the engines can be located anywhere on the net. It also handles scoring on the server side now (using GnuGo) and optionally lets the clients know about it’s determined score.
Gtpserver.py has been extended to dump statistics of game to a MySQL database. The variables controlling this are near the top of the file. If you don’t wish to use this functionality, just set ‘use_sql’ to false. Also, gtpserver.py will generate game thumbnails from the SGF files using GoGui, so either install it and set the path accordingly, or comment out the line generating the thumbnails.