finding eval swings in pgn?

Discussion of chess software programming and technical issues.

Moderators: hgm, Harvey Williamson, bob

zenpawn
Posts: 260
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

finding eval swings in pgn?

Post by zenpawn » Sat Feb 10, 2018 2:50 pm

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: 2246
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Contact:

Re: finding eval swings in pgn?

Post by Guenther » Sat Feb 10, 2018 5:24 pm

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
Guenther Simon
http://rwbc-chess.de/

zenpawn
Posts: 260
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn » Sat Feb 10, 2018 5:52 pm

Thank you. Unfortunately, the install failed on Windows 10.

User avatar
Guenther
Posts: 2246
Joined: Wed Oct 01, 2008 4:33 am
Location: Regensburg, Germany
Contact:

Re: finding eval swings in pgn?

Post by Guenther » Sat Feb 10, 2018 6:41 pm

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
Guenther Simon
http://rwbc-chess.de/

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

Re: finding eval swings in pgn?

Post by Rebel » Sat Feb 10, 2018 9:21 pm

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: 260
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn » Sat Feb 10, 2018 9:45 pm

Very nice. What's the command for that output? Thanks.

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

Re: finding eval swings in pgn?

Post by Rebel » Sat Feb 10, 2018 9:54 pm

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: 260
Joined: Sat Aug 06, 2016 6:31 pm
Location: United States

Re: finding eval swings in pgn?

Post by zenpawn » Sat Feb 10, 2018 10:02 pm

Unfortunately, it crashes with only the example and test files in the pgn folder.

sandermvdb
Posts: 119
Joined: Sat Jan 28, 2017 12:29 pm
Location: The Netherlands

Re: finding eval swings in pgn?

Post by sandermvdb » Sun Feb 11, 2018 7:13 am

Same here. Even when using compatibility mode, running as an administrator and moving the program to C:\Protools

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

Re: finding eval swings in pgn?

Post by Rebel » Sun Feb 11, 2018 7:30 am

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.

Post Reply