I'm writing an EPD (Extended Position Description) parser and I have a doubt about what numbers means at end of "predicted variation" opcode.

Look the follow EPD sample:

rq2r1k1/5pp1/p7/4bNP1/1p2P2P/5Q2/PP4K1/5R1R w - - bm Nxg7 BT-2630.1; ce 182; acs 0; acn 106652; pv 1.Nxg7 Kxg7 2.Qxf7+ Kh8 3.Qh7+ Kxh7 4.Rf7+ Kg6 5.Rf6+ Bxf6 6.h5+ Kxg5 (38.748) 112.9; c0 depth=8

As its possible to notice, the opcode pv ends with numbers (38.748) 112.9. That

I started from the article in the Chess Programming Wiki. There I found some related materials, like the PGN specification, that have a more elaborated EPD documentation an some links to EPD entries examples. However, I can't find any explanation about the meaning of the numbers.

Does anyone have some material with a more elaborated documentation about the EPD (or PGN) format?

  • 1
    Your link to "EPD examples" is a duplicate of the link to the PGN spec. – Chromatix Mar 3 '20 at 6:28
  • Fixed. Thank you! – Welyab Paula Mar 3 '20 at 7:01

On a strict reading of the EPD spec, the example shown is malformed; the pv opcode should only contain a list of moves, not any commentary on it, which should be moved to other opcodes. Indeed the move numbers should not be there either, only raw SAN moves.

I assume that some naive EPD author has simply dumped the output of an engine into it.

Indeed following the discussion from your (fixed) examples link, the first reply seems to agree with me:

Crafty has an option to clean up epd (called epdpfdr) that produces EPD output that most programs can read. You have a few errors in your output below.

No numbers in the pv!
Like this: Nxg7 Kxg7 Qxf7+ Kh8 Qh7+ Kxh7 Rf7+ Kg6 Rf6+ Bxf6

Also (a common mistake) is to put ... in the front of the pv when it is black to move. This is not allowed. You did not do that, but I just wanted to mention it.

This stuff:
(73.507) 130.7;
is not allowed except in the comments field.

  • Thank you very much! Now I'm sure that I can follow the PGN specification as it is. – Welyab Paula Mar 3 '20 at 11:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.