I just read the readme file in your excellent utility set and figured it out just as you answered. It works like a charm

Thanks also to Dann Corbit and all the others who reached out to help !!

Moderator: Ras
You can take it another step if you want to. "idOpcode" together with "epdInsert" in "40H-EPD" puts in line number opcodes for the epd records, and "gameNum" in "40H-PGN" puts in game number comments for the pgn games. Using both you can "connect" each epd record with its corresponding game.PaulieD wrote:Thanks Norm,
I just read the readme file in your excellent utility set and figured it out just as you answered. It works like a charm:
Thanks also to Dann Corbit and all the others who reached out to help !!:
I am good the way it is Norm.Norm Pollock wrote:You can take it another step if you want to. "idOpcode" together with "epdInsert" in "40H-EPD" puts in line number opcodes for the epd records, and "gameNum" in "40H-PGN" puts in game number comments for the pgn games. Using both you can "connect" each epd record with its corresponding game.PaulieD wrote:Thanks Norm,
I just read the readme file in your excellent utility set and figured it out just as you answered. It works like a charm:
Thanks also to Dann Corbit and all the others who reached out to help !!:
Created a tool to output the last position of every game in a pgn file both in fen and epd format, the tool uses pgn2fen.exe program and a python script converted to exe file so that it is not necessary to install python.PaulieD wrote:Looking to simply convert PGN to EPD, but it needs to be the ending pgn positions (leaf nodes) not every move like PGN Extract GUI does.
I have Python 3.4 installed and Ferdinand's PGN sorting tool. Can a simple bat file be creating to convert any pgn file to EPD with ending FEN? PGN Extract Gui does not allow switches to be added to the GUI commands.
Code: Select all
orig.pgn file is found!!
pgn2fen.exe file is found!!
Converting pgn to epd using pgn2fen ...
Error loading PGN: Error: Line 88473: Unexpected End-of-file
elpased time: 31 sec
Saving end position of every game in epd and fen format ...
elpased time: 162 msec
done!!
Press enter key to exit
Code: Select all
5r2/8/P7/1P1k4/R7/2P5/K7/8 w - - fmvn 76; hmvc 1; id 1;
7R/8/8/8/8/8/2K1p3/4kr2 b - - fmvn 110; hmvc 3; id 2;
4k3/2r2pb1/pqN1p3/2R1P3/1P4p1/6P1/5P2/2Q3K1 w - - fmvn 47; hmvc 10; id 3;
8/3k4/2R5/p1Rp4/P3r3/5KP1/3r4/8 w - - fmvn 87; hmvc 15; id 4;
6R1/8/8/3P4/5p2/2K3k1/7p/6r1 b - - fmvn 81; hmvc 2; id 5;
Code: Select all
5r2/8/P7/1P1k4/R7/2P5/K7/8 w - - 1 76
7R/8/8/8/8/8/2K1p3/4kr2 b - - 3 110
4k3/2r2pb1/pqN1p3/2R1P3/1P4p1/6P1/5P2/2Q3K1 w - - 10 47
8/3k4/2R5/p1Rp4/P3r3/5KP1/3r4/8 w - - 15 87
6R1/8/8/3P4/5p2/2K3k1/7p/6r1 b - - 2 81
8/8/8/8/8/6k1/2r5/4K3 b - - 1 64
8/6pk/2Q2p1p/p4P2/P5PP/5PK1/8/4q3 w - - 9 54
Code: Select all
end_pos.epd
end_pos.fen
Ferdinand,Ferdy wrote:Created a tool to output the last position of every game in a pgn file both in fen and epd format, the tool uses pgn2fen.exe program and a python script converted to exe file so that it is not necessary to install python.PaulieD wrote:Looking to simply convert PGN to EPD, but it needs to be the ending pgn positions (leaf nodes) not every move like PGN Extract GUI does.
I have Python 3.4 installed and Ferdinand's PGN sorting tool. Can a simple bat file be creating to convert any pgn file to EPD with ending FEN? PGN Extract Gui does not allow switches to be added to the GUI commands.
To run double-click the PgnToEpdAndFenEndPosV1.exe file and be sure you have orig.pgn file, this is your source pgn file. Also the pgn2fen.exe (already included in the download file) is required.
Sample run:
That "Error loading PGN: Error: Line 88473:..." shown by pgn2fen, would mean that there is a blank line in the orig.pgn file at the end of file. That 88473 is the number of line in the pgn file. If the supplied pgn file has no blank line at the end, that error message will not appear. Anyway that error does not create problems in the extraction of the epd lines.Sample epd output, added the id to easily track the epd line.Code: Select all
orig.pgn file is found!! pgn2fen.exe file is found!! Converting pgn to epd using pgn2fen ... Error loading PGN: Error: Line 88473: Unexpected End-of-file elpased time: 31 sec Saving end position of every game in epd and fen format ... elpased time: 162 msec done!! Press enter key to exit
Sample fen output:Code: Select all
5r2/8/P7/1P1k4/R7/2P5/K7/8 w - - fmvn 76; hmvc 1; id 1; 7R/8/8/8/8/8/2K1p3/4kr2 b - - fmvn 110; hmvc 3; id 2; 4k3/2r2pb1/pqN1p3/2R1P3/1P4p1/6P1/5P2/2Q3K1 w - - fmvn 47; hmvc 10; id 3; 8/3k4/2R5/p1Rp4/P3r3/5KP1/3r4/8 w - - fmvn 87; hmvc 15; id 4; 6R1/8/8/3P4/5p2/2K3k1/7p/6r1 b - - fmvn 81; hmvc 2; id 5;
Output file:Code: Select all
5r2/8/P7/1P1k4/R7/2P5/K7/8 w - - 1 76 7R/8/8/8/8/8/2K1p3/4kr2 b - - 3 110 4k3/2r2pb1/pqN1p3/2R1P3/1P4p1/6P1/5P2/2Q3K1 w - - 10 47 8/3k4/2R5/p1Rp4/P3r3/5KP1/3r4/8 w - - 15 87 6R1/8/8/3P4/5p2/2K3k1/7p/6r1 b - - 2 81 8/8/8/8/8/6k1/2r5/4K3 b - - 1 64 8/6pk/2Q2p1p/p4P2/P5PP/5PK1/8/4q3 w - - 9 54
Other story, the advantage of the fen format is that it has the fifty move counter. This is also the required format in uci protocol. At present Cutechess-cli will not read the fifty move counter since it only supported epd format.Code: Select all
end_pos.epd end_pos.fen
LB and winboard will read the fen format. To use epd file in LB, you may rename the end_pos.fen to end_pos_fen.epd.
Download:
http://www.mediafire.com/download/4so08 ... dPosV1.rar