Looking for PGN file tools

Discussion of chess software programming and technical issues.

Moderator: Ras

mjlef
Posts: 1494
Joined: Thu Mar 30, 2006 2:08 pm

Looking for PGN file tools

Post by mjlef »

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: 4052
Joined: Thu May 15, 2008 9:57 pm
Location: Berlin, Germany
Full name: Sven Schüle

Re: Looking for PGN file tools

Post by Sven »

You might want to check the PGN tool collection by Norm Pollock.
User avatar
Laskos
Posts: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Looking for PGN file tools

Post by Laskos »

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 2:18 pm
Location: Almere

Re: Looking for PGN file tools

Post by G.B. Harms »

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: 1276
Joined: Wed Mar 08, 2006 8:28 pm
Location: Florida, USA

Re: Looking for PGN file tools

Post by Steve Maughan »

Hi Mark,

Did you take a look at Python Chess

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

Cheers - Steve
http://www.chessprogramming.net - Juggernaut & Maverick Chess Engine
User avatar
Ozymandias
Posts: 1537
Joined: Sun Oct 25, 2009 2:30 am

Re: Looking for PGN file tools

Post by Ozymandias »

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: 10948
Joined: Wed Jul 26, 2006 10:21 pm
Full name: Kai Laskos

Re: Looking for PGN file tools

Post by Laskos »

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: 7299
Joined: Thu Aug 18, 2011 12:04 pm
Full name: Ed Schröder

Re: Looking for PGN file tools

Post by Rebel »

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: 1537
Joined: Sun Oct 25, 2009 2:30 am

Re: Looking for PGN file tools

Post by Ozymandias »

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.