Tool to convert "pv" from "epd" to "pgn" format

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
Norm Pollock
Posts: 1017
Joined: Thu Mar 09, 2006 3:15 pm
Location: Long Island, NY, USA

Tool to convert "pv" from "epd" to "pgn" format

Post by Norm Pollock » Mon Dec 10, 2018 4:58 pm

I am working on a tool to convert "pv" data from an "epd"/"fen" record to "pgn" format (using FEN) so that it can be used in a PGN viewer/reader.

It will also convert any epd to "pgn" even if no "pv" is present. It will also output "bm" if no "pv" is present. It will just be a shell without moves, or 1 move for "bm".

There are a few constraints.
1) data from other opcodes is not carried forward, such as "ce" and "am".
2) all results are considered undetermined "*". However using PGN-extract with "--fixresulttags" can correct results if the "pv" ends with stalemate or checkmate.
3) the format of the output pgn can be somewhat wide or uneven, especially if LAN is used instead of SAN. "trim" in my "40H-PGN" toolbox can fix the formatting. PGN-extract converts LAN to SAN.
4) 5th and 6th fields in FEN string are set to "0 1" even if they are different in the input.

Keep in mind this is new and may have bugs. If so, please get back to me about bugs, or any suggestions.

download: ... t.exe/file

epdConvert filename.epd
It is not the strongest of the species that survive, nor the most intelligent, but the one most responsive to change. -- Charles Darwin

Post Reply