Looking for PGN file tools

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Post Reply
mjlef
Posts: 1315
Joined: Thu Mar 30, 2006 12:08 pm
Contact:

Looking for PGN file tools

Post by mjlef » Fri Sep 04, 2015 6:39 pm

I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark

Sven
Posts: 3576
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany

Re: Looking for PGN file tools

Post by Sven » Fri Sep 04, 2015 10:04 pm

You might want to check the PGN tool collection by Norm Pollock.

User avatar
Laskos
Posts: 8023
Joined: Wed Jul 26, 2006 8:21 pm

Re: Looking for PGN file tools

Post by Laskos » Fri Sep 04, 2015 10:35 pm

mjlef wrote:I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark
Maybe you find of interest the thread:
http://www.talkchess.com/forum/viewtopic.php?t=55210

G.B. Harms
Posts: 42
Joined: Sat Aug 08, 2009 12:18 pm
Location: Almere

Re: Looking for PGN file tools

Post by G.B. Harms » Sat Sep 05, 2015 8:43 am

Hello Mark,

For your goal you can probably use the PGNFileReader class in
https://github.com/Bobcat/bobcat/blob/master/src/Pgn.h

It can be compiled independently from the other files in the project.

Example how to use it is in
https://github.com/Bobcat/bobcat/blob/m ... gnPlayer.h and
https://github.com/Bobcat/bobcat/blob/master/src/Tune.h

User avatar
Steve Maughan
Posts: 1025
Joined: Wed Mar 08, 2006 7:28 pm
Location: Florida, USA
Contact:

Re: Looking for PGN file tools

Post by Steve Maughan » Sat Sep 05, 2015 2:19 pm

Hi Mark,

Did you take a look at Python Chess

https://github.com/niklasf/python-chess

Cheers - Steve
http://www.chessprogramming.net - Maverick Chess Engine

User avatar
Ozymandias
Posts: 952
Joined: Sun Oct 25, 2009 12:30 am

Re: Looking for PGN file tools

Post by Ozymandias » Sat Sep 05, 2015 5:46 pm

Laskos wrote:
mjlef wrote:I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark
Maybe you find of interest the thread:
http://www.talkchess.com/forum/viewtopic.php?t=55210
I was actually going to point him to it. Did you find a1 and b1 for SF6?

User avatar
Laskos
Posts: 8023
Joined: Wed Jul 26, 2006 8:21 pm

Re: Looking for PGN file tools

Post by Laskos » Sat Sep 05, 2015 8:28 pm

Ozymandias wrote:
Laskos wrote:
mjlef wrote:I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark
Maybe you find of interest the thread:
http://www.talkchess.com/forum/viewtopic.php?t=55210
I was actually going to point him to it. Did you find a1 and b1 for SF6?
Ah, those fits, no, it was too tedious.

User avatar
Rebel
Posts: 4148
Joined: Thu Aug 18, 2011 10:04 am

Re: Looking for PGN file tools

Post by Rebel » Sat Sep 05, 2015 8:52 pm

mjlef wrote:I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark
Something like this ?

User avatar
Ozymandias
Posts: 952
Joined: Sun Oct 25, 2009 12:30 am

Re: Looking for PGN file tools

Post by Ozymandias » Sat Sep 05, 2015 10:39 pm

Laskos wrote:
Ozymandias wrote:
Laskos wrote:
mjlef wrote:I am looking for a good set of PGN file reading tools. Ideally, it would parse the file, not the win/loss/draw for each opponent by name, and have enough flexibility to parse embedded comment sin the file, like search depth or eval. I assume I will have to write the last part.

An example of the kind of thing I wold like to do is to scan a huge file of computer-computer games, and see how the win percentage of each program matches the eval, with output like this:

eval
0-10 cp: 51.2%
11-20 cp: 53%
21-30 cp 54%

and so on. It would be interesting to see how well programs eval correlate to the static eval in each searched position.

If you know of public domain PGN parsing tools that might help to this, let me know. If not, then I will write my own.

Mark
Maybe you find of interest the thread:
http://www.talkchess.com/forum/viewtopic.php?t=55210
I was actually going to point him to it. Did you find a1 and b1 for SF6?
Ah, those fits, no, it was too tedious.
Them's the breaks, I guess. Did you at least get enough data for SF6, at move 70? I'm interested in the expected score, at an eval of 350cp.

Post Reply