root/04/bugfix/doc/kombilo.doc

Revision 21, 26.1 kB (checked in by ug, 5 years ago)

Import release 0.4d

Line 
1
2This is the documentation for Kombilo 0.4 - a go database program.
3It was written by Ulrich Goertz (u@g0ertz.de).
4Kombilo is published under the GNU General PublicLicense (see the
5file 'gpl.txt' or look at http://www.gnu.org/copyleft/gpl.html).
6This program comes WITHOUT ANY WARRANTY.
7
8Most of the things explained here (and some additional material, including
9pictures) can also be found in the tutorial, and in a more detailed and
10much nicer form. If you have already installed Kombilo, you should be
11able to access it via the Help menu. Otherwise, it can be found on the
12Kombilo website (see http://www.g0ertz.de/kombilo/tutorial.html).
13
14----------------------------------------------------------------------
15
16Contents:
17  Getting started
18  The menus
19  The board
20  The search window
21  The SGF viewer
22  Requirements on SGF files
23  -----
24  History
25  To Do
26
27---------- GETTING STARTED ------
28
29I assume that you have successfully installed Python and that you can
30start the program. The main window with the board, and the search
31window will pop up.
32
33First, you have to install a database where to search in. A database
34is simply a directory with SGF files in it. Open the 'Edit DB list'
35window in the File menu. Then add one or more directories. You can
36also add all subdirectories of some directory (and all of their
37subdirectories ...) simultaneously, by using the 'recursively add
38subdir's' option (this may take some time, though).
39
40The games from the databases you added will show up in the game list
41in the search window.
42
43---- Note: In some Python versions the widget for selecting a directory
44is not available. (Technically speaking, they come with an old Tk version;
45Tk is the programming language underlying the GUI toolkit.) As a
46consequence, the program will crash once you press the 'Add DB' button
47in the 'Edit DB list' window. I think that this is mainly a problem on
48Windows95/98 systems, but it may happen on other systems, too.
49There is the following work-around: Check the 'Old Tk version'-option
50in the 'Advanced' submenu of the options menu. Now the 'Add DB' button
51will bring up a widget to select a file, which is always available.
52In order to select a certain directory which should be added as a
53database, you have to select any file in it.
54It is still possible to add all subdirectories of some directory
55at the same time, by the 'Add subdir's recursively' option. To do so,
56you have to select a file in the main directory. (If it doesn't
57contain any files, but only the subdirectories you want to add,
58you have to copy any file to that directory first. Don't take
59an sgf file because (probably) you don't want that sgf file to
60show up in the database.) ------------------------------------------
61
62Now you can just enter some pattern on the board, select a
63search-relevant region (with the right mouse key), and start the
64search in the search window.
65
66You might also want to look at Kombilo's web site with
67screenshots and a description of many of it's features at
68http://www.g0ertz.de/kombilo/
69
70---------- THE MENUS ------------
71
72­-- File
73
74Open: Load an SGF game. You can look at the game on the main board.
75      This is useful to analyze (your own) games, or maybe to look
76      at a joseki library. (In principle, this works well with
77      Kogo's joseki dictionary, e.g., but unfortunately it takes
78      very long to load the dictionary, since it is such a large file,
79      and the SGF Parser, which is written in Python, is not very fast.)
80
81Edit DB list:
82      With this menu item, you open a window where you can edit which
83      databases (i.e. games from which directories) you want to work with
84      for the next search.
85
86      A database corresponds to a directory; it contains all the SGF
87      files in that directory. Files in subdirectories do not belong
88      to the database (but it is possible to add all subdirectories
89      as databases of their own at the same time: use the "recursively
90      add subdir's option).
91
92      See also the section "Requirements on SGF files" below in order
93      to understand which kind of SGF files the program can handle;
94      basically, it handles simple game records, they may contain
95      variations, but the variations are ignored for the search.
96      All filenames have to end in '.sgf'.
97
98      In the Edit DB List window, you can add databases and remove them.
99      If you add a directoy for the first time, the SGF files have to be
100      'processed', i.e. the SGF files are translated into a format that
101      is suitable for the search function. This information is written to
102      several files with the extension .db. The processing takes quite
103      some time, but has to be done only once (unless you change the files
104      or add/remove files from that directory). Afterwards, the SGF files
105      are not needed for the search itself anymore. But of course they are
106      needed when you want to look at a game, so they should be left where
107      they are.
108
109      You also can reprocess a directory, in case you added or deleted SGF
110      files in that directory.
111
112Export search results:
113      This opens a small text editor with some information on the previous
114      search, i.e. the search pattern; the search pattern with continuations;
115      some statistical information. You can edit this information (but the
116      editing capabilities are pretty limited), and save the result to a file.
117      This might be useful to store information on some search for yourself,
118      or to send it to someone via email, or to post it to a newsgroup
119      like rec.games.go. If you want to write a page for Sensei's library,
120      choose the 'Wiki' export style in the Options menu.
121
122--- Options
123
124  Edit custom menus
125      The custom menus can be used to add your own menu entries.
126      Upon selecting a menu entry, Kombilo can do a pattern search for some
127      pre-defined pattern and/or a game info search and/or open a html file in
128      your web browser. For example, you could create entries for fuseki or
129      joseki patterns, for players, or for titles.
130
131      To edit the custom menus, select the corresponding entry in the Options
132      menu. You see a list of the currently existing menus, submenus and
133      entries. The first line with a * represents the Kombilo main menu. You can
134      add submenus or entries to the menus, or delete them.
135
136      When an entry is selected, you can 
137
138
139      * Add pattern information by pressing the corresponding button. The pattern
140        (and search-relevant region, and the search options) will then be
141        associated with this menu entry).
142
143      * Add game info information by clicking the corresponding button. A window
144        will pop up where you can enter the information to search for.
145
146      * Add a HTML file by entering the file name in the corresponding field, or
147        by browsing for a file.
148
149  Fuzzy stone placement
150      Place the stones on the main board slightly off the exact
151      point, in a random direction, to make the position
152      look more natural. (Well, some people might think that it
153      is just ugly, so you can switch it off here).
154
155  Shaded stone mouse pointer
156      (Don't) Show the current position of the mouse pointer on
157      the board and the color of the next stone to be played
158      by a shaded stone.
159
160  Show next move
161      In case a SGF file has been loaded, show the position of the
162      next move with a circle.
163
164  Jump to match
165      This controls the behaviour of the SGF viewer when you open
166      a game from the game lis tafter a pattern search. If this
167      option is checked, the viewer will jump directly to the position
168      where the pattern you searched for was found in that game.
169
170  Smart fixed color
171      If this option is enabled, the 'fixed color' option will be
172      automatically enabled when you select the whole board as
173      search-relevant region, and disabled when you select a smaller
174      region. (You can nevertheless change that after selecting the
175      region and before starting the search.)
176      This is useful because if 'fixed color' is not used, Kombilo
177      regards a position and the same position with swapped colors as
178      equivalent; in the case of whole board searches that can lead to
179      counter-intuitive results when you look at the continuations
180      (e.g. place a black resp. white stone on the upper left resp. upper
181      right hoshi, do a whole board search without 'fixed color', and
182      look at the continuations).
183
184  Export style
185      This option controls the format in which information on the
186      previous search is exported (compare 'Export search results' in the
187      File menu). You can choose between ASCII-style, which is just plain
188      text, and is the standard. E.g. it is suitable if you want to post
189      information on some search to the usenet newsgroup rec.games.go. The
190      other choice is Wiki-style which is useful to write pages for
191      Sensei's Library (http://senseis.xmp.net/).
192
193  Uppercase labels
194      If you want to use the 'Export search results' function to
195      produce output for Sensei's Library, it is useful to use
196      lowercase labels for the continuations, since only lowercase
197      letters are automatically understood by Sensei's Library.
198      If you do not want to do that, and find that uppercase
199      labels look better, you can use this option.<p>
200
201  Show color swap
202      If this is active, hits for the pattern with reversed colors will
203      have a minus sign.
204
205  Save options
206      Save the options; this also saves the current size and position
207      of the two main windows.
208
209  Advanced Options:
210
211      Number of remembered searches
212          As we have seen, with the 'back' button you can jump back to
213          the previous search. This option controls the number of previous
214          searches that are remembered. The default is 5, and if your
215          machine has only a small amount of memory (less them 64MB, say),
216          you probably should not set it much higher, or Kombilo might run
217          out of memory and crash.
218          On the other hand, if you have lots of memory, it might be
219          convenient to set it to a higher number, or even to 0, which
220          means 'no limit': all searches are remembered, as long as there
221          is enough memory.
222
223
224      Alternative SGF viewer (Unix/Windows only):
225          If you want to use your customary SGF viewer/editor instead of
226          the viewer coming with Kombilo, enter the command to start it
227          and the command line options that tell it to open a certain
228          sgf file here. For example, on my Linux machine, I could use
229
230          /home/ug/cgoban-1.9.11/cgoban
231          -edit %f
232
233          in order to use CGoban. In order to use WinMGT under Windows,
234          enter something like
235
236          c:\winmgt\winmgt
237          %f
238
239          Of course, in both cases you may have to adjust the path,
240          and possibly the command itself.
241 
242          Delete the command in order to use v.py.
243
244      Sloppy SGF parsing
245          If this is enabled, Kombilo will accept SGF files which
246          have multiple occurrences of the same tag in a node, or
247          which have line breaks in move tags. Both of these are
248          forbidden by the SGF standard.
249
250      Use C search routine
251          Enable or disable the (much faster) C search routine. If the
252          C search function could not be imported, this option is
253          disabled. See the file install.txt for information on
254          how to install the C search function.
255
256          If you think the C search routine is still too slow, just
257          use the Python search a couple of times. When you switch
258          back again, you will be enthusiastic about the C search :-)
259          But seriously: I do intend to improve the search engine
260          further, but I think that currently there are more important
261          things to do.
262
263      Duplicates
264          This option says what the program should do with games that
265          are already in the database, but are about to be inserted again
266          (by 'AddDB'). You can either completely omit the duplicate check
267          (to save some time during the processing), always accept (but get
268          a warning message) or always reject duplicates, or have the
269          program ask in each single case.
270          If you use the 'strict duplicate check' option, Kombilo will
271          not only compare the symmetrized Dyer signatures of the games,
272          but also the final positions. This makes is much less likely
273          that different games are shown as duplicates. On the other hand,
274          if the same game occurs twice, but with a different orientation,
275          or with minor errors in the game record, the strict duplicate
276          check will not find it. Thus you probably should use this option
277          only in special cases.
278
279      Old Tk version
280          On (some?) Windows9x systems, Python doesn't come with a
281          widget to select a directory. If this is the case for your
282          system, and the 'Old Tk version' option is not checked, the
283          program will crash when you press the 'AddDB' button. If you
284          enable this option, a widget to select a file will be used
285          instead.
286
287      Customize appearance
288          On choosing this item, you get a window where you can fine tune
289          several fonts, font sizes, and colors that Kombilo uses. You can
290          also change some global GUI options by editing the file 'kombilo.app'.
291
292
293--- Help
294
295  Information about the program, this documentation,
296  and the license. If you choose 'Tutorial', the Kombilo tutorial will be
297  opened in your default web browser.
298
299­--------- THE BOARD ------------
300
301--- The board itself:
302
303  Place stones:
304    Just click on a point in order to place a stone.
305
306  Remove Stones:
307    Press the control key, and click on a stone in order to
308    remove it.
309
310  Wildcards:
311    In order to include wildcards in your search pattern, i.e.
312    points which may be empty or contain a stone of either color,
313    press the shift key and click on an (empty) point. Wildcards
314    are shown as small green circles.
315
316  Selection:
317    With the right mouse key, you can create the rectangle that
318    is relevant for the next search. (Click on the top left point,
319    and drag the bottom right point to where you want it). Everything
320    outside this rectangle is neglected. If no rectangle is shown,
321    the whole board is relevant.
322
323    If the region contains a corner, it will be mirrored and rotated
324    for the search, but not translated. If it contains some points on
325    the edge, but no corner, it will be mirrored, rotated and translated
326    along the edge. Otherwise, it will be mirrored, rotated and translated,
327    such that the position may occur anywhere on the board (not right in
328    a corner, nor right at the edge, though). (But see the
329    'Fixed Anchor' option in the search window.)
330
331  Automatic search:
332    Double clicking with the left mouse key is the
333    same as first clicking once, then starting a search. This is
334    particularly convenient in order to go through a 'variation tree',
335    for some joseki, say. See 'show continuations' below.
336
337--- Navigation:
338
339  If an SGF file has been loaded, you can navigate as in the SGF viewer
340  (see below).
341
342  Otherwise, the "next button" and "end of game button" do nothing, the
343  "previous move button" takes back a move, the "start of game button"
344  clears the board.
345
346
347--- Show continuations ('ABC' button)
348
349  This lets you display the continuations from the found games in the pattern
350  you searched for. Only continuations in the current search-relevant region
351  are shown.
352
353  If only black/white moves occured at a certain point, the corresponding
354  letter is written in black/white. Otherwise it is written in gray.
355  (This color encoding does not work for continuations at non-empty
356  intersections, i.e. "under the stones". Furthermore, the color encoding
357  gets lost when you resize the board; click 'Show continuations' twice
358  in order to restore it.)
359
360  During the search, the continuations are recorded anyway. This button just
361  displays them or removes them from the board.
362
363  If the continuations are displayed, you can easily "walk through the
364  variation tree" by double clicking on the corresponding points on
365  the board, because double clicking on the board is (always) the same
366  as a simple click (=placing a stone) plus performing a search.
367
368
369--- Color of next stone:
370
371  With the four buttons left to the navigation buttons, you can choose if
372  the stones you put on the board should be
373  - alternating black/white,
374  - alternating white/black,
375  - all black
376  - all white.
377
378  The shaded stone which appears while the mouse pointer is on the board
379  always shows the color of the next move.
380
381---------- THE SEARCH WINDOW ----
382
383--- The game list
384
385  All games are shown as
386    filename(without .sgf): white player - black player (winner)
387
388  The game list shows all the games that are in the current databases
389  and that contain all patterns from the previous searches. In other words,
390  when you start the program, all games from the databases in the current
391  database list are there. If you search a pattern, the new list contains all
392  games in which that pattern occurs. This new list will be the basis for the
393  next search, unless you 'reset' the list first.
394
395  Thus it is easy to combine searches (e.g. games by Cho Chikun in which the 
396  nadare joseki occurs): Just search for one criterion first, then search for
397  the second one without resetting the game list.
398
399  After a search, the list of results is appended for each game. '123D' means
400  that the pattern occurs in move 123, and that the continuation is D. '245'
401  means that the pattern occurs in move 245, and that no more move is played
402  in that region.
403
404  The number of games that are currently in the list as well as the
405  black/white winning percentages are shown on the top.
406
407--- Statistics
408
409  The statistics window in the lower right shows the ten most common
410  continuations, and how often they have been played. Furthermore,
411  it shows the number of matches, the number of matches with colors
412  as on the board (resp. reversed), and the B/W winning percentage.
413
414--- Back button
415
416  Go back to the previous search: this restores the board and the
417  game list.
418
419--- Reset button
420
421  Reset the game list, i.e. put all the games into the game list that are
422  in the databases of the current DB list.
423
424--- Fixed Anchor
425
426  Restrict the search to match only games where the given pattern occurs at
427  the exact position. For example, if you enter a pattern (and selection of
428  relevant search region) like this
429 
430    ...
431    .O.
432    ...    , the O stone being on the 5-5 point
433
434  the usual search will find all games where a stone with the 8 adjacent
435  points being empty occurs, anywhere on the board (except for in the corner
436  and at the edge).
437
438  If you use the fixed anchor option, only games will be found where the
439  stone is on the 5-5 or 5-15, 15-5, 15-15 point. I.e., the only way in
440  which the found pattern might differ from the original one is by rotation/
441  mirroring of the whole board.
442
443--- Fixed Color
444
445  Only finds games where the pattern occurs with the same colors as it was
446  entered. If it is not used, a color reversal is allowed. It is highly
447  recommended to use this option when doing a whole board search (for some
448  fuseki lines, say), because otherwise the continuations may look 'funny'. 
449  (Search for the empty board without 'fixed color' in order to see what I
450  mean.)
451
452--- Move Limit
453
454  Only finds games where the pattern occurs before the given move. If set
455  to 250, there is no move limit, i.e. the whole game is relevant.
456
457  If a move limit is set, it also applies to the continuations. If the first
458  continuation in some pattern occurs after the given limit, this is treated
459  as if there were no continuation.
460
461  Usually it doesn't make the search much faster to set a move limit. It just
462  might be helpful in order to get more useful results.
463
464--- Game Info Search
465  The game info search allows you to search for games (among those
466  that are currently in the game list) played by certain
467  players, in a certain event, in a certain time period etc.
468  You can also do a general text search in the SGF file (with the
469  'Anywhere' entry). In this way, you could search for games won by
470  white (search for 'RE[W'), for games played under chinese rules
471  (search for 'RU[Chinese]') etc.
472
473  If you enter something in several fields at the same time, only games
474  will be found which match all these entries.
475 
476
477--- Signature search
478  Here you can search for games with a certain Dyer signature.
479  The signature of a game is given by the coordinates (in SGF
480  format) of the moves 20, 40, 60, 31, 51, 71. This almost
481  always characterizes a game uniquely.
482
483  If you press the 'signature search' button, and a window will
484  pop up, where you can enter the coordinates of the corresponding
485  moves. If you click on an intersection on the board,
486  the corresponding coordinates will be entered in the
487  currently active text entry below, and the next entry will be made
488  active. So you can enter the signature simply by clicking on
489  the places where moves 20, 40, ... were played. You can also omit
490  some of them (in most cases, two or three of the moves will
491  be enough to characterize a game uniquely).
492
493--- Pattern Search
494  This starts the search of the pattern on the main board, among the games that
495  are currently in the game list.
496
497---------- THE VIEWER -----------
498
499The menu commands should be self-explanatory; compare the explanations above.
500
501After loading an SGF file, you can navigate through it in the following way:
502
503Click on the board:
504  By clicking on the point where the next move  is made, the stone will be
505  placed there.
506
507  This is of course most useful if the option "show next move" in the options
508  menu is enabled; in that case the position(s) of the next move are marked
509  with circles.
510
511  This method is particularly convenient (I think) if there are variations.
512  Unfortunately, this is currently the only way to choose among variations.
513  So if your SGF file has variations, you have to enable the "show next move"
514  option (unless all variations are marked with labels in the SGF file).
515
516  If the next move is a pass (or a pass occurs in one of the variations),
517  the pass button is active.
518
519  On the other hand, if you disable the "show next move" option, you can use
520  the viewer as a very simple program to let you guess the next move.
521
522  If you click on a point for which there is no move in the SGF file, nothing
523  happens. In the current version it is not possible to enter your own
524  variations.
525
526Next move button (or left-arrow key):
527  Goes to the next move. If there are variations, the first variation is
528  chosen.
529
530Previous move button (or right-arrow key):
531  Goes back one move.
532
533Fast forward button:
534  = 10 times "next move"
535
536"Fast rewind" button:
537  = 10 times "previous move"
538
539Start of game button, End of game button:
540  Go to the start/end of the game.
541
542Note: You can also use the viewer separately from Kombilo, in
543order to look at SGF files. Just start it with
544'python v.py', or 'python v.py filename', in order to look
545at the SGF file filename.
546
547
548------ REQUIREMENTS ON SGF FILES --------
549
550There are a few requirements on the SGF files that are used in the
551databases. They will be satisfied by ordinary game records, but
552might not be satisfied by "strange" SGF files.
553
554First of all, the filename of an SGF file always has to end in '.sgf'.
555
556The program does not handle several game records in a single SGF file.
557All but the first record are simply ignored.
558
559The program expects that in the game record there are alternating black
560and white plays. Variations are ignored; only the first (main) variation is
561followed.
562
563In addition, at the very beginning an initial position can be set up. This
564is what happens in handicap games, for example. So handicap stones are treated
565correctly. It is also possible to set up an initial position consisting
566of black and white stones, like a go problem. On the other hand, "during the
567game", i.e. after the first black or white move has been played, no stones may
568be added or removed except for the ordinary alternating black/white moves (and
569except for captures, of course).
570
571All moves after a pass are ignored.
572
573The viewer does accept most SGF features, I think. In particular it handles
574variations (the navigation has to be done by clicking on the concerning
575points on the board), and adding/removal of stones during the game. It
576displays labels, but it does not properly display text labels with more
577than one letter/digit.
578
579It ignores some of the new SGF tags like "good for black", "bad for white",
580...
581
582======================================================
583
584History:
585
586I had been loosely thinking about writing a go database program
587like Kombilo for quite some time, but I didn't start to write some code
588until
589
590June 2001:   Started experimenting with a simple pattern search function.
591             Since it was easier than I first thought to produce a basic
592             search engine I decided to continue with this project.
593
594Nov. 2001:   Version 0.1 released.
595
596Jan. 2002:   Version 0.2
597             with an improved user interface, duplicate check, winning
598             percentages, more comfortable game info search, a workaround
599             for the 'choose directory' widget which is missing in some
600             Python distributions, ...
601
602April 2002:  Version 0.3
603             with an improved search engine, hash tables for joseki and
604             fuseki search, winning percentages for the continuations,
605             faster SGF parser, export function for search results, ...
606
607May 2002:    Version 0.4 (testing)
608             custom menus; better handling of large databases; SGF parser
609             rewritten from scratch (partially in C++); edit comments,
610             game info of SGF files.
611
612======================================================
613
614To Do:
615
616Here are some ideas on features that I might implement in one of the next
617versions. If you miss anything that is not on the list yet, please
618drop me a line!
619
620- Include a full SGF editor instead of the SGF viewer.
621
622- Make the search function consider variations.
623
624- More database administration functions: save/load/
625  merge/manually edit game lists ...
626
627- Implement some kind of fuzzy search (?)
628
629
630
631
632
633
634
Note: See TracBrowser for help on using the browser.