Show
Ignore:
Timestamp:
03/18/04 22:14:32 (5 years ago)
Author:
ug
Message:

Updated tutorial. Misc changes.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • 06/devel/doc/tutorial.html

    r90 r94  
    1 <HTML
    2 <HEAD
    3 <TITLE>Kombilo - tutorial</TITLE
     1<html
     2<head
     3<title>Kombilo - tutorial</title
    44 
    55<meta name="description" 
     
    1212<meta name="author" 
    1313content="Ulrich Goertz"> 
    14 </HEAD
    15  
    16 <BODY bgcolor=#FFFFFF> 
     14</head
     15 
     16<body bgcolor=#FFFFFF> 
    1717 
    1818<div style="width:600px"> 
     
    760760possible to change it, later.)</p> 
    761761 
     762<p><b>Character encodings</b> 
     763 
     764If your SGF files are not plain ASCII, but contain other characters, you have to 
     765tell Kombilo in which way they are encoded in the file. The best way to do this 
     766is with a CA[] tag in the root node of the SGF file (e.g. CA[gb2312]). However, 
     767since there are many SGF files out there without the correct tag, you can also 
     768tell Kombilo about the encoding when you process your SGF databases.</p> 
     769 
     770<p>You have to know in which way your files are encoded, and all SGF files in the 
     771directory which is to be processed have to have the same encoding. Choose the 
     772encoding from the list, and choose what Kombilo should do with your SGF files.</p> 
     773 
     774<p>- Do not change SGF: In this case, Kombilo will not touch your files. It will 
     775remember the encoding of the files in this database however, so Kombilo 
     776will know about the right encoding.</p> 
     777 
     778<p>- Add CA tag: This will add a tag in the root node of the SGF file which contains 
     779the encoding of this file. This is probably a good idea if you are sure that you 
     780know the right encoding. (Right now, if you have Kombilo add a wrong CA tag, you 
     781will have to remove it manually, because Kombilo will always obey a CA tag if 
     782present.)</p> 
     783 
     784<p>- Transcode to utf-8: In this case Kombilo will replace the SGF file with a 
     785transcoded version. CA tag?!</p> 
     786 
     787<p>Note: If a file already has a CA tag, Kombilo will not touch it.</p> 
     788 
     789<p>In order to use codecs for asian languages (like gb2312 or big5 for Chinese, 
     790shift-jis for Japanese or euc-kr for Korean), you have to install the cjkcodecs 
     791package. (In the Windows installer, this is already included.) 
     792This package may be available as a package in your Linux distribution; for  
     793Mac OS X users it is available via fink. Otherwise, 
     794you can get it at  
     795<a href="http://cjkpython.berlios.de/">http://cjkpython.berlios.de/</a>.</p> 
     796 
     797 
    762798<div style="border:none; padding:3px; width:600px;  
    763799background-color:#99CCCC; z-index:1">  
     
    13961432 
    13971433<p>It ignores some of the new SGF tags like "good for black", "bad for white",  
    1398 ... .<p> 
    1399  
    1400 Kombilo ignores everything before the first '(;'. In particular, it will  
    1401 accept files with am email header and an SGF file after that. Be aware, 
     1434... .</p> 
     1435 
     1436<p>Kombilo ignores everything before the first '(;'. In particular, it will  
     1437accept files with an email header and an SGF file after that. Be aware, 
    14021438though, that the header will be lost when you change the game info 
    14031439of that game: whenever Kombilo writes an SGF file, it will only write 
    14041440the game (resp. the game collection) itself. (Do you think that this 
    1405 should be changed? Please tell me!) 
     1441should be changed? Please tell me!)</p> 
    14061442 
    14071443<div style="border:none; padding:3px; width:600px;  
    14081444background-color:#CCCC66; z-index:1">  
    14091445<a name="troubleshooting"><font size="4"><b>Troubleshooting</b></font></a> 
    1410 </div><p> 
    1411  
    1412 I am not sure if the following descriptions are too technical. 
     1446</div> 
     1447 
     1448<p>I am not sure if the following descriptions are too technical. 
    14131449If you have a problem and these hints do not help you, 
    1414 feel free to ask me, and I'll try to help.<p> 
    1415  
    1416  
    1417 <b>The program doesn't start:</b><br> 
     1450feel free to ask me, and I'll try to help.</p> 
     1451 
     1452 
     1453<p><b>The program doesn't start:</b><br> 
    14181454First you should make sure that Python is installed properly on 
    14191455your system (see the section on installing python). 
     
    14261462If you can't solve the problem yourself, feel free to email me; 
    14271463please include any error messages you get as well as a description 
    1428 when the problem occurs. 
    1429 <p> 
    1430  
    1431 <b>The program crashes when I press 'Add DB'</b><br> 
     1464when the problem occurs.</p> 
     1465 
     1466<p><b>The program crashes when I press 'Add DB'</b><br> 
    14321467This happens if your Python distribution doesn't include a 
    14331468widget to select a directory; as far as I know, this is 
     
    14381473In order to select a database, just select any 
    14391474file in the corresponding directory. 
    1440 See <a href="#oldTknote">this note</a> above too.<p> 
    1441  
    1442 <a name="winoldap"> 
     1475See <a href="#oldTknote">this note</a> above too.</p> 
     1476 
     1477<p><a name="winoldap"> 
    14431478<b>The program doesn't quit properly when started from a DOS box</b></a><br> 
    14441479This is a known (and unfortunately non-resolvable) bug 
     
    14551490not give you the error messages, either.) 
    14561491More information on this bug can be found  
    1457 <a href="http://mail.python.org/pipermail/python-bugs-list/2001-September/006958.html">here</a>.<p> 
    1458  
    1459 <b>Other problems</b><br> 
     1492<a href="http://mail.python.org/pipermail/python-bugs-list/2001-September/006958.html">here</a>.</p> 
     1493 
     1494<p><b>Other problems</b><br> 
    14601495If you have a problem that is not mentioned here, one thing you could 
    14611496do is to start Kombilo from a DOS box (with a command like 
     
    14651500<a href="mailto:u@g0ertz.de">email me</a>; 
    14661501please include any error messages you get as well as a description 
    1467 when the problem occurs.<p> 
     1502when the problem occurs.</p> 
    14681503 
    14691504 
     
    14711506background-color:#CCCC66; z-index:1">  
    14721507<a name="tipsandtricks"><font size="4"><b>Tips and tricks</b></font></a> 
    1473 </div><p> 
    1474  
    1475 <b>I closed the "data window" - how do I get it back?</b><br> 
     1508</div> 
     1509 
     1510<p><b>I closed the "data window" - how do I get it back?</b><br> 
    14761511 
    14771512You can show resp. hide the data window with the rightmost 
    1478 button ("DATA") above the board.<p> 
    1479  
    1480 <b>I don't like the "more beautiful" go stones.</b><br> 
     1513button ("DATA") above the board.</p> 
     1514 
     1515<p><b>I don't like the "more beautiful" go stones.</b><br> 
    14811516 
    14821517You can get back the plain stones by switching the option 
    14831518"Use 3D stones" off. 
    14841519You could also replace the files "black.gif" and "white.gif" in the "gifs" 
    1485 subdirectory with other files.  
    1486 <p> 
    1487  
    1488 <b>I'd like to use Kombilo with non-latin (Unicode) characters</b><br> 
     1520subdirectory with other files. </p> 
     1521 
     1522<p><b>I'd like to use Kombilo with non-latin (Unicode) characters</b><br> 
    14891523 
    14901524Kombilo works out of the box with UTF-8 encoded SGF files (although, 
    1491 admittedly, I didn't test this very carefully).<p> 
    1492  
    1493 <b>Command line arguments</b><br> 
     1525admittedly, I didn't test this very carefully).</p> 
     1526 
     1527<p><b>Command line arguments</b><br> 
    14941528 
    14951529You can give file names of SGF files as command line arguments, and Kombilo 
    14961530will open these files upon startup. The file names should be given with the 
    14971531complete path. If blanks occur in the path or in the file name, it has to be 
    1498 quoted.<p> 
    1499  
    1500 <b>How can I reset the correct/wrong counter in the "guess next move" 
     1532quoted.</p> 
     1533 
     1534<p><b>How can I reset the correct/wrong counter in the "guess next move" 
    15011535mode?</b><br> 
    15021536 
    15031537Currently, you can only reset the counter by quitting and reentering the 
    1504 "guess next move" mode.<p> 
    1505  
    1506 <b>My screen is too small to arrange the three Kombilo windows without 
     1538"guess next move" mode.</p> 
     1539 
     1540<p><b>My screen is too small to arrange the three Kombilo windows without 
    15071541overlap ...</b><br> 
    15081542 
     
    15161550If you have suggestions how to better arrange the widgets in the Kombilo windows, 
    15171551I'm interested in hearing them. 
    1518 <p> 
     1552</p> 
    15191553 
    15201554<div style="border:none; padding:3px; width:600px;  
    15211555background-color:#CCCC66; z-index:1">  
    15221556<a name="searchalgorithm"><font size="4"><b>The search algorithm</b></font></a> 
    1523 </div><p> 
    1524  
    1525 What follows is an outline of the search algorithm that Kombilo 
     1557</div> 
     1558 
     1559<p>What follows is an outline of the search algorithm that Kombilo 
    15261560uses. I am not sure if anybody finds this interesting, but I  
    15271561include these notes anyway. I am certainly interested to hear your 
    1528 suggestions for a faster/more efficient algorithm.<p> 
    1529  
    1530 <b>I. Basic algorithm</b><p> 
    1531  
    1532 The first step of each search is to check in which games (and at which 
     1562suggestions for a faster/more efficient algorithm.</p> 
     1563 
     1564<p><b>I. Basic algorithm</b></p> 
     1565 
     1566<p>The first step of each search is to check in which games (and at which 
    15331567positions) the search pattern could have occured given the final position 
    15341568of the game. Then the program plays through all those games which could 
    1535 yield a hit, and checks if the search pattern really occured there.<p> 
    1536  
    1537 Thus during the processing of the SGF files, the final position of each 
     1569yield a hit, and checks if the search pattern really occured there.</p> 
     1570 
     1571<p>Thus during the processing of the SGF files, the final position of each 
    15381572game is stored. But because of captures and under the stones plays, one has 
    15391573to be a bit careful here. We do not need the actual final position, but 
    15401574rather a record on which intersections at some time in the game a black 
    15411575(resp. a white) stone has been placed. In particular, in this sense an 
    1542 intersection can "contain" a black as well as a white stone.<p> 
    1543  
    1544 To be able to play through the game as fast as possible, the information in 
     1576intersection can "contain" a black as well as a white stone.</p> 
     1577 
     1578<p>To be able to play through the game as fast as possible, the information in 
    15451579the SGF file is translated to a list of moves and captured stones at each 
    15461580move (the information about captured stones is not explicitly 
    15471581contained in the SGF file, and it would take quite some time to check for 
    1548 captures at each move when going through a game).<p> 
    1549  
    1550 <b>II. Hash tables</b><p> 
    1551  
    1552 <b>a) The general principle</b><p> 
    1553  
    1554 The one additional feature that is currently used to speed up 
     1582captures at each move when going through a game).</p> 
     1583 
     1584<p><b>II. Hash tables</b></p> 
     1585 
     1586<p><b>a) The general principle</b></p> 
     1587 
     1588<p>The one additional feature that is currently used to speed up 
    15551589searches in certain situations is the use of hash tables for 
    1556 joseki and fuseki searches.<p> 
    1557  
    1558 Let me explain the principle in the case of a full board  
     1590joseki and fuseki searches.</p> 
     1591 
     1592<p>Let me explain the principle in the case of a full board  
    15591593search. Hashing means to associate to some data a (numerical) 
    15601594value which is easily computable from the data and which is 
     
    15661600intersections with white stones. Although it is of course theoretically 
    15671601possible that the resulting number can be obtained starting from several 
    1568 different positions, in practice it uniquely describes the position.<p> 
    1569  
    1570 So when Kombilo translates the SGF files to its own format, it computes 
     1602different positions, in practice it uniquely describes the position.</p> 
     1603 
     1604<p>So when Kombilo translates the SGF files to its own format, it computes 
    15711605this hash value for all positions with at most 30 stones on the board 
    15721606(and for certain corner positions; see below). This information is stored 
     
    15751609at most 30 stones is requested, Kombilo computes the hash value 
    15761610of the search pattern, looks for the list of games which yield this 
    1577 value, and then searches only through this small list.<p> 
    1578  
    1579 <b>b) In which situations are hash tables used?</b><p> 
    1580  
    1581 Kombilo produces (and uses) hash values for the following situations:<br> 
     1611value, and then searches only through this small list.</p> 
     1612 
     1613<p><b>b) In which situations are hash tables used?</b></p> 
     1614 
     1615<p>Kombilo produces (and uses) hash values for the following situations:<br> 
    15821616- Full board positions with at most 30 stones<br> 
    15831617- Positions which include at least one 7x7 corner square with  
    1584   at most 25 stones in it. <p> 
     1618  at most 25 stones in it. </p> 
    15851619 
    15861620 
     
    15881622background-color:#CCCC66; z-index:1">  
    15891623<a name="index"><font size="4"><b>Index</b></font></a> 
    1590 </div><p> 
    1591  
    1592 <a href="#analyzing">Analyzing a game</a><br> 
     1624</div> 
     1625 
     1626<p><a href="#analyzing">Analyzing a game</a><br> 
    15931627<a href="#configure">Configuring Kombilo</a><br> 
    15941628<a href="#custommenus">The custom menus</a><br> 
     
    16161650<a href="#tipsandtricks">Tips and tricks</a><br> 
    16171651<a href="#troubleshooting">Troubleshooting</a><br> 
    1618  
    1619  
     1652</p> 
    16201653 
    16211654<HR> 
    1622 <i>Last modified: 15-December-2002</i>  
     1655<i>Last modified: March 2004</i>  
    16231656Contact: <a href="mailto:u@g0ertz.de">u@g0ertz.de</a>. 
    1624 To my <a href="http://www.g0ertz.de/">homepage</a>. 
     1657To my <a href="http://www.u-go.net/">homepage</a>. 
    16251658</div> 
    1626 </BODY
    1627 </HTML
    1628  
    1629  
    1630  
     1659</body
     1660</html
     1661 
     1662 
     1663