home *** CD-ROM | disk | FTP | other *** search
/ Sunny 1,000 Collection / SUNNY1000.iso / Files / W31 / Puzzle / CHESSU4.ZIP / REORG.TXT < prev    next >
Encoding:
Text File  |  1996-02-09  |  7.2 KB  |  209 lines

  1.  
  2. The following is in response to many questions I have seen posted.
  3.  
  4.   -Paul
  5.  
  6. ps: with the recent release of PGNSort, another, perhaps easier, method
  7.     for breaking out a large file by ECO or opening descriptions is possible.
  8.     The procedure outlined here is still useful for updating individual
  9.     ECO or opening collections from files composed of miscellaneous games.
  10.  
  11.  
  12. (Re) Organizing Your PGN Collection
  13. ===================================
  14.  
  15. There are many reasons for building a collection of chess games but common
  16. to all is some element of research during a review of the data. This means
  17. there must be a method to locate games of interest.
  18.  
  19. The large chess file is one approach and I have heard from someone who
  20. maintains files holding 10,000 games each. One problem then is finding
  21. software which will handle such files. Perhaps only a large editor or word
  22. processor is suitable.
  23.  
  24. ChessU4 and most of the other "U4" utilities are somewhat more modest--the
  25. optimum file size is 4000 games.
  26.  
  27. Splitting games among smaller files can also have a disadvantage--one must
  28. have a system to locate a given game across multiple files. To reduce
  29. multiple-file searches, there are two reasonable methods for organizing
  30. files:
  31.  
  32.     1) by ECO (Encyclopedia of Chess Opening) codes
  33.     2) by PGN Opening descriptions
  34.  
  35. The second method has only been possible since early 1994 when PGN was
  36. introduced. Realistically, it came about a year later when chess software
  37. was finally developed to assign opening descriptions.
  38.  
  39. Two "U4" programs which will add the "Opening" tag and description to PGN
  40. games are NORMAL.exe and ECOClass.exe. NORMAL does so by expanding
  41. previously assigned ECO codes into descriptions. ECOClass is more
  42. sophisticated--it will assign both the ECO codes and the descriptions.
  43.  
  44.     Using NORMAL
  45.       - games must have ECO codes
  46.       - the file, ECOIND.txt, available in many libraries, must
  47.         be in the local (NORMAL) directory
  48.       - run NORMAL with switch "expandECO=1"
  49.  
  50.     Using ECOClass
  51.       - any valid PGN game can be classified
  52.       - all materials necessary for classification are included
  53.         with the download
  54.       - see the ECOClass help file for instructions (ReadMeEC.txt)
  55.  
  56.  
  57.  
  58. If 1000 games in a file of high-quality (GM) games were assigned
  59. descriptions, we might find this distribution,
  60.  
  61.     195 - Queen's Gambit
  62.     170 - Sicilian
  63.      75 - English
  64.      75 - King's Indian
  65.      75 - Ruy Lopez
  66.      50 - Queen's Indian
  67.      40 - Caro-Kann
  68.      30 - French
  69.      30 - Gruenfeld
  70.      30 - Nimzo-Indian
  71.      30 - Perc
  72.  
  73. That would account for all but 200 of the games. Right away we can see a
  74. method for distributing the games across several files.
  75.  
  76. Is it going to be a big job? Not at all. The main problem will be one of
  77. concentration--not making any mistakes which would botch the process and
  78. cause one to start over. An old-fashioned pencil and paper will be
  79. necessary to take down game counts and make sure everything was accounted
  80. for at the end.
  81.  
  82. First, however, an observation must be made to investigate the spelling of
  83. descriptions. If the games have been taken from numerous sources, it is
  84. perhaps best to reclassify them all to get standard opening names assigned.
  85.  
  86. Looking just at the Queen's Gambit we might find these descriptions,
  87.  
  88. [Opening "Queen's Gambit"]
  89. [Opening "Queen's Gambit, Accepted"]
  90. [Opening "Queen's Gambit, Declined"]
  91. [Opening "Queen's Gambit, Declined, Anti-Meran Defense"]
  92. [Opening "Queen's Gambit, Declined, Exchange System"]
  93. [Opening "Queen's Gambit, Declined, Meran Defense"]
  94. [Opening "Queen's Gambit, Declined, Semi-Slav Defense"]
  95. [Opening "Queen's Gambit, Slav Defense"]
  96.  
  97. "Queen's Gambit" -- that makes sense. All we have to so is remember the
  98. apostrophe. It's not a bad idea either to include the starting quote in the
  99. search as some opening names are used again in variations of other openings.
  100.  
  101. Now return to our mixed file of 1000 games. Call it file AAAAA.txt.
  102.  
  103. Start ChessU4 with AAAAA.txt as input then enter the find command,
  104.  
  105.     > f*
  106.  
  107. You will be prompted for a string...
  108.  
  109.     > "Queen's Gambit
  110.  
  111. ...then a file name to save the selected games...
  112.  
  113.     > BBBBB.txt
  114.  
  115. ChessU4 will reply with, "195 games written to BBBBB.txt." A new prompt
  116. will appear,
  117.  
  118.     Save the NOT component of selected games? y/n >
  119.  
  120. Enter "y" (yes). Save to a third file,
  121.  
  122.     > CCCCC.txt
  123.  
  124. Again, the echo, "805 games written to CCCCC.txt."
  125.  
  126. The "NOT component save" subtracts out the games from the first iteration,
  127. saving what's left to a separate file. Our source file for the second pass
  128. will now be file CCCCC.txt, not AAAAA.txt.
  129.  
  130. Now, to continue the process, do a restart (r) with ChessU4, opening the
  131. file CCCCC. Keep recording the game counts and file names on your process
  132. log to assure accuracy.
  133.  
  134. Once file CCCCC has been opened, you can start from the top again, doing an
  135. initial "f*" search on,
  136.  
  137.     > "Sicilian
  138.  
  139. When you're through, the final "NOT component" file will contain just the
  140. miscellaneous openings--those that weren't selected out by any of the
  141. searches. When done, you'll want to rename the files (but you probably
  142. already guessed that meaningful file names could have worked just as well.)
  143.  
  144. You might also want to combine several of the less-common openings into a
  145. single file. You _could_ do this by appending but perhaps a single-pass
  146. method is simpler,
  147.  
  148.     > f*
  149.     > <"Nimzo-Indian>,<"Gruenfeld>,<"Perc>
  150.  
  151. The bracketed <> strings separated by commas tell U4 to select matches on
  152. string 1 *OR* string 2 *OR* string 3. If the commas were omitted, the
  153. condition is *AND* (not apt to be suitable to the above example).
  154.  
  155.  
  156. Other ChessU4 Searches
  157. ======================
  158.  
  159. The next time you want to find games matching a certain position, you'll
  160. know where to look. ChessU4 has two types of position searches. The basic
  161. position search requires a terminated line of notation,
  162.  
  163.   Queen's Gambit line
  164.   1.d4 d5 2.c4 c6 3.Nf3 Nf6 4.Nc3 dxc4 5.a4 Bf5 6.Ne5 e6 7.f3 Bb4 1/2
  165.  
  166. Put it as the only (or top) line in default file, GamesU4.txt. Start
  167. ChessU4 and open the Queen's Gambit file (mine was BBBBB). Select the
  168. position search option...
  169.  
  170.     > p
  171.  
  172. ...then verify that the search line is in file GamesU4. On 200 Queen's
  173. Gambit games, you should get several matches. If you did not, use the "p*"
  174. position search command,
  175.  
  176.     > p*
  177.  
  178. This tells ChessU4 to keep advancing towards the start of the line until a
  179. match is found. Once a match _has_ been found, "No" answered to the "search
  180. complete?" prompt will continue searching at an ever more shallow depth.
  181. (Pressing Enter is the same as answering, "No.")
  182.  
  183. The games output to a file will be ordered from the nearest matches on
  184. down. Use the (r) restart option to open and review the saved games.
  185.  
  186.  
  187. That's enough for a start at reorganization of a chess game collection.
  188. There are many other possible approaches. One such would be to use PGNSrt
  189. followed by CChunk and process all the divisions in a single pass.
  190.  
  191. ps: don't forget that ChessU4 can search game headers and notation in other
  192. ways as well. Here's one example to find all Alekhine's Def. games by
  193. searching on the ECO codes,
  194.  
  195.     > f*
  196.     > <ECO "B02>,<ECO "B03>,<ECO "B04>,<ECO "B05>
  197.  
  198. ...and another that could be used to split games into the five ECO
  199. volumes...
  200.  
  201.     > f*
  202.     > ECO "A
  203.     ...
  204.     > ECO "B    <etc.>
  205.  
  206.   [fin]
  207.  
  208.  
  209.