Changeset 94 for 06/devel/doc
- Timestamp:
- 03/18/04 22:14:32 (5 years ago)
- Files:
-
- 06/devel/doc/tutorial.html (modified) (14 diffs)
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> 4 4 5 5 <meta name="description" … … 12 12 <meta name="author" 13 13 content="Ulrich Goertz"> 14 </ HEAD>15 16 < BODYbgcolor=#FFFFFF>14 </head> 15 16 <body bgcolor=#FFFFFF> 17 17 18 18 <div style="width:600px"> … … 760 760 possible to change it, later.)</p> 761 761 762 <p><b>Character encodings</b> 763 764 If your SGF files are not plain ASCII, but contain other characters, you have to 765 tell Kombilo in which way they are encoded in the file. The best way to do this 766 is with a CA[] tag in the root node of the SGF file (e.g. CA[gb2312]). However, 767 since there are many SGF files out there without the correct tag, you can also 768 tell 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 771 directory which is to be processed have to have the same encoding. Choose the 772 encoding 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 775 remember the encoding of the files in this database however, so Kombilo 776 will 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 779 the encoding of this file. This is probably a good idea if you are sure that you 780 know the right encoding. (Right now, if you have Kombilo add a wrong CA tag, you 781 will have to remove it manually, because Kombilo will always obey a CA tag if 782 present.)</p> 783 784 <p>- Transcode to utf-8: In this case Kombilo will replace the SGF file with a 785 transcoded 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, 790 shift-jis for Japanese or euc-kr for Korean), you have to install the cjkcodecs 791 package. (In the Windows installer, this is already included.) 792 This package may be available as a package in your Linux distribution; for 793 Mac OS X users it is available via fink. Otherwise, 794 you can get it at 795 <a href="http://cjkpython.berlios.de/">http://cjkpython.berlios.de/</a>.</p> 796 797 762 798 <div style="border:none; padding:3px; width:600px; 763 799 background-color:#99CCCC; z-index:1"> … … 1396 1432 1397 1433 <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 will1401 accept files with a memail header and an SGF file after that. Be aware,1434 ... .</p> 1435 1436 <p>Kombilo ignores everything before the first '(;'. In particular, it will 1437 accept files with an email header and an SGF file after that. Be aware, 1402 1438 though, that the header will be lost when you change the game info 1403 1439 of that game: whenever Kombilo writes an SGF file, it will only write 1404 1440 the game (resp. the game collection) itself. (Do you think that this 1405 should be changed? Please tell me!) 1441 should be changed? Please tell me!)</p> 1406 1442 1407 1443 <div style="border:none; padding:3px; width:600px; 1408 1444 background-color:#CCCC66; z-index:1"> 1409 1445 <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. 1413 1449 If 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>1450 feel free to ask me, and I'll try to help.</p> 1451 1452 1453 <p><b>The program doesn't start:</b><br> 1418 1454 First you should make sure that Python is installed properly on 1419 1455 your system (see the section on installing python). … … 1426 1462 If you can't solve the problem yourself, feel free to email me; 1427 1463 please 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> 1464 when the problem occurs.</p> 1465 1466 <p><b>The program crashes when I press 'Add DB'</b><br> 1432 1467 This happens if your Python distribution doesn't include a 1433 1468 widget to select a directory; as far as I know, this is … … 1438 1473 In order to select a database, just select any 1439 1474 file in the corresponding directory. 1440 See <a href="#oldTknote">this note</a> above too.< p>1441 1442 < a name="winoldap">1475 See <a href="#oldTknote">this note</a> above too.</p> 1476 1477 <p><a name="winoldap"> 1443 1478 <b>The program doesn't quit properly when started from a DOS box</b></a><br> 1444 1479 This is a known (and unfortunately non-resolvable) bug … … 1455 1490 not give you the error messages, either.) 1456 1491 More 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> 1460 1495 If you have a problem that is not mentioned here, one thing you could 1461 1496 do is to start Kombilo from a DOS box (with a command like … … 1465 1500 <a href="mailto:u@g0ertz.de">email me</a>; 1466 1501 please include any error messages you get as well as a description 1467 when the problem occurs.< p>1502 when the problem occurs.</p> 1468 1503 1469 1504 … … 1471 1506 background-color:#CCCC66; z-index:1"> 1472 1507 <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> 1476 1511 1477 1512 You 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>1513 button ("DATA") above the board.</p> 1514 1515 <p><b>I don't like the "more beautiful" go stones.</b><br> 1481 1516 1482 1517 You can get back the plain stones by switching the option 1483 1518 "Use 3D stones" off. 1484 1519 You 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> 1520 subdirectory with other files. </p> 1521 1522 <p><b>I'd like to use Kombilo with non-latin (Unicode) characters</b><br> 1489 1523 1490 1524 Kombilo 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>1525 admittedly, I didn't test this very carefully).</p> 1526 1527 <p><b>Command line arguments</b><br> 1494 1528 1495 1529 You can give file names of SGF files as command line arguments, and Kombilo 1496 1530 will open these files upon startup. The file names should be given with the 1497 1531 complete 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"1532 quoted.</p> 1533 1534 <p><b>How can I reset the correct/wrong counter in the "guess next move" 1501 1535 mode?</b><br> 1502 1536 1503 1537 Currently, 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 without1538 "guess next move" mode.</p> 1539 1540 <p><b>My screen is too small to arrange the three Kombilo windows without 1507 1541 overlap ...</b><br> 1508 1542 … … 1516 1550 If you have suggestions how to better arrange the widgets in the Kombilo windows, 1517 1551 I'm interested in hearing them. 1518 < p>1552 </p> 1519 1553 1520 1554 <div style="border:none; padding:3px; width:600px; 1521 1555 background-color:#CCCC66; z-index:1"> 1522 1556 <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 Kombilo1557 </div> 1558 1559 <p>What follows is an outline of the search algorithm that Kombilo 1526 1560 uses. I am not sure if anybody finds this interesting, but I 1527 1561 include 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 which1562 suggestions 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 1533 1567 positions) the search pattern could have occured given the final position 1534 1568 of 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 each1569 yield 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 1538 1572 game is stored. But because of captures and under the stones plays, one has 1539 1573 to be a bit careful here. We do not need the actual final position, but 1540 1574 rather a record on which intersections at some time in the game a black 1541 1575 (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 in1576 intersection 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 1545 1579 the SGF file is translated to a list of moves and captured stones at each 1546 1580 move (the information about captured stones is not explicitly 1547 1581 contained 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 up1582 captures 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 1555 1589 searches 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 board1590 joseki and fuseki searches.</p> 1591 1592 <p>Let me explain the principle in the case of a full board 1559 1593 search. Hashing means to associate to some data a (numerical) 1560 1594 value which is easily computable from the data and which is … … 1566 1600 intersections with white stones. Although it is of course theoretically 1567 1601 possible 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 computes1602 different 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 1571 1605 this hash value for all positions with at most 30 stones on the board 1572 1606 (and for certain corner positions; see below). This information is stored … … 1575 1609 at most 30 stones is requested, Kombilo computes the hash value 1576 1610 of 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>1611 value, 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> 1582 1616 - Full board positions with at most 30 stones<br> 1583 1617 - 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> 1585 1619 1586 1620 … … 1588 1622 background-color:#CCCC66; z-index:1"> 1589 1623 <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> 1593 1627 <a href="#configure">Configuring Kombilo</a><br> 1594 1628 <a href="#custommenus">The custom menus</a><br> … … 1616 1650 <a href="#tipsandtricks">Tips and tricks</a><br> 1617 1651 <a href="#troubleshooting">Troubleshooting</a><br> 1618 1619 1652 </p> 1620 1653 1621 1654 <HR> 1622 <i>Last modified: 15-December-2002</i>1655 <i>Last modified: March 2004</i> 1623 1656 Contact: <a href="mailto:u@g0ertz.de">u@g0ertz.de</a>. 1624 To my <a href="http://www. g0ertz.de/">homepage</a>.1657 To my <a href="http://www.u-go.net/">homepage</a>. 1625 1658 </div> 1626 </ BODY>1627 </ HTML>1628 1629 1630 1659 </body> 1660 </html> 1661 1662 1663
