root/04/release-0.4e/doc/tutorial.html

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

Import release 0.4d

Line 
1<HTML>
2<HEAD>
3<TITLE>Kombilo - tutorial</TITLE>
4
5<meta name="description"
6content="Kombilo - a go database program">
7<meta name="keywords"
8content="kombilo go weiqi baduk database">
9<meta http-equiv="expires" content="1800">
10<meta name="robots"
11content="INDEX,FOLLOW">
12<meta name="author"
13content="Ulrich Goertz">
14</HEAD>
15
16<BODY bgcolor=#FFFFFF>
17
18<div style="width:500px">
19
20<H1>Tutorial</H1>
21<img src="logosmall.jpg" align=RIGHT>
22This tutorial explains how to use Kombilo 0.4c. If you are just looking
23for more information on this program before downloading it,
24you should find it here too.<p>
25
26<div style="border:none; padding:3px; width:500px;
27background-color:#CCCCCC; z-index:1"> 
28<font size="4"><b>Contents</b></font></div><p>
29
30<a href="#newin04">New features in version 0.4</a><br>
31<a href="#gettingstarted">Getting started</a><br>
32<a href="#firstsearch">The first search</a><br>
33<a href="#moresearchpatterns">More complicated search patterns</a><br>
34<a href="#exportresults">Export search results</a><br>
35<a href="#gamelistwindow">The game list window</a><br>
36<a href="#analyzing">Analyzing a game</a><br>
37<a href="#gameinfosearch">Game info search</a><br>
38<a href="#signaturesearch">Signature search</a><br>
39<a href="#editDBlist">The database list</a><br>
40<a href="#custommenus">The custom menus</a><br>
41<a href="#configure">Configuring Kombilo</a><p>
42<a href="#installation">Installation</a><br>
43<a href="#requirements">Requirements on SGF files</a><br>
44<a href="#troubleshooting">Troubleshooting</a><br>
45<a href="#searchalgorithm">The search algorithm</a></br>
46<p>
47
48<div style="border:none; padding:3px; width:500px;
49background-color:#99CCCC; z-index:1"> 
50<a name="newin04"><font size="4"><b>New features in
51version 0.4</b></font></a></div><p>
52
53<ul>
54
55<li> Custom menus: menus which you can edit yourself. Upon selecting a
56menu entry, the following actions can be performed: search for a predefined
57pattern; search for predefined game information (player, event, ...);
58open the web browser with some html file.  Thus you could create a
59"Fuseki/Joseki pattern" menu, a "Players" or a "Titles" menu.
60
61<li> Even faster SGF parser. (On my computer, Kogo's joseki dictionary now
62comes up immediately.) Furthermore, as of version 0.4b, the parser should
63be pretty robust.
64
65<li> Better handling of large databases.
66
67<li> First SGF editing features: you can now edit the game information, and
68  the comments. (Make sure to have backups of important files ;-) )
69
70<li> Optionally include the whole game list when exporting search results.
71
72<li> Indicate color swap in the list of results
73
74<li> Searches with lots of matches are considerably faster now.
75
76<li> And, as always, several minor fixes and changes.
77
78</ul><p>
79
80<div style="border:none; padding:3px; width:500px;
81background-color:#99CCCC; z-index:1"> 
82<a name="gettingstarted"><font size=4><b>Getting started</b></font></a>
83</div><p>
84
85After <a href="install.html">installing</a> Kombilo, you should
86execute the file 'kombilo.py' (or, under Windows: 'kombilo.pyw'
87(if you downloaded Python separately) respectively 'kombilo.exe',
88if you used the installer).
89
90Two windows will pop up: The main window,
91with a go board and some buttons for navigation, and the game list
92window with an (initially empty) game list, and some buttons for
93the search function.<p>
94
95<IMG SRC="mainwindow.jpg">
96<IMG SRC="gamelistwindow.jpg"><p>
97
98The first thing you have to do now is to add a database to the
99database list; choose the 'Edit DB list' command in the File menu.<p>
100A database corresponds to a directory of SGF files; it contains all the SGF
101files in that directory. Kombilo does not come with any games. You can
102either
103<a href="../go/index.html">download a game collection</a> from the net, or buy a commercial one.<p>
104See also the section <a href="#requirements">requirements on SGF files</a>
105in order to understand which kind of SGF files the program can handle;
106basically, it handles simple game records, they may contain
107variations, but the variations are ignored for the search.
108All filenames have to end in '.sgf'.<p>
109
110<IMG SRC="editdblist.jpg"><p>
111
112When you add a directory for the first time, the SGF files will
113be 'translated' into a format that makes the search more efficient.
114This processing takes quite some time; if you have thousands of games,
115it may take several minutes even on a very fast machine.
116But this has only to be done once. The
117data will be written to several .db files in the same directory.
118Look <a href="#editDBlist">here</a> for more information on the
119buttons in this window.<p>
120
121Of course the sgf files remain in the directory, and Kombilo will never
122change them (unless you change the game info; see below).
123After the processing, the pattern search function actually
124does not use them anymore, but they are needed for the game info search
125and if you want to play through games with the SGF viewer.
126<p>
127
128<b><a name="oldTknote">Note:</a></b> In some Python versions the widget
129for selecting a directory is not available. (Technically speaking, they
130come with an old Tk version; Tk is the programming language underlying
131the GUI toolkit.) As a
132consequence, the program will crash once you press the 'Add DB' button
133in the 'Edit DB list' window. I think that this is mainly a problem on
134Windows95/98 systems, but it may happen on other systems, too. <BR>
135There is the following work-around: Check the 'Old Tk version'-option
136in the 'Advanced' submenu of the options menu. Now the 'Add DB' button
137will bring up a widget to select a file; this widget is always available.
138In order to select a certain directory which should be added as a
139database, you have to select any file in it. <BR>
140It is still possible to add all subdirectories of some directory
141at the same time, by the 'Add subdir's recursively' option. To do so,
142you have to select a file in the main directory. (If it doesn't
143contain any files, but only the subdirectories you want to add,
144you have to copy any file to that directory first. Don't take
145an sgf file because (probably) you don't want that sgf file to
146show up in the database.)<p>
147
148<div style="border:none; padding:3px; width:500px;
149background-color:#99CCCC; z-index:1"> 
150<a name="firstsearch"><font size="4"><b>The first search</b></font></a>
151</div><p>
152
153<table border="0" width="100" cellpadding="6" align=RIGHT>
154<tr><td><IMG SRC="expl_basic.jpg"></td></tr>
155<tr><td><i>Place stones on the board by clicking. Ctrl-click to remove
156stones, and Shift-click to place wildcards. Mark the search-relevant
157region by right-click and drag</i></td></tr>
158</table>
159Now the game list should contain some files, and you can start the first search.
160<br>
161
162With the right mouse key (click and drag) you can create a darker rectangle
163on the board which shows the search-relevant region.
164<img src="expl_select.jpg" align="left" vspace="10" hspace="20">
165Everything outside that
166region is ignored: on the one hand it does not matter if there are additional
167stones on the main board, on the other hand all games will be found which feature
168the given pattern in the relevant region, no matter what else is on the board.
169Of course, mirroring and rotating the board is automatically taken into account.<p>
170<img src="onepixel.gif" width="600" height="20">
171
172<table border="0" width="100" cellpadding="6" align=RIGHT>
173<tr><td><IMG SRC="expl_color.jpg"></td></tr>
174<tr><td><i>You can either place black and white stones alternatingly,
175or stones of one color only.</i></td></tr>
176</table>
177
178When no region is selected, the whole board is relevant.<br>
179
180After defining the pattern and the relevant region, just press the search button.
181Then the game list will be erased, and afterwards all games in which the
182given pattern occurs will be inserted again.<p>
183
184<img src="onepixel.gif" width="600" height="80">
185
186If you click on a game in the game list, the game info (players, result, komi,
187event, date etc.) is displayed below the game list.<p>
188<IMG SRC="results.jpg"><p>
189By double-clicking on a game in the game list, you create a new window with an
190SGF viewer, where you can look at that game. You can also start the viewer by
191selecting a game (by a single click) and pressing the return key.
192(If you like, you can use your
193customary SGF editor instead of the simple SGF viewer coming with Kombilo;
194use the 'Alternative SGF viewer' command in the Options menu.
195(Linux/Windows only,I think)) <p>
196By clicking on a game with the right mouse key, a window will pop up
197where the complete game info is displayed, and can be edited.<p>
198
199Furthermore, below the game list some statistics will be shown on the
200continuations in the given position.
201
202In the first line you find there the number of hits (which, obviously,
203can be bigger than the number of games in the list); after this number,
204in parentheses, is the number of matches with colors as on the board
205respectively reversed colors. Finally, you get the B/W winning
206percentages corresponding to the hits (i.e. a game where the pattern
207occurs several times, is counted that often). <br>
208Below some information on the continuations in the search position
209is given. For the ten most frequent continuations, you get<br>
210- the number of hits in which this continuation is played<br>
211- graphically, it is shown, how often white played at this point
212  after a tenuki (light gray), how often white played there directly
213<table border="0" width="120" cellpadding="5">
214<tr><td><img src="statistics.jpg" align="left"></td></tr></table>
215  after the pattern was finished (white), how often black
216  played there directly after the pattern was finished (black),
217  and finally how often black played after tenuki at the given point.<br>
218- finally, below the letter labelling the corresponding point on the board
219  (use the ABC button to display the labels on the board), you get
220  the black winning percentage for white playing at this point,
221  and then the black winning percentage for black playing there.
222  (Because there is not enough space, the winning percentage for white is
223  not given, but of course (neglecting jigos etc.) it will be
224  100% - black winning percentage.<br>
225
226You can disable the 'show tenuki' feature by setting the colors
227used for it to white resp. black in the Options menu (Advanced -
228Customize appearance).<br>
229
230Click on the 'ABC' button above the board in order to display the
231corresponding labels on the board.<p>
232
233<IMG SRC="joseki_dict.jpg" align="right"><p>
234If you have a sufficient number of games in your databases,
235this lets you create fuseki and joseki
236dictionaries very easily:
237
238The color of the label indicates whether black or white (or both,
239depending on the game, in case of the gray labels) played on this point.
240<p>
241<img src="onepixel.gif" width="20" height="100"><p>
242
243<div style="border:none; padding:3px; width:500px;
244background-color:#99CCCC; z-index:1"><a name="moresearchpatterns">
245<font size="4"><b>More complicated search patterns</b>
246</font></a></div><p>
247
248There are several buttons to customize the search in the game list
249window:
250<img src="searchoptions.jpg" align="left">
251Usually the pattern obtained by reversing the colors is
252searched for too, but you can disable that with the 'fixed color'
253option. <br>
254As a default, Kombilo uses the 'smart fixed color' option,
255which automatically enables 'fixed color' for whole board
256searches, and disables it for all other searches. You can change
257that in the options menu; see also <a href="#configure">below</a>.
258
259Furthermore, for a pattern on the edge or in the middle of the board,
260the program also looks for translations; this can be disabled
261by the 'fixed anchor' option.<p>
262
263Finally, you can impose a move limit, such that only games
264are found where the pattern occurs before the given limit.<p>
265
266You can also add wildcards to the search pattern, by shift-clicking on
267some point. These will be marked by small green circles, and mean that
268in the search these points may be either empty or contain a stone of
269either color.<p>
270
271For example, the following pattern finds all kos (that are not on the edge):<p>
272
273<IMG SRC="search_patt_ko.jpg"><p>
274
275<div style="border:none; padding:3px; width:500px;
276background-color:#99CCCC; z-index:1"> 
277<a name="exportresults"><font size="4"><b>Export search results</b></font>
278</a></div><p>
279
280If you want to save some information on a pattern search, you
281can use the 'Export search results' function in the File menu.
282This will open a new window with a very simple text editor.
283It will contain the search pattern, the search pattern with
284the continuations, some statistical information on the search,
285and the number of hits in each database.<br>
286
287You can edit the information and in the end save the text to a
288file. I would be interested in hearing your opinion if other
289or additional information should be given, or if the information
290should be presented in another format.<br>
291
292You can choose the 'style' of the output in the Options menu.
293Usually you will choose 'ASCII', which produces plain text.
294If you want to use the output for Sensei's Library, choose
295'Wiki' instead.<p>
296
297<div style="border:none; padding:3px; width:500px;
298background-color:#99CCCC; z-index:1"> 
299<a name="gamelistwindow"><font size="4"><b>The game list
300  window</b></font></a>
301</div><p>
302
303At the top, the game list window shows the number of games currently in the
304list, and the B/W winning percentages (the two number will often not
305add up to 100% since there might be Jigo's, unfinished games etc.)
306
307Below the list, there are several buttons and switches. <br>
308<table border="0" width="100" cellpadding="6" align=RIGHT>
309<tr><td><IMG SRC="backreset.jpg"></td></tr>
310<tr><td><i>The 'back' and the 'reset' button.</i></td></tr>
311</table>
312The 'back' button jumps back to the previous search: the position on
313the board is restored as well as the game list.<br>
314
315The 'reset' button serves to reset the game list, i.e. to put all
316the games from the currently active databases in it, again.<p>
317
318<img src="searchbuttons.jpg" align=RIGHT>
319Last but not least, in the game list window there are the
320buttons to start a search: a pattern search, a game info search,
321respectively a signature search.<p>
322
323<div style="border:none; padding:3px; width:500px;
324background-color:#99CCCC; z-index:1"> 
325<a name="analyzing"><font size="4"><b>Analyzing a game</b></font></a>
326</div><p>
327
328If you want to analyze a game of your own, just load it into the main board with
329the 'Open' command in the file menu. Use the navigation buttons to
330navigate through
331the file, and search for patterns appearing in your game: for the first few moves
332you may want to do a whole board search, in order to see up to which point
333the fuseki
334you played also occurs in professional games, and afterwards you have
335to select an
336appropriate relevant region.<p>
337
338You can add stones (or remove stones); before you can continue going through the
339SGF file, you will have to remove (add) those stones again by using the 'back'
340button.<p>
341
342You can also load a fuseki or joseki dictionary
343For example, Kombilo works quite well with Kogo's joseki dictionary.
344Since this is a huge file, it may take a few seconds to load it, but 
345it is a really useful combination to study joseki.
346To navigate all the variations, you should enable the 'Show next move'
347option.<p>
348
349<div style="border:none; padding:3px; width:500px;
350background-color:#99CCCC; z-index:1"> 
351<a name="gameinfosearch"><font size="4"><b>Game Info search</b></font></a>
352</div><p>
353
354If you are looking for games by a particular player, from a particular
355event or from a certain time period, you can use the
356game info search. This is basically a text search in the SGF game records.<p>
357
358<img src="isearch.jpg" align=RIGHT>
359The games have to match all the requirements (Black Player, Event, ...)
360simultaneously. The corresponding string does not have to occur at the
361beginning of the data (i.e. if you enter 'Chikun' as player,
362games where Cho Chikun plays will be found).<br>
363
364The 'Anywhere' entry is simply a text search in the SGF file. This allows
365you to search for the result (use 'RE[W' or 'RE[B'), for games which
366have a game comment (use 'GC['), etc.<br>
367
368Note that the search is always case-sensitive.
369<p>
370
371<div style="border:none; padding:3px; width:500px;
372background-color:#99CCCC; z-index:1"> 
373<a name="signaturesearch"><font size="4"><b>Signature search</b></font></a>
374</div><p>
375
376<img src="ssearch.jpg" align=RIGHT>
377In order to check for duplicates in the database, Kombilo
378computes a modified
379<a href="http://www.andromeda.com/people/ddyer/go/signature-spec.html">Dyer signature</a>
380 of every game in the database. The signature of a game is
381given by the coordinates (in SGF format) of the moves 20, 40, 60,
38231, 51, 71. This almost always characterizes a game uniquely.<br>
383
384In order to detect games which differ only by a symmetry of the board,
385Kombilo uses a symmetrized Dyer signature: the Dyer signatures
386for the game and for all rotations/reflections of the game
387are computed, and then the smallest of these (with respect to
388the lexicographic order) is stored.<br>
389
390You can also search for the signature. This might be useful
391to see if a certain game is in the database if you have
392the game record in some (foreign-language) book, say, and cannot read the
393player's names.<br>
394
395Press the 'signature search' button, and a window will
396pop up, where you can enter the coordinates of the corresponding
397moves. If you click on an intersection on the board,
398the corresponding coordinates will be entered in the
399currently active text entry below, and the next entry will be made
400active. So you can enter the signature simply by clicking on
401the places where moves 20, 40, ... were played. You can also omit
402some of them (in most cases, two or three of the moves will
403be enough to characterize a game uniquely).<p>
404
405<div style="border:none; padding:3px; width:500px;
406background-color:#99CCCC; z-index:1"> 
407<a name="editDBlist"><font size="4"><b>The database list</b></font></a>
408</div><p>
409
410For Kombilo, a database is just a directory with SGF files in it.
411The database list is thus a list of directories. These contain
412the SGF files in which Kombilo will search for a given pattern.<br>
413
414Before you start working with Kombilo, you have to choose
415the databases (i.e. you have to tell Kombilo where your SGF
416files are). This is done in the 'Edit DB list' window
417(available via the File menu). In this window, the list of
418databases is shown, and you can<p>
419
420<b>Add databases</b> This lets you choose a directory of SGF files
421which is then added to Kombilo's database list. Because the SGF files
422have to be translated into a format which is mor suitable for
423the pattern search, this usually takes some time.<br>
424If you check the 'add subdir's recursively' option, then all
425subdirectories (and their subdirectories ...) of the directory you
426choose will be added, too.<br>
427
428The optimal size (i.e. number of SGF files) of the databases
429depends mostly on the amount of memory in your computer.
430I recommend a size of  1000-2000 SGF files per
431database; that should be fine on almost any system.
432If you have a lot of memory, you can experiment with larger databases,
433but the performance gains are usually not that big.
434<p>
435
436<b>Toggle normal/disabled</b>
437If you want to temporarily exclude a database from some searches,
438you can use this button to set its status to 'disabled'.
439It will then be marked as 'DISABLED' in the database list.
440Its games will not show up anymore in the game list, and
441will not be found by any search. Nevertheless, Kombilo's
442database files written during the processing are still
443available, and if you toggle the status back to 'normal',
444you can use that database again without processing it again.
445<p>
446
447<b>Remove a database</b>
448If you want to remove a database from Kombilo's list completely,
449choose this button. The database files Kombilo has written will
450then be deleted. Of yourse, the SGF files themselves will not
451be deleted (Kombilo will actually never change them.)
452If you want to add this database again later, it will
453have to be processed again.
454<p>
455
456<b>Reprocess a database</b>
457If you made any changes to the SGF files in one of the
458database directories (or added/deleted SGF files in there),
459you should reprocess the database, so that the pattern search
460really uses the information corresponding to the current
461version of the SGF files.
462<p>
463
464<b>Stop processing</b>
465If you chose to add a lot of subdirectories of some directory
466at the same time (with the 'add subdir's recursively' option),
467and see that the processing takes too long, you can interrupt
468it with this button. The currently processed database will
469be finished, and then the processing will stop.<p>
470
471<b>Save messages</b> 
472If there are errors in the SGF files, or if Kombilo
473finds duplicates, a message is issued. The 'save messages'
474button allows you to save these messages into a file,
475such that you can look at them later again in order to
476correct the errors. (After correcting any errors,
477you should reprocess the corresponding databases.)<p>
478
479<div style="border:none; padding:3px; width:500px;
480background-color:#99CCCC; z-index:1"> 
481<a name="custommenus"><font size="4"><b>The custom menus</b></font></a>
482</div><p>
483
484
485The custom menus can be used to add your own menu entries.
486Upon selecting a menu entry, Kombilo can do a pattern search for some
487pre-defined pattern and/or a game info search and/or open a html file in
488your web browser. For example, you could create entries for fuseki or
489joseki patterns, for players, or for titles.<p>
490<img src="custommenus.jpg" align=RIGHT>
491
492To edit the custom menus, select the corresponding entry in the Options
493menu. You see a list of the currently existing menus, submenus and
494entries. The first line with a * represents the Kombilo main menu. You can
495add submenus or entries to the menus, or delete them.<p>
496
497When an entry is selected, you can 
498
499<ul>
500<li> Add pattern information by pressing the corresponding button. The pattern
501  (and search-relevant region, and the search options) will then be
502  associated with this menu entry).
503
504<li> Add game info information by clicking the corresponding button. A window
505  will pop up where you can enter the information to search for.
506
507<li> Add a HTML file by entering the file name in the corresponding field, or
508  by browsing for a file.
509</ul><p>
510
511<div style="border:none; padding:3px; width:500px;
512background-color:#99CCCC; z-index:1"> 
513<a name="configure"><font size="4"><b>Configuring Kombilo</b></font></a>
514</div><p>
515
516You can configure Kombilo by changing the options in the
517options menu.<p>
518
519<b>Edit custom menus</b>
520See <a href="#custommenus">above</a>.<p>
521
522<b>Fuzzy stone placement</b>
523Place the stones on the main board slightly off the exact
524point, in a random direction, to make the position
525look more natural. (Well, some people might think that it
526is just ugly, so you can switch it off here).
527<p>
528
529<b>Shaded stone mouse pointer</b>
530(Don't) Show the current position of the mouse pointer on
531the board and the color of the next stone to be played
532by a shaded stone.
533<p>
534
535<b>Show next move</b>
536In case a SGF file has been loaded, show the position of the
537next move with a circle.<p>
538
539<b>Jump to match</b>
540This controls the behaviour of the SGF viewer when you open
541a game from the game lis tafter a pattern search.
542If this option is checked, the viewer will jump directly to the position
543where the pattern you searched for was found in that game.
544<p>
545
546<b>Smart fixed color</b>
547If this option is enabled, the 'fixed color' option will be automatically
548enabled when you select the whole board as search-relevant region,
549and disabled when you select a smaller region. (You can nevertheless
550change that after selecting the region and before starting the search.)
551This is useful because if 'fixed color' is not used, Kombilo regards
552a position and the same position with swapped colors as equivalent;
553in the case of whole board searches that can lead to counter-intuitive
554results when you look at the continuations (e.g. place a black resp.
555white stone on the upper left resp. upper right hoshi, do
556a whole board search without 'fixed color', and look at the
557continuations).<p>
558
559<b>Export style</b>
560This option controls the format in which information on the previous
561search is exported (compare 'Export search results' in the File menu).
562You can choose between ASCII-style, which is just plain text, and
563is the standard. E.g. it is suitable if you want to post information
564on some search to the usenet newsgroup rec.games.go. The other choice
565is Wiki-style which is useful to write pages for
566<a href="http://senseis.xmp.net">Sensei's Library</a>.<p>
567
568Finally, you can choose if all continuations should appear in the
569exported diagram (which might become more or less unreadable, if there
570are lots of continuations), or if only the first ten points
571(i.e. those which also appear in the statistics information below
572the game list) should be shown.<p>
573
574
575<b>Uppercase labels</b>
576If you want to use the 'Export search results' function to
577produce output for Sensei's Library, it is useful to use
578lowercase labels for the continuations, since only lowercase
579letters are automatically understood by Sensei's Library.
580If you do not want to do that, and find that uppercase
581labels look better, you can use this option.<p>
582
583<b>Show color swap</b>
584If this is active, in the list of results for a pattern search
585hits for the pattern with reversed colors will have a minus sign.
586<p>
587
588<b>Advanced:</b> This is a submenu with options that
589are seldom changed.<p>
590
591<b>Number of remembered searches</b>
592As we have seen, with the 'back' button you can jump back to the previous
593search. This option controls the number of previous searches that are remembered.
594The default is 5, and if your machine has only a small amount of memory
595(less them 64MB, say), you probably should not set it much higher, or
596Kombilo might run out of memory and crash.<br>
597On the other hand, if you have lots of memory, it might be convenient
598to set it to a higher number, or even to 0, which means 'no limit': all
599searches are remembered, as long as there is enough memory.
600<p>
601
602<b>Alternative SGF viewer</b> (Unix/Windows only):
603If you want to use your customary SGF viewer/editor instead of
604the viewer coming with Kombilo, enter the command to start it
605and the command line options that tell it to open a certain
606sgf file here (put an %f where the filename should be).
607(If your viewer supports it, you can also put an %n where
608the move number the viewer should jump to directly should be
609put.)<br>
610
611For example, on my Linux machine, I could use
612
613<pre>/home/ug/cgoban-1.9.11/cgoban
614-edit %f</pre>
615
616in order to use CGoban. In order to use WinMGT under Windows,
617enter something like
618
619<pre>c:\winmgt\winmgt.exe
620%f</pre>
621
622Of course, in both cases you may have to adjust the path,
623and possibly the command itself.<br>
624
625If your viewer supports jumping directly to a certain move
626in a game, you can use %n as a placeholder for the move
627number of the first match.
628
629Delete the command in order to use v.py.<br>
630<p>
631
632
633<b>Sloppy SGF parsing</b>
634If this is enabled, Kombilo will accept SGF files which
635have multiple occurrences of the same tag in a node, or
636which have line breaks in move tags. (Both of these are
637forbidden by the SGF standard, and other SGF readers may not be
638able to read such files.)
639<p>
640
641
642<b>Use C search routine</b>
643Enable or disable the (much faster) C search routine. If the
644C search function could not be imported, this option is
645disabled. See the file install.txt for information on
646how to install the C search function.<br>
647
648If you think the C search routine is still too slow, just
649use the Python search a couple of times. When you switch
650back again, you will be enthusiastic about the C search :-)
651But seriously: I do intend to improve the search engine
652further, but I think that currently there are more important
653things to do. If you have good ideas how to improve the
654search algorithm, I am certainly interested in hearing them.
655<p>
656
657<b>Duplicates</b>
658This option says what the program should do with games that
659are already in the database, but are about to be inserted again
660(by 'AddDB'). You can either completely omit the duplicate check
661(to save some time during the processing), always accept (but get
662a warning message) or always reject
663duplicates, or have the program ask in each single case.<br>
664
665If you use the 'strict duplicate check' option, Kombilo will
666not only compare the symmetrized Dyer signatures of the games,
667but also the final positions. This makes is much less likely
668that different games are shown as duplicates. On the other hand,
669if the same game occurs twice, but with a different orientation,
670or with minor errors in the game record, the strict duplicate
671check will not find it. Thus you probably should use this option
672only in special cases.
673<p>
674
675<b>Old Tk version</b>
676On (some?) Windows9x systems, Python doesn't come with a widget
677to select a directory. If this is the case for your system,
678and the 'Old Tk version' option is not checked, the program will crash
679when you press the 'AddDB' button. If you enable this option,
680a widget to select a file will be used instead. (See the
681<a href="#oldTknote">note above</a>).
682<p>
683
684<b>Customize appearance</b>
685On choosing this item, you get a window where you can fine tune
686several fonts, font sizes, and colors that Kombilo uses. See
687also the section on the global GUI options.
688
689<b>Save options</b>
690Save the options (except for 'Use C search routine')
691and also the size and position of the two
692main windows.<p>
693
694<b>Changing global GUI properties</b>
695You can change some 'global properties' like background color, type
696and size of the font used in the game list and in the text windows
697etc. by editing the file 'kombilo.app' in the main Kombilo
698directory. This is a plain text file; if you change it, please
699make sure to save the new version as plain text (ASCII), too.
700The format of the file should be pretty obvious. Before you
701change it, make a backup which you can restore in case Kombilo
702won't start with the changed version.<p>
703
704<div style="border:none; padding:3px; width:500px;
705background-color:#CCCC66; z-index:1"> 
706<a name="installation"><font size="4"><b>Installation</b></font></a>
707</div><p>
708
709To install Kombilo on a Windows system, you can just download the
710installer and run it. It will copy the Kombilo files to your hard
711disk, (optionally) create a shortcut in the start menu and/or an
712icon on the desktop, and you are all set ... and can continue with
713the <a href="#gettingstarted">Getting started</a> section below.<p>
714
715If you want to use Python for other purposes too, or on other
716platforms, you have to install Python and Kombilo separately.
717Read on to learn how to do this.
718
719<H4>Installing Python</H4>
720
721Python is a high-level programming language. It is freely available
722from the <a href="http://www.python.org/">Python website</a>.
723There you can also find more detailed information on Python.
724You may also go directly to the <a href="http://www.python.org/download/">
725Download area</a>.<p>
726
727If you have to install Python, you should take the most recent
728version (2.2 at the moment). Kombilo will also run under versions
7292.0 and 2.1. (Kombilo 0.4 will definitely not work with 1.5.2;
730it might not be that hard to fix this, but if you really want
731to use Kombilo with Python 1.5.2, you probably have to do it yourself.) <p>
732
733<b>--- Windows</b>
734If you are using Windows, just download the Python installer,
735and run it. It should then only take a few mouse clicks to install
736Python.<br>
737
738If you are not sure if you succeeded to install Python properly,
739this is how you can test it:<br>
740
741Type c:\python22\python in a DOS box (you might have to replace
742c:\python22 by the path where you installed Python). The python
743interpreter will then start:<br>
744<IMG SRC="pythoninterpr.jpg"><p>
745You can quit the Python interpreter with <i>Ctrl-Z</i> plus
746<i>Return</i>.<p>
747
748<b>--- Unix/Linux</b>
749The chances are good that Python comes with your distribution, and
750maybe it is already installed on your system. To check this, just
751try to start 'python' in a terminal window. The Python interpreter
752should then start. You also need the GUI toolkit Tkinter. After
753starting the Python interpreter, you can check if it works as
754follows:<p>
755<pre>
756ug@ugoertz:~$ python
757Python 2.1.2 (#1, Jan 18 2002, 18:05:45)
758[GCC 2.95.4  (Debian prerelease)] on linux2
759Type "copyright", "credits" or "license" for more information.
760>>> from Tkinter import *
761>>> root = Tk()
762>>>
763</pre><p>
764A small empty window should then pop up. You can leave the interpreter
765with Ctrl-D. If Python does not come with your distribution, or you
766want to install a more recent version, download the
767source tarball and build Python yourself. Detailed instructions
768are given in the Python README file.<p>
769
770<b>--- Other platforms</b>
771Python is available for most current platforms, in particular
772for the Mac. Unfortunately I cannot give you any hints on the
773installation procedure, but they should be readily available
774from the Python website.<p>
775
776<H4>Installing Kombilo</H4>
777
778Download the Kombilo archive (kombilo04.tar.gz, kombilo04win.zip or
779kombilo04.zip, depending on which operating system you use),
780and unzip it. A new directory named kombilo04 will be created,
781and the Kombilo files will be put there.<p>
782
783If you had installed the prior version of Kombilo,
784you should nevertheless install Kombilo 0.4 as explained above,
785in a directory kombilo04. You can just delete the kombilo01/2/3
786directory. The sgf databases have to be added and processed anew.
787(If this doesn't work, try to delete the files namelist.db, finalpos.db
788and lists.db from the directories with SGF files.)<p>
789
790Now you can already try Kombilo: start it by
791clicking on the kombilo.pyw icon in the Explorer (or from a DOS box by
792<i>c:\python22\pythonw kombilo.pyw</i>).<p> 
793On a Linux system, simply
794<i>python kombilo.py</i> should do. You could also make the file
795kombilo.py executable and if necessary adjust the Python
796path in its first line. Then you can simply start it
797directly as <i>kombilo.py</i>
798
799<H4>Faster pattern search</H4>
800
801Finally, you should install the faster pattern search function.
802It is not written in Python, but in C++ (another programming language),
803which makes things a little bit more complicated, but it's well worth
804it.<p>
805
806<b>--- Windows</b>
807Download the file Cextxy.zip (where x.y is the version of your
808Python distribution, i.e. 2.0, 2.1 or 2.2) from the main Kombilo
809page. It is important that you take the file corresponding to
810your version.<br>
811Then simply put it in the kombilo04 directory and unzip it
812(there are two files in it:  matchC.pyd and sgfparserC.pyd).
813That's all you have to do -
814the fast search function should work now.<br>
815If you have got a C++ compiler, you can also compile the C++
816extension yourself. Brief instructions how to do this with
817the free MinGW package based on the GNU C/C++ compiler gcc can
818be found in the file install.txt that comes with Kombilo, in
819the doc subdirectory.<p>
820
821<b>--- Linux</b>
822Probably the easiest way is to compile the C++ extension
823yourself: The command
824<pre> 
825gcc matchC.cc -O2 -I/usr/include/python -fpic -shared -o matchC.so
826gcc sgfparserC.cc -O2 -I/usr/include/python -fpic -shared -o sgfparserC.so
827</pre>
828should do it. (You may have to adapt the path to the Python include files,
829though.) <br>
830You can also download the compiled version from the main
831kombilo page. (Make sure to download the file corresponding
832to the Python version that you use.)
833<p>
834
835<b>--- Other platforms</b>
836It should not be hard to install the C++ extension on other systems
837if you have a C++ compiler. But I cannot give you any advice on
838that. If you succeed to do it, e.g. for the Mac, please let me know.
839I'd also be glad to put a binary file on my web site.
840<p>
841
842
843<div style="border:none; padding:3px; width:500px;
844background-color:#CCCC66; z-index:1"> 
845<a name="requirements"><font size="4"><b>Requirements on SGF
846  files</b></font>
847</a></div><p>
848
849There are a few requirements on the SGF files that are used in the
850databases. They will be satisfied by ordinary game records, but
851might not be satisfied by "strange" SGF files.<p>
852
853First of all, the filename of an SGF file always has to end in '.sgf'.<p>
854
855The program does not handle several game records in a single SGF file.
856All but the first record are simply ignored.<p>
857
858The program expects that in the game record there are alternating black
859and white plays. Variations are ignored; only the first (main) variation is
860followed.<p>
861
862In addition, at the very beginning an initial position can be set up. This
863is what happens in handicap games, for example. So handicap stones are treated
864correctly. It is also possible to set up an initial position consisting
865of black and white stones, like a go problem. On the other hand, "during the
866game", i.e. after the first black or white move has been played, no stones may
867be added or removed except for the ordinary alternating black/white moves (and
868except for captures, of course). In particular, all stones in the initial
869position have to be set up in the same node of the SGF file. Unfortunately,
870in a few handicap games of the Go Teaching Ladder, this is not the case;
871you will have to edit these files manually if you want to use them with Kombilo.<p>
872
873Empty nodes are skipped. When the usual
874'black play' - 'white play' - 'black play' ... order is broken,
875Kombilo will stop processing the game in question at that point.
876This is another problem with games of the Go Teaching Ladder: in some of them,
877after a variation forked off a black/white move is not shown with the usual
878B/W tag, but with a AB/AW tag (which should be used to set up stones like
879handicap stones). Kombilo will process these games only until the
880first variation.<p>
881
882All moves after a pass (or after an illegal move) are ignored.<p>
883
884The viewer does accept most SGF features, I think. In particular it handles
885variations (the navigation has to be done by clicking on the concerning
886points on the board), and adding/removal of stones during the game. It
887displays labels, but it does not properly display text labels with more
888than one letter/digit.<p>
889
890It ignores some of the new SGF tags like "good for black", "bad for white",
891... .<p>
892
893Kombilo ignores everything before the first '(;'. In particular, it will
894accept files with am email header and an SGF file after that. Be aware,
895though, that the header will be lost when you change the game info
896of that game: whenever Kombilo writes an SGF file, it will only write
897the game (resp. the game collection) itself. (Do you think that this
898should be changed? Please tell me!)
899
900<div style="border:none; padding:3px; width:500px;
901background-color:#CCCC66; z-index:1"> 
902<a name="troubleshooting"><font size="4"><b>Troubleshooting</b></font></a>
903</div><p>
904
905I am not sure if the following descriptions are too technical.
906If you have a problem and these hints do not help you,
907feel free to ask me, and I'll try to help.<p>
908
909
910<b>The program doesn't start:</b><br>
911First you should make sure that Python is installed properly on
912your system (see the section on installing python).
913If Python works, you should try to start Kombilo from a DOS box
914(with a command like c:\python22\python kombilo.pyw). Then all
915error messages are written
916to that DOS box, and they might provide a clue what's going wrong
917(see <a href="#winoldap">below</a> (the program doesn't quit properly ...),
918though).
919If you can't solve the problem yourself, feel free to email me;
920please include any error messages you get as well as a description
921when the problem occurs.
922<p>
923
924<b>The program crashes when I press 'Add DB'</b><br>
925This happens if your Python distribution doesn't include a
926widget to select a directory; as far as I know, this is
927the case on (some?) Windows95/98 systems. As a work-around, check the
928'Old Tk version' option in the Advanced options menu (and
929save the options). Then 'Add DB' will bring up a widget to
930select a file, which is always available.
931In order to select a database, just select any
932file in the corresponding directory.
933See <a href="#oldTknote">this note</a> above too.<p>
934
935<a name="winoldap">
936<b>The program doesn't quit properly when started from a DOS box</b></a><br>
937This is a known (and unfortunately non-resolvable) bug
938on Win9x systems. Sometimes, when you start the program (or any
939other Python program that uses Tkinter) from a DOS box
940via <i>c:\python22\python kombilo.py</i>, after quitting the program
941the DOS box will hang. You can kill it by killing the Winoldap
942application in the task manager. Unfortunately there are even more
943processes which remain alive, but which the task manager doesn't
944show. This may cause Windows to not shut down properly.
945The bottom line is that you should not start Kombilo from a DOS box,
946or should use pythonw instead of python. (This problem won't occur
947after <i>c:\python22\pythonw kombilo.py</i>, but that command will
948not give you the error messages, either.)
949More information on this bug can be found
950<a href="http://mail.python.org/pipermail/python-bugs-list/2001-September/006958.html">here</a>.<p>
951
952<b>Other problems</b><br>
953If you have a problem that is not mentioned here, one thing you could
954do is to start Kombilo from a DOS box (with a command like
955c:\python22\python kombilo.pyw). Then all error messages are written
956to that DOS box, and they might provide a clue what's going wrong.
957If you can't solve the problem yourself, feel free to
958<a href="mailto:u@g0ertz.de">email me</a>;
959please include any error messages you get as well as a description
960when the problem occurs.<p>
961
962
963<div style="border:none; padding:3px; width:500px;
964background-color:#CCCC66; z-index:1"> 
965<a name="searchalgorithm"><font size="4"><b>The search algorithm</b></font></a>
966</div><p>
967
968What follows is an outline of the search algorithm that Kombilo
969uses. I am not sure if anybody finds this interesting, but I
970include these notes anyway. I am certainly interested to hear your
971suggestions for a faster/more efficient algorithm.<p>
972
973<b>I. Basic algorithm</b><p>
974
975The first step of each search is to check in which games (and at which
976positions) the search pattern could have occured given the final position
977of the game. Then the program plays through all those games which could
978yield a hit, and checks if the search pattern really occured there.<p>
979
980Thus during the processing of the SGF files, the final position of each
981game is stored. But because of captures and under the stones plays, one has
982to be a bit careful here. We do not need the actual final position, but
983rather a record on which intersections at some time in the game a black
984(resp. a white) stone has been placed. In particular, in this sense an
985intersection can "contain" a black as well as a white stone.<p>
986
987To be able to play through the game as fast as possible, the information in
988the SGF file is translated to a list of moves and captured stones at each
989move (the information about captured stones is not explicitly
990contained in the SGF file, and it would take quite some time to check for
991captures at each move when going through a game).<p>
992
993