Perft EPD opcodes

Discussion of chess software programming and technical issues.

Moderator: Ras

Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Perft EPD opcodes

Post by Tom Likens »

Marcel's comments on my ad hoc perft output of his 6000+ Rookie positions started some wheels turning and I wonder if we should consider adding new epd opcodes for passing around perft test suites.

As an example I've generated this:

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - ; d1 20 ; d2 400 ; d3 8902 ; d4 197281 ; d5 4865609 ; d6 119060324 ;
rnbqkbnr/pp1ppppp/2p5/8/6P1/2P5/PP1PPP1P/RNBQKBNR b KQkq - ; d1 21 ; d2 463 ; d3 11138 ; d4 274234 ; d5 7290026 ; d6 195464529 ;
rnb1kbnr/ppq1pppp/2pp4/8/6P1/2P5/PP1PPPBP/RNBQK1NR w KQkq - ; d1 27 ; d2 734 ; d3 20553 ; d4 579004 ; d5 16988496 ; d6 494216738 ;
But this probably isn't correct either. From the standard:
Opcode mnemonics used only by a single program or an experimental suite of
programs should start with an upper case letter. This is so they may be easily
distinguished should they be inadvertently be encountered by other programs.
When a such a "private" opcode be demonstrated to be widely useful, it should
be brought into the official list (appearing below) in a lower case form.
So the lower 'd' opcodes detailing the move counts should probably be uppercase until we reach a consensus. An even more basic question, is this the correct format at all. Is there a better, (i.e. more clever and concise) way of representing this information?

Also a more pedantic question, I'm a bit unclear about the required (or not required) spacing around the semicolon separators ';' used to delineate the various fields. Is the space required or can the semicolon be adjacent to the next opcode? It seems that a robust parser should have no trouble with either since that's the basic purpose of the separator.

Anyway, let the barracks lawyers comment.

regards,
--tom
User avatar
trojanfoe
Posts: 65
Joined: Sun Jul 31, 2011 11:57 am
Location: Waterlooville, Hampshire, UK

Re: Perft EPD opcodes

Post by trojanfoe »

Tom Likens wrote:...
As an example I've generated this:

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - ; d1 20 ; d2 400 ; d3 8902 ; d4 197281 ; d5 4865609 ; d6 119060324 ;
rnbqkbnr/pp1ppppp/2p5/8/6P1/2P5/PP1PPP1P/RNBQKBNR b KQkq - ; d1 21 ; d2 463 ; d3 11138 ; d4 274234 ; d5 7290026 ; d6 195464529 ;
rnb1kbnr/ppq1pppp/2pp4/8/6P1/2P5/PP1PPPBP/RNBQK1NR w KQkq - ; d1 27 ; d2 734 ; d3 20553 ; d4 579004 ; d5 16988496 ; d6 494216738 ;
Yes, the 'D1' etc opcode has already been used before; I recently added an EPD perft test to ChessCore using an EPD posted by Richard Vida in this thread (one above this thread in the list currently).

BTW the first and last semi-colon look redundant to me and the spacing isn't important, although I format opcodes like this:

Code: Select all

D1 12345; D2 23456; D3 56789
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: Perft EPD opcodes

Post by Tom Likens »

trojanfoe wrote:
Tom Likens wrote:...
As an example I've generated this:

Code: Select all

rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - ; d1 20 ; d2 400 ; d3 8902 ; d4 197281 ; d5 4865609 ; d6 119060324 ;
rnbqkbnr/pp1ppppp/2p5/8/6P1/2P5/PP1PPP1P/RNBQKBNR b KQkq - ; d1 21 ; d2 463 ; d3 11138 ; d4 274234 ; d5 7290026 ; d6 195464529 ;
rnb1kbnr/ppq1pppp/2pp4/8/6P1/2P5/PP1PPPBP/RNBQK1NR w KQkq - ; d1 27 ; d2 734 ; d3 20553 ; d4 579004 ; d5 16988496 ; d6 494216738 ;
Yes, the 'D1' etc opcode has already been used before; I recently added an EPD perft test to ChessCore using an EPD posted by Richard Vida in this thread (one above this thread in the list currently).

BTW the first and last semi-colon look redundant to me and the spacing isn't important, although I format opcodes like this:

Code: Select all

D1 12345; D2 23456; D3 56789
Hello Andy,

Yes the last semi-colon is redundant but it's also specified in the EPD spec. I also noticed Richard's post, which is why I duplicated it until Marcel pointed out the EPD spec violations. BTW, I also confirmed Richard's WAC numbers.

regards,
--tom
mvk
Posts: 589
Joined: Tue Jun 04, 2013 10:15 pm

Re: Perft EPD opcodes

Post by mvk »

I'm pretty sure the first semi-colon shouldn't be there while the last one must be there. I didn't know about the special meaning of capitalised opcodes.
I have no idea about spacing requirements.
Tom Likens
Posts: 303
Joined: Sat Apr 28, 2012 6:18 pm
Location: Austin, TX

Re: Perft EPD opcodes

Post by Tom Likens »

mvk wrote:I'm pretty sure the first semi-colon shouldn't be there while the last one must be there. I didn't know about the special meaning of capitalised opcodes.
I have no idea about spacing requirements.
Nice catch. I've replaced the file with the a corrected version which removes the first semicolon.
It's located via the same web link as before:

http://webpages.charter.net/tlikens/tec ... perft.html

.