1GOGUI-TWOGTP(1)                 GoGui Reference                GOGUI-TWOGTP(1)
2
3
4

NAME

6       gogui-twogtp - Go Text Protocol adapter for playing games between two
7       Go programs.
8

SYNOPSIS

10       gogui-twogtp -black command -white command [-alternate] [-auto]
11                    [-config file] [-debugtocomment] [-force] [-games n]
12                    [-komi komi] [-maxmoves n] [-observer command]
13                    [-openings dir] [-referee command] [-sgffile prefix]
14                    [-size n] [-threads n] [-time timespec] [-verbose] [-xml]
15
16       gogui-twogtp -help
17
18       gogui-twogtp -analyze file.dat [-force]
19
20       gogui-twogtp -compare file.sgf...
21
22       gogui-twogtp -version
23

DESCRIPTION

25       Adapter program for playing games between two Go programs supporting
26       GTP (Go Text Protocol).
27
28       Optional observer and referee GTP Go programs can be used for observing
29       the game and answering commands related to the final game score.
30       TwoGtp forwards the following commands to all programs (command
31       translation is done for protocol version 1 programs):
32
33       ·   boardsize
34
35       ·   clear_board
36
37       ·   komi (if supported)
38
39       ·   play
40
41       ·   quit
42
43       ·   scoring_system (if supported)
44
45       ·   time_settings (if supported)
46
47       ·   undo
48
49       The following commands are forwarded to the referee program, if
50       existing, otherwise to first player program that implements them (Black
51       is tried first):
52
53       ·   final_score
54
55       ·   final_status
56
57       ·   final_status_list
58
59       The command genmove is forwarded only to the program of the
60       corresponding color, the other programs are informed about the move
61       with a play command. GTP extension commands implemented by exactly one
62       of the programs are forwarded to the program. The special comment line
63       # interrupt, used by GoGui to interrupt commands, is forwarded to all
64       programs.
65
66       If the option -sgffile is used, the games are saved after they are
67       finished and a result text file in table format is created with some
68       statistics. If the program(s) support the GTP command cputime, these
69       statistics include CPU times. The errors in the statistics are the
70       standard errors (confidence interval 68%). They are computed by the
71       standard deviation of the results, divided by the square root of the
72       number of unique games, which is correct only for a sufficiently large
73       number of games (especially if the percentage of wins is close to 0% or
74       100%).
75

OPTIONS

77       -alternate
78           Alternate colors. Black and White are exchanged every odd game; the
79           scores saved in the results table -sgffile are still using the name
80           Black and White, as given with -black and -white.
81
82       -analyze file.dat
83           Analyze the result file file.dat. Creates a HTML file file.html
84           with links to the games and summary statistics. Also creates a text
85           file file.summary.dat, with a table row containing the most
86           important summary statistics.
87
88       -auto
89           Automatically play games. Use this option if you want to run TwoGtp
90           as a standalone program, without a program like GoGui which
91           controls the move generation with genmove commands. If a result
92           file already exists (as specified with -sgffile), and contains less
93           games than specified with -games, the remaining games will be
94           played. Use -force to overwrite existing result files.
95
96       -black command
97           Command for the black program.
98
99       -compare
100           Compare a list of SGF files given as arguments an exit.
101
102       -config file
103           Read command line options and arguments from the given file.
104
105       -force
106           Overwrite existing files.
107
108       -debugtocomment
109           Store all text that was written by each program to the standard
110           error stream during the move generation in the comment properties
111           of the SGF file.
112
113       -games n
114           Number of games to play (0 means no limit).
115
116       -help
117           Display help and exit.
118
119       -komi komi
120           Komi. If this option is not used, a default komi of 6.5 will be
121           used. The komi cannot be changed at runtime. The komi GTP command
122           will succeed, if the argument has the same value as the configured
123           komi and fail otherwise.
124
125       -maxmoves n
126           Limit the maximum number of moves. Can be useful if some games
127           would not terminate otherwise. Default is 1000. -1 means no limit.
128
129       -observer command
130           Command for the observer program.
131
132       -openings directory
133           Use openings from SGF files in the given directory. The openings
134           will be cycled through in alphabetical order. If option -alternate
135           is set, each opening is played twice with colors exchanged. If
136           TwoGtp is used as a GTP engine, the opening moves will be returned
137           to the controller as responses to the first genmove GTP commands.
138           Note that in this case opening files with non-alternating moves or
139           setup stones are not supported (this is currently not checked and
140           will result in undefined behavior). In automatic mode (see -auto),
141           there is no such restriction.
142
143       -referee command
144           Command for the referee program.
145
146       -sgffile prefix
147           Save games after they are finished with filename prefix-n.sgf (n is
148           the game number). The results are appended to the file prefix.dat.
149
150       -size n
151           Board size for games. If this option is not used, the size will be
152           set with the boardsize command, or the default size 19 will be used
153           when option -auto is set.
154
155       -threads n
156           Use multi-threading. Setting the number of threads to a value
157           greater than 1 will create multiple instances of the Go programs to
158           play n games in parallel. Can only be used together with option
159           -auto.
160
161       -time timespec
162           Set time limits (basetime[+overtime/moves]). The base time and
163           overtime (byoyomi) can have an optional unit specifier (m or min
164           for minutes; s or sec for seconds; default is minutes).
165
166       -verbose
167           Print debugging messages. This will print GTP commands and
168           responses and text written to the standard error stream by the
169           programs to the standard error stream. If option -threads is used,
170           only the debugging messages of the first thread are written.
171
172       -version
173           Print version and exit.
174
175       -white command
176           Command for the white program.
177
178       -xml
179           Save games in XML format.
180

GTP EXTENSIONS

182       gogui-interrupt
183           Indicate interrupt ability for GoGui.  TwoGtp will forward the
184           interrupt to both programs, with the appropriate method, if they
185           implement either gogui-interrupt or gogui-sigint. See the chapter
186           "Interrupting Commands" in the GoGui documentation.
187
188       gogui-title
189           Return a title for the current game, consisting of the game number
190           (if option -sgffile was used) and the player names.
191
192       gogui-twogtp-black command
193           Send command to the black player.
194
195       gogui-twogtp-observer command
196           Send command to the observer program.
197
198       gogui-twogtp-referee command
199           Send command to the referee program.
200
201       gogui-twogtp-white command
202           Send command to the white player.
203

EXAMPLES

205   Play games
206       Play 100 games between GNU Go, default level, and GNU Go, level 5, on a
207       9x9 board, with alternating colors; save games and results to files
208       with filename prefix gnugo5:
209
210           BLACK="gnugo --mode gtp"
211           WHITE="gnugo --mode gtp --level 5"
212           gogui-twogtp -black "$BLACK" -white "$WHITE" -games 100 \
213             -size 9 -alternate -sgffile gnugo5 -auto
214
215
216   Analyze results
217       Create a HTML formatted result page of the games played in the previous
218       section:
219
220           gogui-twogtp -analyze gnugo5.dat
221
222
223   Play one game with graphical display
224       Play one game between GNU Go, default level, and GNU Go, level 5, using
225       GoGui as a graphical display (to start play, select Computer Color/Both
226       from the Game menu in GoGui):
227
228           BLACK="gnugo --mode gtp"
229           WHITE="gnugo --mode gtp --level 5"
230           gogui -program "gogui-twogtp -black \"$BLACK\" -white \"$WHITE\""
231
232
233   Play games with graphical display
234       Play 100 games with same settings as in the first example, with GoGui
235       as a graphical display (start games automatically):
236
237           BLACK="gnugo --mode gtp"
238           WHITE="gnugo --mode gtp --level 5"
239           TWOGTP="gogui-twogtp -black \"$BLACK\" -white \"$WHITE\" -games 100 \
240             -size 9 -alternate -sgffile gnugo5"
241           gogui -size 9 -program "$TWOGTP" -computer-both -auto
242
243GoGui 1.4.9                       02/10/2017                   GOGUI-TWOGTP(1)
Impressum