File: gnugo.6

package info (click to toggle)
gnugo 2.4-2
  • links: PTS
  • area: main
  • in suites: potato
  • size: 1,816 kB
  • ctags: 1,828
  • sloc: ansic: 22,091; tcl: 401; sh: 376; makefile: 202
file content (483 lines) | stat: -rw-r--r-- 12,877 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
.TH gnugo 6   "September 1999"
.SH NAME
gnugo - The GNU program to play the game of Go
.SH SYNOPSIS
.B gnugo
[
.B --boardsize <num>
]
[
.B --color <color>
]
[
.B --handicap <num>
]
[
.B --komi <num>
]
[
.B -p, --playstyle <style>
]
[
.B --quiet
]
[
.B -v, --version
]
[
.B -h, --help
]
[
.B --help analyze
]
[
.B --help debug
]
[
.B --help playstyle
]
[
.B --copyright
]
[
.B --mode <mode>
]
[
.B --testmode <mode>
]
[
.B -l, --infile <filename>
]
[
.B -L, --until <move>
]
[
.B -o, --outfile <filename>
]
[
.B --printsgf <filename>
]
[
.B -D, --depth <num>
]
[
.B -B, --backfill_depth <num>
]
[
.B --score [end|last|move]
]
[
.B -a, --allpats
]
[
.B -T, --printboard
]
[
.B -d, --debug <level>
]
[
.B -H, --hash <level>
]
[
.B -w, --worms
]
[
.B -m, --moyo <level>
]
[
.B -b, --benchmark num
]
[
.B -s, --stack
]
[
.B -S, --statistics
]
[
.B -t, --trace
]
[
.B -r, --seed num
]
[
.B --decidestring <string>
]
[
.B --analyzerfile <filename>
]
[
.B --analyze <options>
]
.SH "DESCRIPTION"
GNU Go plays a game of Go against the user. It has many other features: it 
can play against itself or another program, analyse and score a recorded 
game. GNU Go is compliant with Go modem protocol, load and save game in
the Smart Go format. 
.br
GNU Go default is a simple alpha-numeric board display, but you can use
a client such as \fBCGoban\fP.
.SS The game of Go
Go is a game of strategy between two players usually played on a 19x19
grid called \fBgoban\fP. The two players put black and white \fBstones\fP
on the goban to enclose \fBterritory\fP. Go was invented about 4000 years 
ago in ancient China, other names for this game are
(Chinese) \fBWei Chi\fP, (Korean) \fBBaduk\fP and (Ing) \fBGoe\fP.
.SS Playing a game in ASCII mode
To start a game with default options, just invoke "gnugo". The 
board will be drawn at your terminal using ASCII letters.
In this mode, you can get help on available commands by the \fBh\fP key.
To play as Black with 4 stones handicap, with a 0.5 komi, recording
the game in the file record.sgf:
.br
.B gnugo --color black --handicap 4 --komi 0.5 -o record.sgf
.SS Playing a game with CGoban
CGoban is a general purpose client program by Bill Shubert for
playing Go. It runs under X-Windows with a beautiful resizeable
graphic display. To use GNU Go under X-windows, obtain the most recent 
version of CGoban from Bill Shubert's web site
.br
http://www.hevanet.com/wms/comp/cgoban/
.br.
Start CGoban. When the CGoban Control panel comes up, select `Go Modem.'
You will get the Go Modem Protocol Setup. Choose one (or both) of the
playsers to be ``Program,'' and fill out the box to the path to
gnugo. After clicking OK, you get the Game Setup window. Choose
``Rules Set'' to be Japanese (otherwise handicaps won't work). Set the
board size and handicap if you want. Click OK and you are ready to go.

In the Go Modem Protocol Setup window, when you specify the path
to GNU Go, you can give it command line options, such as --quiet
to suppress most messages. Since the Go Modem Protocol preempts
standard I/O other messages are sent to stderr, even if they are
not error messages. These will appear in the terminal from which
you started CGoban. 

.SS Scoring system
The game stops when both players pass. GNU Go will attempt to
compute and report the score to you. It may occasionally make
mistakes due to wrong evaluation of the status of a group. You
can check the score as follows. In ASCII mode, at the end of
the game, stones believed dead are marked in lower case letters,
and you have the option of toggling their status before counting.
Using CGoban, you may use CGoban's counting facility to count
the game using either Japanese or Chinese rules.

.SS Viewing a stored game
.B gnugo -l filename.sgf --mode ascii
loads filename.sgf and lets you navigate through the game by using the
commands \fIforward\fP, \fIback\fP, \fIgoto\fP and \fIlast\fP.
It is not possible to navigate through variations in ascii mode.
You may also use CGoban to view stored games. CGoban can navigate
variations.

.SS Documentation
.PP
The files in the gnugo-2.4/docs directory contain detailed documentation about
debugging options and internal program structure. Other documentation may
be found in comments throughout the source code.

.SS Go Modem Protocol
The Go Modem Protocol is a standard interface between Go programs and
graphical display. 

The Go Modem Protocol was developed by Bruce Wilcox with input from
David Fotland, Anders Kierulf and others. Any Go program *should*
use this protocol since it is standard. Since CGoban supports this
protocol, the user interface for any Go program can be done
entirely through CGoban. Using the Go Modem Protocol, you can play
with another computer running a different program (even on a
different operating system) using a modem, a serial cable or over
the internet if the other program also supports the protocol. You
can also communicate with the Go servers using CGoban.

.SS Smart Go Format
Games (with comments, variations and other features) can be
stored in the Smart Go Format (SGF). This format originated in
Anders Kierulf's program Smart Go. Martin Muller and Arno
Hollosi developed the current standard, which may be found
at 
.br
http://www.sbox.tu-graz.ac.at/home/h/hollosi/sgf/
.br
GNU Go supports the Smart Go Format.

.SH "OPTIONS"
.SS Main options
.TP
.B \--mode \fImode\fP
force the playing mode (\fIascii'\fP, \fItest\fP or \fIgmp\fP). Default is 
ASCII. If no terminal is detected GMP (Go Modem Protocol) will be assumed.
.TP
.B \--testmode \fImode\fP
set the test mode to one of the following: (requires -l, implies --mode test)
.br
\fImove\fP: test at move node only
.br
\fIannotation\fP: test at annotation node only
.br
\fIboth\fP: test at move and annotation nodes
.br
\fIgame\fP: test to see if gnugo considered each move made
This overrides a testmode=... comment in the SGF file.
.TP
.B \--quiet
Don't print copyright and other informational messages.
.TP
.B \-l, --infile \fIfile\fP
Load the SGF file (to score or analyze a recorded game).
.TP
.B \-L, --until \fImove\fP
Stop loading just before \fImove\fP is played (eg L10).
.TP
.B \-o, --outfile \fIfile\fP
Save the played game to \fIfile\fP in SGF format.
.SS Game Options: 
.TP
.B \--boardsize \fInum\fP
Set the board size to use (3-21). Default is 19, other common formats are
13 and 9.
.TP
.B \--color \fIcolor\fP
Choose your color (\fIblack\fP or \fIwhite\fP). Black plays first, White gets
the komi compensation.
.TP
.B \--handicap \fInum\fP
Set the number of handicap stones.
.TP
.B \--komi \fInum\fP 
Set the komi (points given to white player to compensate advantage of the 
first move, usually 5.5 or 0.5). Default is 5.5.
.TP
.B \-p, --playstyle \fIstyle\fP
Style of play, use \fB--help playstyle\fP for usage.
Current available styles are:
.br
\fIstandard\fP     default style
.br
\fIno_fuseki\fP    minimal opening
.br
\fItenuki\fP       often plays tenuki in the opening
.br
\fIfearless\fP     risky style of play
.br
\fIaggressive\fP   both style tenuki and fearless
.SS Informative Output:
.TP
.B \-v, --version
Display the version of GNU Go. 
.TP
.B \-h, --help
Display help message.
.TP
.B \--help analyze
Display help about analyzer options.
.TP
.B \--help debug
Display help about debugging options. 
.TP
.B \--help playstyle
Display help about playstyle options. 
.TP
.B \--copyright
Display copyright notice.
.SS Debugging and advanced options:
.TP
.B \-a, --allpats   
Try all patterns, even those valued less than the best move
found so far. This causes GNU Go to run more slowly with no
improvement in strength but is useful for developers.
.TP
.B \-T, --printboard  
Show board each move.
.TP
.B \-d, --debug \fIlevel\fP
Debugging output (see liberty.h for bits).
.TP
.B \-D, --depth \fInum\fP
Deep reading cutoff (default 14; higher=stronger, slower).
.TP
.B \-B, --backfill_depth \fInum\fP
Deep reading cutoff (default 8; higher=stronger, slower).
.TP
.B \-H, --hash \fIlevel\fP
Hash (see liberty.h for bits). 
.TP
.B \-w, --worms  
Worm debugging.
.TP
.B \-m, --moyo \fIlevel\fP
Moyo debugging, show moyo board. The parameter is an integer,
which can be a sum of the following possibilities (e.g. -m 9
to get territory evaluation+delta_moyo values). See docs/MOYO
for definitions. Use color rxvt window or linux console for 
color diagrams.

    1 = territory (5/21 algorithm)
    2 = table of delta_terri values
    4 = moyo evaluation (5/10 algorithm)
    8 = table of delta_moyo values
   16 = area (4/0 algorithm)
   32 = list of area characteristics
   64 = table of meta_connect values
  128 = trace -p fearless option 

.TP
.B \-b, --benchmark \fInum\fP
Benchmarking mode - can be used with -l.
.TP
.B \-s, --stack   
Stack trace (for debugging purposes).
.TP
.B \-S, --statistics
Print statistics (for debugging purposes).
.TP
.B \-t, --trace   
Verbose tracing (use twice or more to trace reading).
.TP
.B \-r, --seed \fInum\fP
Set random number seed.
.TP
.B \--decidestring \fIstring\fP
\fIstring\fP is the coordinate of one stone in the string.
Determine whether the string can be captured, and if so,
whether it can be defended. Use with -t or -o. See docs/READING
for suggestions about using --decidestring.
.TP
.B \--score [\fIend|last|move\fP]
Count or estimate territory of the input file. Usage:
.br
.B gnugo --score last -l filename
.br
Loads the SGF file and estimates the winner after the last stored move by
measuring the influence.

.br
.B gnugo --score end -l filename
.br
Loads the SGF file and gnugo continues to play after the last stored move by
itself up to the very end. Then the winner is determined by counting the territory.

.br
.B gnugo --score L10 -l filename
.br
Loads the SGF file until a stone is placed on L10. Now the winner will be
estimated as with gnugo --score last.

.br
.B gnugo --score 100 -l filename
.br
Loads the SGF file until move number 100. Now the winner will be estimated
as with gnugo \fB--score last\fP.

.br
If the option \fB-o outputfilename\fP is provided, 
the results will also be written as comment at the end of the output file.

.br
If the option \fB--analyzerfile outputfilename\fP is provided, the results
will be written as comment at the end of the output file, the result property
will be set and the territory will be marked.
.TP
.B \--printsgf \fIoutfile\fP 
Load SGF file, output final position (requires -l).
.TP
.B \--analyzerfile \fIname\fP
Filenname for analyzer output.
.TP
.B \--analyze \fIoptions\fP
Analyze a game stored as sgf file by using --testmode. Game tree variations
are will be ignored. This option may also be used with --score or --benchmark.
The analyze functions will be executed on every move in --benchmark
and --testmode game.

Analyzed board states on other modes:

.br
.B
--score end: 
.br
gnugo analyzes every move it makes at the end of the file until the game is
finished.

.br
.B
--score last: 
.br
board state at the end of the file will be analyzed

.br
.B
--score <movenum>:
.br
board state just before <movenum> will be analyzed

.br
.B 
--score <position>:
.br
board state just before <position> is occupied will be analyzed

.br
.B
--testmode annotation:
.br
board state just before the annotated node is reached will be analyzed.

.br
The results of the analyze functions are written to the filename provided by
--analyzerfilename.


Current options are :
.br
\fIareacolor\fP     show color of influence 
.br
\fIcapture\fP       show capturing moves
.br
\fIconsidered\fP    show considered moves
.br
\fIdefense\fP       show defending moves
.br
\fIdragoninfo\fP    print info about all dragons
.br
\fIdragonstatus\fP  show dragonstatus the dragons are are marked on the board with the status: aLive, Dead, Critial, Unknown
.br
\fIeyeinfo\fP       print info about all eyes
.br
\fIeyes\fP          show eyes and their vital points
.br
\fImoyocolor\fP     show color of moyos
.br
\fImoyovalue\fP     show moyo values 
.br
\fIoverwrite\fP     overwrites game info from the inputfile
.br
\fIrecommended\fP   show moves recommend by modules show moves recommended by the various modules:
        A = attacker
        B = very big move
        D = defender
        E = eyefinder
        F = fuseki
        L = liberty filling
        P = pattern
        p = reconsidered pattern
        S = semeai
.br
\fIterricolor\fP    show color of territories (moyo)
.br
\fIterritory\fP     show territory (worms)
.br
\fIterrivalue\fP    show territory values (moyo)
.br
\fIworminfo\fP      print info about all worms
.br
\fIwormliberties\fP show liberties of the worm
.br
You may use "option1 option2 ..." or option1,option2,... to specifiy more than
one option for --analyze. The analyzer functions will work in all playing
modes except ASCII and GMP. Testmode GAME does not test variations when
invoked with --analyze.

.SH "BUGS"
If you find a bug, please send the SGF output file to gnugo@gnu.org