A tool to test reading pgn file

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

A tool to test reading pgn file

Postby Uri Blass » 08 Nov 2004, 15:57

I plan to write some tool to read pgn file and I want to test if I read it correctly.

If there is a program that can give statistics about the result of perft in every position in the pgn file then it can help.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A tool to test reading pgn file

Postby Richard Pijl » 08 Nov 2004, 16:13

Easiest seems to write a function to write the PGN too. Then you can verify output with the input.
Richard.
User avatar
Richard Pijl
 
Posts: 105
Joined: 26 Sep 2004, 21:09
Location: Minderhout, Belgium

Re: A tool to test reading pgn file

Postby Uri Blass » 08 Nov 2004, 18:41

I do not understand baseed on what information to write the pgn but maybe I did not explain what I want to do.

I want to translate the pgn to another format of position,move that is more easy for the computer to use and I want to verify that there is no error.

I can also have information about results of the game and about the players and more data in different variables but I think to start to care only about the moves.

I see no way to translate the information back to a single pgn even if I remember all the data because there is more than one way to write the same pgn

You can write
1.e2e4 or 1.e4 and both are legal pgn.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A tool to test reading pgn file

Postby Richard Pijl » 08 Nov 2004, 19:32

I see no way to translate the information back to a single pgn even if I remember all the data because there is more than one way to write the same pgn

That is no problem. Process the same file twice (use the output of the first iteration as input to the next one), then the results of the two iterations should be the same.

Anyway, I may be able to help you. You want a list of all game positions in EPD, right? I have several applications that read PGN that I can modify a little to write EPD positions as a side effect. Send me an email with your address, and I'll send something this evening
Richard.
User avatar
Richard Pijl
 
Posts: 105
Joined: 26 Sep 2004, 21:09
Location: Minderhout, Belgium

Re: A tool to test reading pgn file

Postby Rémi Coulom » 12 Nov 2004, 13:56

Uri Blass wrote:I want to translate the pgn to another format of position,move that is more easy for the computer to use and I want to verify that there is no error.


Hi Uri

I am not sure if it is really what you are looking for, but you'll find a tool that does this on my web page. It converts a pgn file to an epd file, with the best move field set to the move that was played during the game.

R?mi
Rémi Coulom
 
Posts: 96
Joined: 12 Nov 2004, 13:47
Location: Lille, France

Re: A tool to test reading pgn file

Postby Uri Blass » 12 Nov 2004, 23:10

Thanks

I thought also that you have source code for that action in your homepage
but I see that pgn2epd.cpp was misleading and it include some other files that are not there so you have not a simple code for it when the only missing functions are chess based function that I already have.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: A tool to test reading pgn file

Postby Rémi Coulom » 13 Nov 2004, 09:58

Uri Blass wrote:Thanks

I thought also that you have source code for that action in your homepage
but I see that pgn2epd.cpp was misleading and it include some other files that are not there so you have not a simple code for it when the only missing functions are chess based function that I already have.

Uri


I am not sure I understand what you mean. The rest of the program is also available from my home page. It is in this archive:
http://remi.coulom.free.fr/programs0046.tar.gz
Rémi Coulom
 
Posts: 96
Joined: 12 Nov 2004, 13:47
Location: Lille, France

Re: A tool to test reading pgn file

Postby Uri Blass » 13 Nov 2004, 11:30

Thanks

I am not sure if I will look at it because I already wasted a lot of time trying to understand Crafty's code about pgn and I will probably have a similiar tool that is based on Crafty's code in the part of reading pgn and I have already something that get closer to translate pgn to epd.

I think to use the same book that I use based on pgn instead of using it based on e2e4e7e5 files and the advantage is not only more convenient way to gneerate a book based on existing files but also being able to calculate easily statistics on pgn file when I can easily see how the results can be used for things like better evaluation.

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv


Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 30 guests