Palview4 Manual * The Palview Pages * The Palview Developers Forum * Home * Palamede

## The p3eco Program and Opening Names The p3eco program reads a special text file that contains a set of 'lines' that make up each position along with the ECO code and name(s) to attach to the position. It will create a special binary file that contains the positions, in a compressed 32-byte format, along with the ECO code and name(s) (also compressed). Note that the p3eco program and both the p3eco.txt and p3eco.eco files have not changed since Palview3, so there was no need to rename them for this new program version, Palview4. Along with Palview you'll find the p3eco program along with a file called p3eco.txt and another called p3eco.eco. The p3eco.txt is the file that contains the opening lines. You can add to this file or edit it. Once you are done you simply drag & drop it onto p3eco.exe to have it create the binary version (p3eco.eco) that Palview reads. The p3eco.txt file is a slightly modified version of Paul Onstad's ECOMast.txt file. Paul helped a great deal in sharing ideas about how to create the binary file that Palview reads. Paul has worked very hard over the last few years to improve the readability of ECOMast and to keep it up to date by adding new lines as they have come into common practice. He was very kind in letting us use this file for Palview for which we are very grateful to him. Paul used ECOMast for a few of his fine PGN tools, especially his program EcoClass. Here is a brief example from the p3eco.txt file:
    A01    Nimzovich-Larsen Attack: 1...e5 Main Line ; *pwo 6/01 add
    1.b3 e5 2.Bb2 Nc6 3.e3 Nf6 4.Bb5 d6 1/2

    A01/23 Nimzovich-Larsen Attack: Correspondence Line ; *pwo 6/01 add
    1.b3 e5 2.Bb2 Nc6 3.e3 d5 4.Bb5 Bd6 5.f4 f6 1/2

    A02    Bird's Opening
    1.f4 1/2

    A04    Reti ;(or English, KIA, KID, QGD, Closed Sicilian) Openings
    1.Nf3 c5 2.g3 1/2

    A04/11 Reti: King's Indian Attack: Neo-Closed Sicilian ;
    1.Nf3 c5 2.g3 Nc6 3.Bg2 g6 4.O-O Bg7 5.d3 d6 6.e4 e5 7.c3 Nge7
    8.a3 O-O 9.b4 b6 10.Bb2 h6 11.Nbd2 1/2

    ; this next Line placed last for compatibility w/ some U4 readers
    E83 King's Indian: Saemisch: Zaitsev Variation
    1.d4 Nf6 2.c4 g6 3.Nc3 Bg7 4.e4 d6 5.f3 O-O 6.Be3 Nc6
    7.Nge2 Rb8 1/2

    B81/09 Sicilian: Scheveningen: Keres Attack 7.g4 ;
    1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e6 6.Be3 a6 7.g4 h6
    8.f4 e5 9.Nf5 h5 (10.gxh5 exf4 11.Bxf4 Nxh5 12.Nxd6+ Bxd6
    13.Bxd6 Qh4+ 14.Kd2 {perpetual}) 1/2
As you can see above, the general format of a 'line' consists of a code-name section followed by the sequence of moves that arrive at the 'position'. The code-name line begins with an ECO book (A .. E), followed by a code (00 .. 99), and an optional subcode '/' (00 .. 99). The next part is the name section. The name can have as many as three fields, each separated by a ':' character. The first field is the Opening, the next is the Variation, and the last is the Subvariation. You don't have to have a Variation or Subvariation. If all you want is an Opening then simply omit the use of the ':' character as in the example:
    A02    Bird's Opening
    1.f4 1/2
You can add a comment to the end of the code-name line using a semicolon ';' as in this example:
    A04    Reti ; (or English, KIA, KID, QGD, Closed Sicilian) Openings
    1.Nf3 c5 2.g3 1/2
In fact, you can have a number of comment lines simply by starting each line with ';' as in:
    ; File: p3ECO.txt

    ; This file is based almost entirely upon the file ECOMast.txt
    ; that has been lovingly cared for and tended by Paul Onstad.
    ; Both Franz Hemmer and J.E.H.Shaw also contributed greatly to
    ; the original work. I have included Paul Onstad's introduction
    ; and notes below.
One other note about the code-name line. P3eco uses a specific function that tries to compress these lines by looking for common capitalized words and then reducing them to a special two-character 'token' which is then expanded by Palview. Most of these special words are great player's names, since their name often is attached to the 'line' of their invention. Other words are common in opening manuals, like 'Gambit', 'Opening', 'Variation', 'Attack', etc. You should try to capitalize your own opening lines in the p3eco.txt file in order to take advantage of the 'compression' function to reduce the physical size of the resulting p3eco.eco binary file. (Of course, you don't have to do this, it is just recommended.) The complete list of 'known' words appears at the end of this section. The next section of a 'line' is the sequence of moves that arrive at the 'position'. Here you just have the moves, as they would appear in a PGN file, followed by the end of line marker, 1/2. This section is pretty straight forward. The only thing to note is the use of the '{' and '}' characters to add a comment into the sequence of moves as in this example:
    B81/09 Sicilian: Scheveningen: Keres Attack 7.g4 ;
    1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 e6 6.Be3 a6 7.g4 h6
    8.f4 e5 9.Nf5 h5 (10.gxh5 exf4 11.Bxf4 Nxh5 12.Nxd6+ Bxd6
    13.Bxd6 Qh4+ 14.Kd2 {perpetual}) 1/2
Also note the use of the '(' and ')' characters in the above line. Here, these characters do NOT have the same meaning as they do in PGN, where they are used to enclose a variation. In the p3eco.txt file they are just a way of highlighting a few moves. They have no other use and they are simply ignored by the p3eco.exe program. (The enclosed moves are played out just as if they were not enclosed by '(' and ')' at all.) That is pretty much all you need to know to begin to use the P3eco program and the p3eco.txt file. Only note that the moves in the p3eco.txt file themselves are 'thrown away' by the program and only the 'position' is kept when creating the binary p3eco.eco file. This means that adding such evaluations as '!' and '?' after a move will have no effect since these will be tossed away along with the moves. The p3eco.eco file contains 2,717 unique positions along with their names. The file itself is 385,608 bytes, not too big considering. Now we need to use a couple of options in Palview in order to be able to use our new opening file. The first is used to set the name of the opening file to use: ecofilename = "p3eco.eco" Normally this is an empty string. If the string remains empty then no opening file will be loaded by Palview. If you do provide a file name, as in the above, then Palview will first attempt to open the file in the same folder as the PGN file. If the file isn't found there then Palview will look for it in the same folder as the Palview program itself. (This is just like the same procedure it uses to locate the palview.INI file.) Once the opening file has been read into memory, Palview will perform a position search after each move in each game (up to the length of the longest move sequence in the file). If it finds a match for the position, it will then read the ECO code into the game's ECO Tag string and then fill out the Opening, Variation, and Subvariation Tags as well with the matching position's 'name(s)'. When each game is 'finished' being played, the new Tag values are saved along with the game. These Tag values are then used just as if they had been entered along with the game as part of its PGN Tag list:
    [Event "State Ch."]
    [Site "New York, USA"]
    [Date "1910.??.??"]
    [Round "?"]
    [White "Capablanca"]
    [Black "Jaffe"]
    [Result "1-0"]
    [ECO "D46"]
    [Opening "QGD"]
    [Variation "Semi-Slav"]
    [Subvariation "Chigorin Defense"]
Normally we would display this in our infobox in this way: But in order to conserve valuable screen space we recommend using the tooltipopening option that will tell Palview to 'tooltip' the variation and subvariation 'name(s)' rather than actually write them directly onto the screen. The command is: tooltipopening = on When 'on' you would get something like: Here is the complete list of words that Palview uses for compression:
    char *openkeystr[] = {
     "Accelerated", "Accepted", "Adorjan", "Advance", "Alapin",
     "Albin", "Alekhine", "Allgaier", "Anderssen", "Andersson",
     "Anglo-", "Anti-", "Antoshin", "Archangel",  "Aronin",
     "Attack", "Austrian", "Averbakh",

     "Barcza", "Basman", "Bastrikov", "Bellon", "Benko",
     "Benoni", "Berger", "Berlin", "Bernstein", "Bird",
     "Bishop", "Blackburne", "Blackmar", "Blumenfeld", "Bogo-Indian",
     "Bogolyubov", "Boleslavsky", "Bondarevsky", "Borisenko",
     "Botvinnik", "Bremen", "Breyer", "Bronstein", "Browne",
     "Budapest", "Byrne",

     "Cambridge Springs", "Canal", "Capablanca", "Carls", "Caro-Kann",
     "Catalan", "Centre", "Charousek", "Chatard", "Chekhover",
     "Chigorin", "Classical", "Closed", "Cochrane", "Colle",
     "Counter", "Cozio", "Cunningham", "Czech",

     "Danish", "Declined", "Defense", "Defensive", "Deferred",
     "Diemer", "Double", "Dragon", "Duras", "Dutch",

     "Elikases", "English", "Englund", "Euwe", "Evans",
     "Exchange", "Fajarowicz", "Falkbeer", "Fianchetto", "Fischer",
     "Flohr", "Formation", "Four", "French", "Furman",

     "Gambit", "Game", "Geller", "Gipslis", "Giuoco",
     "Gligoric", "Goering","Grob", "Gruenfeld", "Gurgenidze",

     "Hanham", "Hedgehog", "Holmov", "Huebner", "Hungarian",

     "Ilyin-Genevsky", "Indian", "Ivkov",

     "Jaenisch", "Janowsky",

     "Kalishnikov", "Karlsbad", "Karpov", "Kasparov", "Kavalek",
     "Keres", "Kieseritsky", "King's", "Kingside", "Kmoch",
     "Knight", "Kopec", "Korchnoi", "Kotov", "Kramnik",

     "Labourdonnais", "Larsen", "Lasker", "Latvian", "Leningrad",
     "Leonhardt", "Levenfish", "Line", "Lisitsin", "Ljubojevic",
     "Loewenthal", "London",

     "MacCutcheon", "Main Line", "Makagonov", "Manhattan", "Mariotti",
     "Maroczy", "Marshall", "Max Lange", "McDonnell", "Meran",
     "Mieses", "Mikenas", "Milner-Barry", "Modern", "Moeller",
     "Morphy", "Muzio",

     "Najdorf", "Neo-", "Nimzo-Indian", "NimzoIndian", "Nimzovich",
     "Noteboom",

     "Opening", "Opovcensky", "Orthodox",

     "Pachman", "Panno", "Panov", "Paulsen", "Pawn",
     "Pelikan", "Petrosian", "Petrov", "Philidor", "Piano",
     "Pillsbury", "Pirc", "Polish", "Polugaievsky", "Ponziani",
     "Positional", "Prins",

     "Queen's", "Queens", "Quinteros",

     "Ragozin", "Rauzer", "Reshevsky", "Reti", "Reversed",
     "Richter", "Robatsch", "Romanishin", "Rosenthal", "Rossolimo",
     "Rubinstein", "Russian", "Ruy Lopez",

     "Saemisch", "Scandinavian", "Scheveningen", "Schlechter",
     "Schliemann", "Scotch", "Seirawan", "Semi-Slav", "Shirov",
     "Short", "Sicilian", "Simagin", "Slav", "Smith-Morra",
     "Smyslov", "Sokolsky", "Sozin", "Spanish", "Spassky",
     "Spielmann", "Stahlberg", "Staunton", "Steiner", "Steinitz",
     "Stonewall", "Suttles", "Svenonius", "Sveshnikov",
     "Symmetrical", "System",

     "Taimanov", "Tarrasch", "Tartakower", "Teichmann", "Three",
     "Torre", "Trompovsky",

     "Uhlmann", "Ulvestad", "Urusov",

     "Variation", "Velmirovic", "Veresov", "Vienna",

     "Wade", "Winawer", "Wing",

     "Yugoslav", "Yusupov",

     "Zaitsev", "Zukertort",
We would like to thank Paul Onstad for all his kind help with our p3eco program. We are sad to report that Paul passed away in the summer of 2002. He will be greatly missed by us all.