Crafty's EPD repair command {epdpfdr} stops on this record with an error:
[d]2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
I can't for the life of me see anything wrong with that EPD record. What is the problem?
EPD blindness
Moderators: hgm, Rebel, chrisw
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
-
- Posts: 6401
- Joined: Thu Mar 09, 2006 8:30 pm
- Location: Chicago, Illinois, USA
Re: EPD blindness
2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";Dann Corbit wrote:Crafty's EPD repair command {epdpfdr} stops on this record with an error:
[d]2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
I can't for the life of me see anything wrong with that EPD record. What is the problem?
From the top of my head, I think the dash (in red) is extra. You have already K (castle) and f6 (en passant)
Miguel
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: EPD blindness
Quite right. Thanksmichiguel wrote:2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";Dann Corbit wrote:Crafty's EPD repair command {epdpfdr} stops on this record with an error:
[d]2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
I can't for the life of me see anything wrong with that EPD record. What is the problem?
From the top of my head, I think the dash (in red) is extra. You have already K (castle) and f6 (en passant)
Miguel
-
- Posts: 20943
- Joined: Mon Feb 27, 2006 7:30 pm
- Location: Birmingham, AL
Re: EPD blindness
I will look, but that code is not "Crafty's". Steven Edwards wrote the EPD kit many years ago and actually added it to Crafty's source and sent me the modified code, which I kept. I looked at the code and the EPD string and I too do not see anything that stands out. I deleted everything past the ep target, added two - characters, and it won't work with that either...Dann Corbit wrote:Crafty's EPD repair command {epdpfdr} stops on this record with an error:
[d]2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
I can't for the life of me see anything wrong with that EPD record. What is the problem?
I can delete everything from that "-" on and it is accepted. No idea why. Note that just deleting the "-" won't fix it.
-
- Posts: 1056
- Joined: Thu Mar 09, 2006 4:15 pm
- Location: Long Island, NY, USA
Re: EPD blindness
I agree. An EPD has exactly 4 tokens prior to optional opcodes. Opcodes must start from a list of accepted opcodes. The "-" is not an accepted opcode. An opcode ends with a semicolon after its data.michiguel wrote:2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";Dann Corbit wrote:Crafty's EPD repair command {epdpfdr} stops on this record with an error:
[d]2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
I can't for the life of me see anything wrong with that EPD record. What is the problem?
From the top of my head, I think the dash (in red) is extra. You have already K (castle) and f6 (en passant)
Miguel
Some opcodes are listed here:
http://scid.sourceforge.net/help/EPD.html
Another issue might be the lack of quotes around opcode data. Usually opcode data is embedded in a pair of quotation marks, and sometimes it is not. I do not know what the Standard is.
Disclaimer - I do not know where EPD standards are or where a full list of opcodes are. My views above are based upon my experience with EPDs.
-
- Posts: 1056
- Joined: Thu Mar 09, 2006 4:15 pm
- Location: Long Island, NY, USA
Re: EPD blindness
2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
Looking at this a little further, I see two errors.
First is the "-" as the 5th token, preceding "bm"
Second is the lack of quotations around O-O in bm O-O;
The quotations are needed because of the "-" character. My guess is that the "-" character has some special significance if it is not inside quotes. Usually quotes are not needed.
Looking at this a little further, I see two errors.
First is the "-" as the 5th token, preceding "bm"
Second is the lack of quotations around O-O in bm O-O;
The quotations are needed because of the "-" character. My guess is that the "-" character has some special significance if it is not inside quotes. Usually quotes are not needed.
-
- Posts: 12541
- Joined: Wed Mar 08, 2006 8:57 pm
- Location: Redmond, WA USA
Re: EPD blindness
I do not know of any chess engine that puts quotations around castle moves.Norm Pollock wrote:2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
Looking at this a little further, I see two errors.
First is the "-" as the 5th token, preceding "bm"
Second is the lack of quotations around O-O in bm O-O;
The quotations are needed because of the "-" character. My guess is that the "-" character has some special significance if it is not inside quotes. Usually quotes are not needed.
I thought that quotations were only needed if whitespace were present in a symbol.
-
- Posts: 778
- Joined: Sat Jul 01, 2006 7:11 am
Re: EPD blindness
You are right. From the epd section of pgnstandard.txtDann Corbit wrote:I do not know of any chess engine that puts quotations around castle moves.Norm Pollock wrote:2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
Looking at this a little further, I see two errors.
First is the "-" as the 5th token, preceding "bm"
Second is the lack of quotations around O-O in bm O-O;
The quotations are needed because of the "-" character. My guess is that the "-" character has some special significance if it is not inside quotes. Usually quotes are not needed.
I thought that quotations were only needed if whitespace were present in a symbol.
An operand is either a set of contiguous non-white space printing characters or a string. A string is a set of contiguous printing characters delimited by a quote character at each end.
-
- Posts: 1056
- Joined: Thu Mar 09, 2006 4:15 pm
- Location: Long Island, NY, USA
Re: EPD blindness
The way I look at it:jwes wrote:You are right. From the epd section of pgnstandard.txtDann Corbit wrote:I do not know of any chess engine that puts quotations around castle moves.Norm Pollock wrote:2kr3r/pppn3p/2n1p3/2P1Ppb1/3P4/2N2B2/PP3B1P/3RK2R w K f6 - bm O-O; id "Crafty Test Pos.82"; c0 "MIKE VALVO/DEEP THOUGHT 0.02 Game 1, On the Net 1988-9, move 21W (O-O)";
Looking at this a little further, I see two errors.
First is the "-" as the 5th token, preceding "bm"
Second is the lack of quotations around O-O in bm O-O;
The quotations are needed because of the "-" character. My guess is that the "-" character has some special significance if it is not inside quotes. Usually quotes are not needed.
I thought that quotations were only needed if whitespace were present in a symbol.
An operand is either a set of contiguous non-white space printing characters or a string. A string is a set of contiguous printing characters delimited by a quote character at each end.
If the operand has whitespace, then you MUST enclose in quotes.
If the operand does NOT have whitespace, you have the OPTION to put the operand in quotes.
In the case of the buggy EPD line above, there seems to be an error in the software because the only visible error in the EPD line is an extra "-" and when that is removed, the EPD line is still buggy.
My suggestion is to use the OPTION of quotes around O-O to see if that would work around the presumed bug in the software. There is not a high probability of success, but it might work because I have seen this workaround work on my own software.
I have come across a case in my own software where, in rare situations, quotes are needed around a parameter even though that parameter does not contain whitespace. The problem might be coming from the compiler. Here is an actual example:
tagExtract alpha.pgn Site Paris
works well
tagExtract alpha.pgn Site "Paris"
works well
tagExtract alpha.pgn Site "New York"
works well
tagextract alpha.pgn Site &
does NOT work
tagextract alpha.pgn Site "&"
works well