finding eval swings in pgn?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

finding eval swings in pgn?

Post by zenpawn »

Before I potentially reinvent the wheel, does anyone know of a script that will take an annotated PGN, like those saved by Arena, and find positions where the score your engine gave for its next move is significantly worse than the one it gave on the prior?

For example, given this small snippet:

Code: Select all

37. Nc8 {(Nc8 Re1 Nd6 Qe5 Rb8 Qxg3+ Kxg3 Be6 Rb7 Re2 f4) +0.17/11 0} Bc4 {(b3c4 f2f4 g7g5 f4g5 f6g5 f8f5 d4e3 g3c7) +0.20/7 0} 38. f4 {(f4 Qc5 Rf7 g5 Na7 Qd4 fxg5+ fxg5 Rf5 g4 Rf7) +0.51/11 0} g5 {(g7g5 f4g5 f6g5 f8f5 d4h4 g3h4 g5h4 f5f4 c4d5 f4h4 h6g6) -0.33/8 0}
If the difference criteria was set to 50 centipawns, and the engine to monitor was playing black, it would save the position after white's 38.f4 with a comment containing the prior move and score 37...Bc4 +0.20 and the next move and score 38...g5 -0.33.
User avatar
Guenther
Posts: 4606
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: finding eval swings in pgn?

Post by Guenther »

zenpawn wrote:Before I potentially reinvent the wheel, does anyone know of a script that will take an annotated PGN, like those saved by Arena, and find positions where the score your engine gave for its next move is significantly worse than the one it gave on the prior?

For example, given this small snippet:

Code: Select all

37. Nc8 {(Nc8 Re1 Nd6 Qe5 Rb8 Qxg3+ Kxg3 Be6 Rb7 Re2 f4) +0.17/11 0} Bc4 {(b3c4 f2f4 g7g5 f4g5 f6g5 f8f5 d4e3 g3c7) +0.20/7 0} 38. f4 {(f4 Qc5 Rf7 g5 Na7 Qd4 fxg5+ fxg5 Rf5 g4 Rf7) +0.51/11 0} g5 {(g7g5 f4g5 f6g5 f8f5 d4h4 g3h4 g5h4 f5f4 c4d5 f4h4 h6g6) -0.33/8 0}
If the difference criteria was set to 50 centipawns, and the engine to monitor was playing black, it would save the position after white's 38.f4 with a comment containing the prior move and score 37...Bc4 +0.20 and the next move and score 38...g5 -0.33.
Probably you find this thread useful:
(note that this was about cutechess style pgn files - it is possible that TGA works out of the box with Arena style pgns, but I am not sure.
I always use cute or winboard pgn files for myself - OTH it should be easy for you to transform your pgn with a little macro.)

http://talkchess.com/forum/viewtopic.ph ... e+analyser
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn »

Thank you. Unfortunately, the install failed on Windows 10.
User avatar
Guenther
Posts: 4606
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: finding eval swings in pgn?

Post by Guenther »

zenpawn wrote:Thank you. Unfortunately, the install failed on Windows 10.
I guess some dll/ocx files for VB6 are missing in plain Win10 now?
This should be solvable.

Guenther

Edit:
I have uploaded my installation, which works portable here on Win7-64U.
What error do you get, if you just unzip the files below to a folder
with admin rights? I am sure the missing files can be worked out.

http://rwbc-chess.de/Downloads/Game_Analyser.zip
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: finding eval swings in pgn?

Post by Rebel »

zenpawn wrote:Before I potentially reinvent the wheel, does anyone know of a script that will take an annotated PGN, like those saved by Arena, and find positions where the score your engine gave for its next move is significantly worse than the one it gave on the prior?

For example, given this small snippet:

Code: Select all

37. Nc8 {(Nc8 Re1 Nd6 Qe5 Rb8 Qxg3+ Kxg3 Be6 Rb7 Re2 f4) +0.17/11 0} Bc4 {(b3c4 f2f4 g7g5 f4g5 f6g5 f8f5 d4e3 g3c7) +0.20/7 0} 38. f4 {(f4 Qc5 Rf7 g5 Na7 Qd4 fxg5+ fxg5 Rf5 g4 Rf7) +0.51/11 0} g5 {(g7g5 f4g5 f6g5 f8f5 d4h4 g3h4 g5h4 f5f4 c4d5 f4h4 h6g6) -0.33/8 0}
If the difference criteria was set to 50 centipawns, and the engine to monitor was playing black, it would save the position after white's 38.f4 with a comment containing the prior move and score 37...Bc4 +0.20 and the next move and score 38...g5 -0.33.
Protools does this kind of stuff, see:

http://www.top-5000.nl/output.htm
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn »

Very nice. What's the command for that output? Thanks.
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: finding eval swings in pgn?

Post by Rebel »

zenpawn wrote:Very nice. What's the command for that output? Thanks.
Download and install - http://www.top-5000.nl/protools13.htm

. Then copy the Arena PGN into the PGN folder.
. Start the program.
. Press F3
. Select Analyse PGN
zenpawn
Posts: 349
Joined: Sat Aug 06, 2016 8:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn »

Unfortunately, it crashes with only the example and test files in the pgn folder.
sandermvdb
Posts: 160
Joined: Sat Jan 28, 2017 1:29 pm
Location: The Netherlands

Re: finding eval swings in pgn?

Post by sandermvdb »

Same here. Even when using compatibility mode, running as an administrator and moving the program to C:\Protools
User avatar
Rebel
Posts: 6991
Joined: Thu Aug 18, 2011 12:04 pm

Re: finding eval swings in pgn?

Post by Rebel »

zenpawn wrote:Unfortunately, it crashes with only the example and test files in the pgn folder.
Oh well, how did this happen, looks like a missing file, anyway, try:

http://rebel13.nl/dl.html?file=dl/protools16.7z

Includes a 100 game match between SF8 and SF9 as TEST.PGN as an example. Works now.

BTW, to change PGN's see the F2 menu.