Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / doc / gnugo.pod
CommitLineData
7eeb782e
AT
1
2=head1 NAME
3
4gnugo - The GNU program to play the game of Go
5
6=head1 SYNOPSIS
7
8B<gnugo>
9[B<--boardsize <num>>]
10[B<--color <color>>]
11[B<--handicap <num>>]
12[B<--komi <num>>]
13[B<--quiet>]
14[B<-v, --version>]
15[B<-h, --help>]
16[B<--help debug>]
17[B<--copyright>]
18[B<--mode <mode>>]
19[B<--replay <color>>]
20[B<-l, --infile <filename>>]
21[B<-L, --until <move>>]
22[B<-o, --outfile <filename>>]
23[B<--printsgf <filename>>]
24[B<-D, --depth <num>>]
25[B<-B, --backfill_depth <num>>]
26[B<--score [estimate|finish|aftermath]> ]
27[B<-a, --allpats>]
28[B<-T, --printboard>]
29[B<-d, --debug <level>>]
30[B<-w, --worms>]
31[B<-m, --moyo <level>>]
32[B<-b, --benchmark num>]
33[B<-t, --trace>]
34[B<-r, --seed num>]
35
36=head1 DESCRIPTION
37
38GNU Go plays a game of Go against the user. It has many other features: it
39can play against itself or another program, analyse and score a recorded
40game. GNU Go is compliant with Go modem protocol, load and save game in
41the Smart Game format.
42
43GNU Go default is a simple alpha-numeric board display, but you can use
44a client such as B<CGoban>.
45
46=head2 The game of Go
47
48Go is a game of strategy between two players usually played on a
4919x19 grid called B<goban>. The two players put black and white B<stones> on
50the goban to enclose B<territory>. Go was invented about 4000 years ago in
51ancient China. Other names for this game are (Chinese) B<Wei Chi>, (Korean)
52B<Baduk> and (Ing) B<Goe>.
53
54=head2 Playing a game in ASCII mode
55
56To start a game with default options, just invoke "gnugo". The board will be
57drawn at your terminal using ASCII letters. In this mode, you can get help on
58available commands by the B<h> key. To play as Black with 4 stones handicap,
59with a 0.5 komi, recording the game in the file record.sgf:
60
61 gnugo --color black --handicap 4 --komi 0.5 -o record.sgf
62
63=head2 Playing a game with CGoban
64
65CGoban is a general purpose client program by Bill Shubert for
66playing Go. It runs under X Window System with a beautiful resizeable
67graphic display. To use GNU Go under X Window System, obtain the
68most recent version of CGoban from Bill Shubert's web site
69
70http://www.igoweb.org/~wms/comp/cgoban/index.html
71
72Start CGoban. When the CGoban Control panel comes up, select `Go Modem.'
73You will get the Go Modem Protocol Setup. Choose one (or both) of the
74players to be ``Program,'' and fill out the box to the path to
75gnugo. After clicking OK, you get the Game Setup window. Choose
76``Rules Set'' to be Japanese (otherwise handicaps won't work). Set the
77board size and handicap if you want. Click OK and you are ready to go.
78
79In the Go Modem Protocol Setup window, when you specify the path
80to GNU Go, you can give it command line options, such as --quiet
81to suppress most messages. Since the Go Modem Protocol preempts
82standard I/O, other messages are sent to stderr, even if they are
83not error messages. These will appear in the terminal from which
84you started CGoban.
85
86=head2 Scoring system
87
88The game stops when both players pass. GNU Go will attempt to
89compute and report the score to you. It may occasionally make
90mistakes due to wrong evaluation of the status of a group. You
91can check the score as follows. In ASCII mode, at the end of
92the game, stones believed dead are marked in lower case letters,
93and you have the option of toggling their status before counting.
94Using CGoban, you may use CGoban's counting facility to count
95the game using either Japanese or Chinese rules.
96
97=head2 Viewing a stored game
98
99gnugo B<-l> filename.sgf --mode ascii
100
101loads filename.sgf and lets you navigate through the game by using the
102commands I<forward>, I<back>, I<goto> and I<last>.
103It is not possible to navigate through variations in ascii mode.
104You may also use CGoban to view stored games. CGoban can navigate
105variations.
106
107=head2 Documentation
108
109The files in the F<doc> directory contain detailed documentation about
110debugging options and internal program structure. Other documentation may
111be found in comments throughout the source code.
112
113=head2 Go Modem Protocol
114
115The Go Modem Protocol is a standard interface between Go programs and
116graphical display.
117
118The Go Modem Protocol was developed by Bruce Wilcox with input from
119David Fotland, Anders Kierulf and others. Any Go program *should*
120use this protocol since it is standard. Since CGoban supports this
121protocol, the user interface for any Go program can be done
122entirely through CGoban. Using the Go Modem Protocol, you can play
123with another computer running a different program (even on a
124different operating system) using a modem, a serial cable or over
125the internet if the other program also supports the protocol. You
126can also communicate with the Go servers using CGoban.
127
128=head2 Smart Game Format
129
130Games (with comments, variations and other features) can be
131stored in the Smart Game Format (SGF). This format originated in
132Anders Kierulf's program Smart Go. Martin Muller and Arno
133Hollosi developed the current standard, which may be found
134at
135
136http://www.red-bean.com/sgf/
137
138GNU Go supports the Smart Game Format.
139
140=head1 OPTIONS
141
142=head2 Main options
143
144B<--mode I<mode>>
145
146force the playing mode (I<ascii'>, I<gtp> or I<gmp>). Default is
147ASCII. If no terminal is detected GMP (Go Modem Protocol) will be assumed.
148
149B<--replay I<color>>
150
151replay the game generating moves for color, where color is I<white>,
152I<black>, or I<both>. (requires B<-l>)
153
154B<--quiet>
155
156Don't print copyright and other informational messages.
157
158B<-l, --infile I<file>>
159
160Load the SGF file (to score or analyze a recorded game).
161
162B<-L, --until I<move>>
163
164Stop loading just before I<move> is played (e.g. 154 or L10).
165
166B<-o, --outfile I<file>>
167
168Save the played game to I<file> in SGF format.
169
170=head2 Game Options:
171
172B<--boardsize I<num>>
173
174Set the board size to use (1-19). Default is 19, other common formats are
17513 and 9.
176
177B<--color I<color>>
178
179Choose your color (I<black> or I<white>). Black plays first, White gets
180the komi compensation.
181
182B<--handicap I<num>>
183
184Set the number of handicap stones.
185
186B<--komi I<num>>
187
188Set the komi (points given to white player to compensate advantage of the
189first move, usually 5.5 or 0.5). Default is 5.5.
190
191=head2 Informative Output:
192
193B<-v, --version>
194
195Display the version of GNU Go.
196
197B<-h, --help>
198
199Display help message.
200
201B<--help debug>
202
203Display help about debugging options.
204
205B<--copyright>
206
207Display copyright notice.
208
209=head2 Debugging and advanced options:
210
211B<-T, --printboard>
212
213Show board each move.
214
215B<--level I<num>>
216
217Level of play. (default 10; smaller=faster, weaker).
218
219B<-b, --benchmark I<num>>
220
221Benchmarking mode - can be used with B<-l>.
222
223B<-t, --trace>
224
225Verbose tracing (use twice or more to trace reading).
226
227B<-r, --seed I<num>>
228
229Set random number seed.
230
231B<--score [I<estimate|finish|aftermath>]>
232
233Count or estimate territory of the input file. Usage:
234
235B<gnugo --score estimate -l filename>
236
237Loads the SGF file and estimates the score by measuring the
238influence. Use with B<-L> if you want the estimate somewhere else than
239at the end of the file.
240
241B<gnugo --score finish -l filename>
242
243Loads the SGF file and gnugo continues to play by itself up to the
244very end. Then the winner is determined by counting the territory.
245
246B<gnugo --score aftermath -l filename>
247
248Similar to B<--score finish> except that a more accurate but slower
249algorithm is used to determine the final status of the groups.
250
251If the option B<-o outputfilename> is provided,
252the results will also be written as comment at the end of the output file.
253
254B<--printsgf I<outfile>>
255
256Load SGF file, output final position (requires B<-l>).
257
258=head1 BUGS
259
260If you find a bug, please send the SGF output file to gnugo@gnu.org
261together with a description of the bug.
262
263=cut