Updated README: Equal sign not required with `--mode` flag.
[sgk-go] / doc / gnugo.6
CommitLineData
7eeb782e
AT
1.\" Automatically generated by Pod::Man version 1.15
2.\" Fri Jan 13 15:56:30 2006
3.\"
4.\" Standard preamble:
5.\" ======================================================================
6.de Sh \" Subsection heading
7.br
8.if t .Sp
9.ne 5
10.PP
11\fB\\$1\fR
12.PP
13..
14.de Sp \" Vertical space (when we can't use .PP)
15.if t .sp .5v
16.if n .sp
17..
18.de Ip \" List item
19.br
20.ie \\n(.$>=3 .ne \\$3
21.el .ne 3
22.IP "\\$1" \\$2
23..
24.de Vb \" Begin verbatim text
25.ft CW
26.nf
27.ne \\$1
28..
29.de Ve \" End verbatim text
30.ft R
31
32.fi
33..
34.\" Set up some character translations and predefined strings. \*(-- will
35.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
36.\" double quote, and \*(R" will give a right double quote. | will give a
37.\" real vertical bar. \*(C+ will give a nicer C++. Capital omega is used
38.\" to do unbreakable dashes and therefore won't be available. \*(C` and
39.\" \*(C' expand to `' in nroff, nothing in troff, for use with C<>
40.tr \(*W-|\(bv\*(Tr
41.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
42.ie n \{\
43. ds -- \(*W-
44. ds PI pi
45. if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
46. if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch
47. ds L" ""
48. ds R" ""
49. ds C` ""
50. ds C' ""
51'br\}
52.el\{\
53. ds -- \|\(em\|
54. ds PI \(*p
55. ds L" ``
56. ds R" ''
57'br\}
58.\"
59.\" If the F register is turned on, we'll generate index entries on stderr
60.\" for titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and
61.\" index entries marked with X<> in POD. Of course, you'll have to process
62.\" the output yourself in some meaningful fashion.
63.if \nF \{\
64. de IX
65. tm Index:\\$1\t\\n%\t"\\$2"
66..
67. nr % 0
68. rr F
69.\}
70.\"
71.\" For nroff, turn off justification. Always turn off hyphenation; it
72.\" makes way too many mistakes in technical documents.
73.hy 0
74.if n .na
75.\"
76.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
77.\" Fear. Run. Save yourself. No user-serviceable parts.
78.bd B 3
79. \" fudge factors for nroff and troff
80.if n \{\
81. ds #H 0
82. ds #V .8m
83. ds #F .3m
84. ds #[ \f1
85. ds #] \fP
86.\}
87.if t \{\
88. ds #H ((1u-(\\\\n(.fu%2u))*.13m)
89. ds #V .6m
90. ds #F 0
91. ds #[ \&
92. ds #] \&
93.\}
94. \" simple accents for nroff and troff
95.if n \{\
96. ds ' \&
97. ds ` \&
98. ds ^ \&
99. ds , \&
100. ds ~ ~
101. ds /
102.\}
103.if t \{\
104. ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
105. ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
106. ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
107. ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
108. ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
109. ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
110.\}
111. \" troff and (daisy-wheel) nroff accents
112.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
113.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
114.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
115.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
116.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
117.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
118.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
119.ds ae a\h'-(\w'a'u*4/10)'e
120.ds Ae A\h'-(\w'A'u*4/10)'E
121. \" corrections for vroff
122.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
123.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
124. \" for low resolution devices (crt and lpr)
125.if \n(.H>23 .if \n(.V>19 \
126\{\
127. ds : e
128. ds 8 ss
129. ds o a
130. ds d- d\h'-1'\(ga
131. ds D- D\h'-1'\(hy
132. ds th \o'bp'
133. ds Th \o'LP'
134. ds ae ae
135. ds Ae AE
136.\}
137.rm #[ #] #H #V #F C
138.\" ======================================================================
139.\"
140.IX Title ".::gnugo 6"
141.TH .::gnugo 6 "3.7.7" "2006-01-10" "User Contributed Perl Documentation"
142.UC
143.SH "NAME"
144gnugo \- The \s-1GNU\s0 program to play the game of Go
145.SH "SYNOPSIS"
146.IX Header "SYNOPSIS"
147\&\fBgnugo\fR
148[\fB\*(--boardsize <num\fR>]
149[\fB\*(--color <color\fR>]
150[\fB\*(--handicap <num\fR>]
151[\fB\*(--komi <num\fR>]
152[\fB\*(--quiet\fR]
153[\fB\-v, \-\-version\fR]
154[\fB\-h, \-\-help\fR]
155[\fB\*(--help debug\fR]
156[\fB\*(--copyright\fR]
157[\fB\*(--mode <mode\fR>]
158[\fB\*(--replay <color\fR>]
159[\fB\-l, \-\-infile <filename\fR>]
160[\fB\-L, \-\-until <move\fR>]
161[\fB\-o, \-\-outfile <filename\fR>]
162[\fB\*(--printsgf <filename\fR>]
163[\fB\-D, \-\-depth <num\fR>]
164[\fB\-B, \-\-backfill_depth <num\fR>]
165[\fB\*(--score [estimate|finish|aftermath]\fR ]
166[\fB\-a, \-\-allpats\fR]
167[\fB\-T, \-\-printboard\fR]
168[\fB\-d, \-\-debug <level\fR>]
169[\fB\-w, \-\-worms\fR]
170[\fB\-m, \-\-moyo <level\fR>]
171[\fB\-b, \-\-benchmark num\fR]
172[\fB\-t, \-\-trace\fR]
173[\fB\-r, \-\-seed num\fR]
174.SH "DESCRIPTION"
175.IX Header "DESCRIPTION"
176\&\s-1GNU\s0 Go plays a game of Go against the user. It has many other features: it
177can play against itself or another program, analyse and score a recorded
178game. \s-1GNU\s0 Go is compliant with Go modem protocol, load and save game in
179the Smart Game format.
180.PP
181\&\s-1GNU\s0 Go default is a simple alpha-numeric board display, but you can use
182a client such as \fBCGoban\fR.
183.Sh "The game of Go"
184.IX Subsection "The game of Go"
185Go is a game of strategy between two players usually played on a
18619x19 grid called \fBgoban\fR. The two players put black and white \fBstones\fR on
187the goban to enclose \fBterritory\fR. Go was invented about 4000 years ago in
188ancient China. Other names for this game are (Chinese) \fBWei Chi\fR, (Korean)
189\&\fBBaduk\fR and (Ing) \fBGoe\fR.
190.Sh "Playing a game in \s-1ASCII\s0 mode"
191.IX Subsection "Playing a game in ASCII mode"
192To start a game with default options, just invoke \*(L"gnugo\*(R". The board will be
193drawn at your terminal using \s-1ASCII\s0 letters. In this mode, you can get help on
194available commands by the \fBh\fR key. To play as Black with 4 stones handicap,
195with a 0.5 komi, recording the game in the file record.sgf:
196.PP
197.Vb 1
198\& gnugo --color black --handicap 4 --komi 0.5 -o record.sgf
199.Ve
200.Sh "Playing a game with CGoban"
201.IX Subsection "Playing a game with CGoban"
202CGoban is a general purpose client program by Bill Shubert for
203playing Go. It runs under X Window System with a beautiful resizeable
204graphic display. To use \s-1GNU\s0 Go under X Window System, obtain the
205most recent version of CGoban from Bill Shubert's web site
206.PP
207http://www.igoweb.org/~wms/comp/cgoban/index.html
208.PP
209Start CGoban. When the CGoban Control panel comes up, select `Go Modem.'
210You will get the Go Modem Protocol Setup. Choose one (or both) of the
211players to be ``Program,'' and fill out the box to the path to
212gnugo. After clicking \s-1OK\s0, you get the Game Setup window. Choose
213``Rules Set'' to be Japanese (otherwise handicaps won't work). Set the
214board size and handicap if you want. Click \s-1OK\s0 and you are ready to go.
215.PP
216In the Go Modem Protocol Setup window, when you specify the path
217to \s-1GNU\s0 Go, you can give it command line options, such as \-\-quiet
218to suppress most messages. Since the Go Modem Protocol preempts
219standard I/O, other messages are sent to stderr, even if they are
220not error messages. These will appear in the terminal from which
221you started CGoban.
222.Sh "Scoring system"
223.IX Subsection "Scoring system"
224The game stops when both players pass. \s-1GNU\s0 Go will attempt to
225compute and report the score to you. It may occasionally make
226mistakes due to wrong evaluation of the status of a group. You
227can check the score as follows. In \s-1ASCII\s0 mode, at the end of
228the game, stones believed dead are marked in lower case letters,
229and you have the option of toggling their status before counting.
230Using CGoban, you may use CGoban's counting facility to count
231the game using either Japanese or Chinese rules.
232.Sh "Viewing a stored game"
233.IX Subsection "Viewing a stored game"
234gnugo \fB\-l\fR filename.sgf \-\-mode ascii
235.PP
236loads filename.sgf and lets you navigate through the game by using the
237commands \fIforward\fR, \fIback\fR, \fIgoto\fR and \fIlast\fR.
238It is not possible to navigate through variations in ascii mode.
239You may also use CGoban to view stored games. CGoban can navigate
240variations.
241.Sh "Documentation"
242.IX Subsection "Documentation"
243The files in the \fIdoc\fR directory contain detailed documentation about
244debugging options and internal program structure. Other documentation may
245be found in comments throughout the source code.
246.Sh "Go Modem Protocol"
247.IX Subsection "Go Modem Protocol"
248The Go Modem Protocol is a standard interface between Go programs and
249graphical display.
250.PP
251The Go Modem Protocol was developed by Bruce Wilcox with input from
252David Fotland, Anders Kierulf and others. Any Go program *should*
253use this protocol since it is standard. Since CGoban supports this
254protocol, the user interface for any Go program can be done
255entirely through CGoban. Using the Go Modem Protocol, you can play
256with another computer running a different program (even on a
257different operating system) using a modem, a serial cable or over
258the internet if the other program also supports the protocol. You
259can also communicate with the Go servers using CGoban.
260.Sh "Smart Game Format"
261.IX Subsection "Smart Game Format"
262Games (with comments, variations and other features) can be
263stored in the Smart Game Format (\s-1SGF\s0). This format originated in
264Anders Kierulf's program Smart Go. Martin Muller and Arno
265Hollosi developed the current standard, which may be found
266at
267.PP
268http://www.red-bean.com/sgf/
269.PP
270\&\s-1GNU\s0 Go supports the Smart Game Format.
271.SH "OPTIONS"
272.IX Header "OPTIONS"
273.Sh "Main options"
274.IX Subsection "Main options"
275\&\fB\*(--mode \f(BImode\fB\fR
276.PP
277force the playing mode (\fIascii'\fR, \fIgtp\fR or \fIgmp\fR). Default is
278\&\s-1ASCII\s0. If no terminal is detected \s-1GMP\s0 (Go Modem Protocol) will be assumed.
279.PP
280\&\fB\*(--replay \f(BIcolor\fB\fR
281.PP
282replay the game generating moves for color, where color is \fIwhite\fR,
283\&\fIblack\fR, or \fIboth\fR. (requires \fB\-l\fR)
284.PP
285\&\fB\*(--quiet\fR
286.PP
287Don't print copyright and other informational messages.
288.PP
289\&\fB\-l, \-\-infile \f(BIfile\fB\fR
290.PP
291Load the \s-1SGF\s0 file (to score or analyze a recorded game).
292.PP
293\&\fB\-L, \-\-until \f(BImove\fB\fR
294.PP
295Stop loading just before \fImove\fR is played (e.g. 154 or L10).
296.PP
297\&\fB\-o, \-\-outfile \f(BIfile\fB\fR
298.PP
299Save the played game to \fIfile\fR in \s-1SGF\s0 format.
300.Sh "Game Options:"
301.IX Subsection "Game Options:"
302\&\fB\*(--boardsize \f(BInum\fB\fR
303.PP
304Set the board size to use (1\-19). Default is 19, other common formats are
30513 and 9.
306.PP
307\&\fB\*(--color \f(BIcolor\fB\fR
308.PP
309Choose your color (\fIblack\fR or \fIwhite\fR). Black plays first, White gets
310the komi compensation.
311.PP
312\&\fB\*(--handicap \f(BInum\fB\fR
313.PP
314Set the number of handicap stones.
315.PP
316\&\fB\*(--komi \f(BInum\fB\fR
317.PP
318Set the komi (points given to white player to compensate advantage of the
319first move, usually 5.5 or 0.5). Default is 5.5.
320.Sh "Informative Output:"
321.IX Subsection "Informative Output:"
322\&\fB\-v, \-\-version\fR
323.PP
324Display the version of \s-1GNU\s0 Go.
325.PP
326\&\fB\-h, \-\-help\fR
327.PP
328Display help message.
329.PP
330\&\fB\*(--help debug\fR
331.PP
332Display help about debugging options.
333.PP
334\&\fB\*(--copyright\fR
335.PP
336Display copyright notice.
337.Sh "Debugging and advanced options:"
338.IX Subsection "Debugging and advanced options:"
339\&\fB\-T, \-\-printboard\fR
340.PP
341Show board each move.
342.PP
343\&\fB\*(--level \f(BInum\fB\fR
344.PP
345Level of play. (default 10; smaller=faster, weaker).
346.PP
347\&\fB\-b, \-\-benchmark \f(BInum\fB\fR
348.PP
349Benchmarking mode \- can be used with \fB\-l\fR.
350.PP
351\&\fB\-t, \-\-trace\fR
352.PP
353Verbose tracing (use twice or more to trace reading).
354.PP
355\&\fB\-r, \-\-seed \f(BInum\fB\fR
356.PP
357Set random number seed.
358.PP
359\&\fB\*(--score [\f(BIestimate|finish|aftermath\fB]\fR
360.PP
361Count or estimate territory of the input file. Usage:
362.PP
363\&\fBgnugo \-\-score estimate \-l filename\fR
364.PP
365Loads the \s-1SGF\s0 file and estimates the score by measuring the
366influence. Use with \fB\-L\fR if you want the estimate somewhere else than
367at the end of the file.
368.PP
369\&\fBgnugo \-\-score finish \-l filename\fR
370.PP
371Loads the \s-1SGF\s0 file and gnugo continues to play by itself up to the
372very end. Then the winner is determined by counting the territory.
373.PP
374\&\fBgnugo \-\-score aftermath \-l filename\fR
375.PP
376Similar to \fB\*(--score finish\fR except that a more accurate but slower
377algorithm is used to determine the final status of the groups.
378.PP
379If the option \fB\-o outputfilename\fR is provided,
380the results will also be written as comment at the end of the output file.
381.PP
382\&\fB\*(--printsgf \f(BIoutfile\fB\fR
383.PP
384Load \s-1SGF\s0 file, output final position (requires \fB\-l\fR).
385.SH "BUGS"
386.IX Header "BUGS"
387If you find a bug, please send the \s-1SGF\s0 output file to gnugo@gnu.org
388together with a description of the bug.