Chess Game Analyzer

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

User avatar
Nordlandia
Posts: 2821
Joined: Fri Sep 25, 2015 9:38 pm
Location: Sortland, Norway

Re: v39.13.beta

Post by Nordlandia »

Recipe:
CPU: 8-cores running
Time/position: 15s

Classic Movsesian vs Kasparov game.

Lichess Auto Analysis - https://en.lichess.org/Uf7ayNDN
[pgn][Event "Sarajevo"]
[Site "Sarajevo BIH"]
[Date "2000.05.29"]
[Round "11"]
[White "Sergei Movsesian"]
[Black "Garry Kasparov"]
[Result "0-1"]
[EventDate "2000.05.17"]
[ECO "B90"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "64"]
[Annotator "asmFishW_2016-12-15_bmi2 (12.0s/pos, thread=10)"]

1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Be3 e6 7. f3 b5 8. Qd2 Nbd7 9. O-O-O Bb7 10. g4 Nb6 11. Qf2 Nfd7 12. Kb1 Rc8 13. Bd3 Rxc3 14. bxc3
14... Qc7 $10 {-0.20/25} ({Better is} 14...Na4 15.Ne2 Qc7 16.g5 d5 17.Bf4 Qc8 $15 {-0.26/21}) 15. Ne2 $15 {-0.28/24} ({Inferior is} 15.Rhf1 $6 { due to } Na4 16.Ne2 d5 17.Bf4 e5 $15 {-0.31/27})
15... Be7 $10 {+0.00/30} ({Better is} 15...Na4 16.g5 d5 17.Bf4 e5 18.Bc1 b4 $10 {-0.04/23}) 16. g5 O-O 17. h4 Na4
18. Bc1 $6 $15 {-0.34/23} ({Better is} 18.h5 d5 19.exd5 Bxd5 20.Be4 Bc4 21.Bd3 $10 {+0.00/25})
({ Also capable is } 18.Qg3 Ne5 19.h5 f5 20.Rhf1 Nxc3+ 21.Nxc3 $10 {+0.00/25})
({Black is threatening} 18. -- 18...d5 $15 {-0.27/23})
18... Ne5 $10 {-0.20/25} ({Better is} 18...d5 19.h5 Bd6 20.Bd2 Be5 21.Qh4 Qd6 $15 {-0.29/21}) 19. h5 $15 {-0.38/22} ({Incorrect is} 19.Ka1 $6 { on the grounds of } f5 20.Qg2 Kh8 21.Qg3 fxe4 $15 {-0.32/22}) d5
20. Qh2 $6 $15 {-0.64/25} ({Better is} 20.Ka1 Bd6 21.h6 g6 22.Qe3 Be7 23.exd5 $15 {-0.25/19})
({ Not to be underestimated is } 20.Qe3 Rc8 21.h6 g6 22.Rhf1 b4 23.Ka1 $15 {-0.53/19})
({Black is threatening} 20. -- 20...b4 $15 {-0.70/23}) Bd6
21. Qh3 $2 $17 {-1.78/27} ({More accurate is} 21.Bf4 Nxc3+ 22.Nxc3 Qxc3 23.Qd2 Qxd2 24.Bxd2 $15 {-0.52/21})
({ Also playable is } 21.Qg2 $15 {-0.81/21})
({Black is threatening} 21. -- 21...Nxd3 $19 {-8.46/27}) Nxd3 22. cxd3 $17 {-1.27/26} ({Incorrect is} 22.Rxd3 $2 { considering } dxe4 23.fxe4 Bxe4 24.Rhd1 Bxd3 $17 {-1.82/22}) b4
23. cxb4 $2 $17 {-2.51/26} ({More accurate is} 23.e5 Bxe5 24.cxb4 Rc8 25.Rd2 Nc3+ 26.Nxc3 $17 {-1.44/22})
({Black is threatening} 23. -- 23...Nxc3+ $19 {-5.71/28})
23... Rc8 $17 {-1.20/29} ({More accurate is} 23...Bxb4 24.g6 Rc8 25.gxf7+ Kxf7 26.Nd4 Qe5 $17 {-1.96/24})
({ One that deserves attention is } 23...Qb6 $17 {-1.63/24})
({White is threatening} 23... -- 24.g6 $14 {+0.41/25})
24. Ka1 $2 $17 {-2.36/28} ({More accurate is} 24.Rd2 Bxb4 25.Qh2 Qb6 26.Rb2 Nxb2 27.Bxb2 $17 {-1.21/23})
({Black is threatening mate in 8} 24. -- 24...Qc2+ 25.Ka1 Qxe2 26.Qg2 Be5+ 27.d4 Rxc1+ 28.Rxc1 Qxg2 29.Rc8+ Bxc8 30.Rb1 Bxd4+ 31.Rb2 Qxb2#)
24... dxe4 $17 {-1.27/27} ({More accurate is} 24...Bxb4 25.Qh2 Qc2 26.Rdg1 Nc3 27.Bb2 Nxe2 $17 {-2.47/24})
({White is threatening} 24... -- 25.g6 Bxb4 26.Qh2 e5 27.gxf7+ Qxf7 28.h6 $14 {+0.47/28})
25. fxe4 $2 $17 {-2.87/30} ({More accurate is} 25.f4 a5 26.dxe4 Bxe4 27.b5 Bxh1 28.Qxh1 $17 {-1.53/24})
({Black is threatening mate in 12} 25. -- 25...exd3 26.Bb2 Be5 27.Nd4 Nxb2 28.Rc1 Nc4 29.Qh4 Qd6 30.a3 Bxd4+ 31.Ka2 Qd5 32.Qxd4 Qxd4 33.Rb1 Bd5 34.Rb3 Nd2 35.a4 Rc2+ 36.Ka3 Nc4#) Bxe4
26. g6 $4 $19 {-4.61/27} ({Superior is} 26.Ba3 Bxh1 27.Rxh1 Bf4 28.Qg2 Be3 29.Rf1 $17 {-2.29/24})
({Black is threatening mate in 7} 26. -- 26...Qc2 27.Qg3 Bxg3 28.Ba3 Be5+ 29.d4 Bd5 30.Rd2 Qxd2 31.Nc1 Bxd4+ 32.Kb1 Qc2#) Bxh1 27. Qxh1 $19 {-4.69/29} ({Not reliable is} 27.gxf7+ $4 { thanks to } Kf8 $19 {-4.59/25}) Bxb4
28. gxf7+ $19 {-5.13/30} ({A nice try could be} 28.Bb2 Qc2 29.gxf7+ Kf8 30.Rb1 Qxe2 31.h6 $19 {-4.29/25})
({Black is threatening mate in 5} 28. -- 28...Bc3+ 29.Kb1 Rb8+ 30.Bb2 Rxb2+ 31.Ka1 Rb4+ 32.Nxc3 Qxc3#) Kf8
29. Qg2 $19 {-7.60/32} ({A nice try could be} 29.Bd2 Be7 30.Rc1 Qe5+ 31.d4 Rxc1+ 32.Bxc1 $19 {-4.97/25})
({Black is threatening mate in 5} 29. -- 29...Bc3+ 30.Kb1 Rb8+ 31.Bb2 Rxb2+ 32.Ka1 Rb4+ 33.Nxc3 Qxc3#) Rb8 30. Bb2 Nxb2
31. Nd4 $19 {Black will mate white in 12 moves} ({A nice try could be} 31.Rg1 Bc3 32.Rc1 Qe5 33.Rxc3 Na4 34.Qc6 $19 {-6.91/25})
({Black is threatening mate in 6} 31. -- 31...Nxd1 32.Qxg7+ Kxg7 33.h6+ Kxf7 34.Kb1 Ba3+ 35.Ka1 Bb2+ 36.Kb1 Be5#) Nxd1 32. Nxe6+ Kxf7 {WBlunder: 1, WMistake: 4, WDubious: 2, BBlunder: 0, BMistake: 0, BDubious: 0} 0-1

[/pgn]

Code: Select all

[Event "Sarajevo"]
[Site "Sarajevo BIH"]
[Date "2000.05.29"]
[Round "11"]
[White "Sergei Movsesian"]
[Black "Garry Kasparov"]
[Result "0-1"]
[EventDate "2000.05.17"]
[ECO "B90"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "64"]
[Annotator "asmFishW_2016-12-15_bmi2 (12.0s/pos, thread=10)"]

1. e4 c5 2. Nf3 d6 3. d4 cxd4 4. Nxd4 Nf6 5. Nc3 a6 6. Be3 e6 7. f3 b5 8. Qd2 Nbd7 9. O-O-O Bb7 10. g4 Nb6 11. Qf2 Nfd7 12. Kb1 Rc8 13. Bd3 Rxc3 14. bxc3 
14... Qc7 $10 {-0.20/25} ({Better is} 14...Na4 15.Ne2 Qc7 16.g5 d5 17.Bf4 Qc8 $15 {-0.26/21}) 15. Ne2 $15 {-0.28/24} ({Inferior is} 15.Rhf1 $6 { due to }  Na4 16.Ne2 d5 17.Bf4 e5 $15 {-0.31/27}) 
15... Be7 $10 {+0.00/30} ({Better is} 15...Na4 16.g5 d5 17.Bf4 e5 18.Bc1 b4 $10 {-0.04/23}) 16. g5 O-O 17. h4 Na4 
18. Bc1 $6 $15 {-0.34/23} ({Better is} 18.h5 d5 19.exd5 Bxd5 20.Be4 Bc4 21.Bd3 $10 {+0.00/25}) 
({ Also capable is } 18.Qg3 Ne5 19.h5 f5 20.Rhf1 Nxc3+ 21.Nxc3 $10 {+0.00/25}) 
({Black is threatening} 18. -- 18...d5 $15 {-0.27/23}) 
18... Ne5 $10 {-0.20/25} ({Better is} 18...d5 19.h5 Bd6 20.Bd2 Be5 21.Qh4 Qd6 $15 {-0.29/21}) 19. h5 $15 {-0.38/22} ({Incorrect is} 19.Ka1 $6 { on the grounds of }  f5 20.Qg2 Kh8 21.Qg3 fxe4 $15 {-0.32/22}) d5 
20. Qh2 $6 $15 {-0.64/25} ({Better is} 20.Ka1 Bd6 21.h6 g6 22.Qe3 Be7 23.exd5 $15 {-0.25/19}) 
({ Not to be underestimated is } 20.Qe3 Rc8 21.h6 g6 22.Rhf1 b4 23.Ka1 $15 {-0.53/19}) 
({Black is threatening} 20. -- 20...b4 $15 {-0.70/23}) Bd6 
21. Qh3 $2 $17 {-1.78/27} ({More accurate is} 21.Bf4 Nxc3+ 22.Nxc3 Qxc3 23.Qd2 Qxd2 24.Bxd2 $15 {-0.52/21}) 
({ Also playable is } 21.Qg2 $15 {-0.81/21}) 
({Black is threatening} 21. -- 21...Nxd3 $19 {-8.46/27}) Nxd3 22. cxd3 $17 {-1.27/26} ({Incorrect is} 22.Rxd3 $2 { considering }  dxe4 23.fxe4 Bxe4 24.Rhd1 Bxd3 $17 {-1.82/22}) b4 
23. cxb4 $2 $17 {-2.51/26} ({More accurate is} 23.e5 Bxe5 24.cxb4 Rc8 25.Rd2 Nc3+ 26.Nxc3 $17 {-1.44/22}) 
({Black is threatening} 23. -- 23...Nxc3+ $19 {-5.71/28}) 
23... Rc8 $17 {-1.20/29} ({More accurate is} 23...Bxb4 24.g6 Rc8 25.gxf7+ Kxf7 26.Nd4 Qe5 $17 {-1.96/24}) 
({ One that deserves attention is } 23...Qb6 $17 {-1.63/24}) 
({White is threatening} 23... -- 24.g6 $14 {+0.41/25}) 
24. Ka1 $2 $17 {-2.36/28} ({More accurate is} 24.Rd2 Bxb4 25.Qh2 Qb6 26.Rb2 Nxb2 27.Bxb2 $17 {-1.21/23}) 
({Black is threatening mate in 8} 24. -- 24...Qc2+ 25.Ka1 Qxe2 26.Qg2 Be5+ 27.d4 Rxc1+ 28.Rxc1 Qxg2 29.Rc8+ Bxc8 30.Rb1 Bxd4+ 31.Rb2 Qxb2#) 
24... dxe4 $17 {-1.27/27} ({More accurate is} 24...Bxb4 25.Qh2 Qc2 26.Rdg1 Nc3 27.Bb2 Nxe2 $17 {-2.47/24}) 
({White is threatening} 24... -- 25.g6 Bxb4 26.Qh2 e5 27.gxf7+ Qxf7 28.h6 $14 {+0.47/28}) 
25. fxe4 $2 $17 {-2.87/30} ({More accurate is} 25.f4 a5 26.dxe4 Bxe4 27.b5 Bxh1 28.Qxh1 $17 {-1.53/24}) 
({Black is threatening mate in 12} 25. -- 25...exd3 26.Bb2 Be5 27.Nd4 Nxb2 28.Rc1 Nc4 29.Qh4 Qd6 30.a3 Bxd4+ 31.Ka2 Qd5 32.Qxd4 Qxd4 33.Rb1 Bd5 34.Rb3 Nd2 35.a4 Rc2+ 36.Ka3 Nc4#) Bxe4 
26. g6 $4 $19 {-4.61/27} ({Superior is} 26.Ba3 Bxh1 27.Rxh1 Bf4 28.Qg2 Be3 29.Rf1 $17 {-2.29/24}) 
({Black is threatening mate in 7} 26. -- 26...Qc2 27.Qg3 Bxg3 28.Ba3 Be5+ 29.d4 Bd5 30.Rd2 Qxd2 31.Nc1 Bxd4+ 32.Kb1 Qc2#) Bxh1 27. Qxh1 $19 {-4.69/29} ({Not reliable is} 27.gxf7+ $4 { thanks to }  Kf8 $19 {-4.59/25}) Bxb4 
28. gxf7+ $19 {-5.13/30} ({A nice try could be} 28.Bb2 Qc2 29.gxf7+ Kf8 30.Rb1 Qxe2 31.h6 $19 {-4.29/25}) 
({Black is threatening mate in 5} 28. -- 28...Bc3+ 29.Kb1 Rb8+ 30.Bb2 Rxb2+ 31.Ka1 Rb4+ 32.Nxc3 Qxc3#) Kf8 
29. Qg2 $19 {-7.60/32} ({A nice try could be} 29.Bd2 Be7 30.Rc1 Qe5+ 31.d4 Rxc1+ 32.Bxc1 $19 {-4.97/25}) 
({Black is threatening mate in 5} 29. -- 29...Bc3+ 30.Kb1 Rb8+ 31.Bb2 Rxb2+ 32.Ka1 Rb4+ 33.Nxc3 Qxc3#) Rb8 30. Bb2 Nxb2 
31. Nd4 $19 {Black will mate white in 12 moves} ({A nice try could be} 31.Rg1 Bc3 32.Rc1 Qe5 33.Rxc3 Na4 34.Qc6 $19 {-6.91/25}) 
({Black is threatening mate in 6} 31. -- 31...Nxd1 32.Qxg7+ Kxg7 33.h6+ Kxf7 34.Kb1 Ba3+ 35.Ka1 Bb2+ 36.Kb1 Be5#) Nxd1 32. Nxe6+ Kxf7 {WBlunder: 1, WMistake: 4, WDubious: 2, BBlunder: 0, BMistake: 0, BDubious: 0} 0-1

Vinvin
Posts: 5239
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: v39.14.beta

Post by Vinvin »

Thanks !
I'm currently running analyzes on 12 past WCC :

FideChamp1996.pgn
PCAChamp1993.pgn
PCAChamp1995.pgn
WorldChamp1985.pgn
WorldChamp1986.pgn
WorldChamp1987.pgn
WorldChamp1990.pgn
WorldChamp2000.pgn
WorldChamp2004.pgn
WorldChamp2006.pgn
WorldChamp2008.pgn
WorldChamp2010.pgn

Around 1000 moves by file, 1 min by move, 12 threads.
Ferdy wrote:https://drive.google.com/file/d/0BwAOsu ... sp=sharing

Changes:

Code: Select all

B. Changes:
v39.14.beta
1. Limit max complexity analysis time to 2 minutes or half of user-defined
   analysis time whichever is smaller.
2. When the position is complicated increase the engine analysis time
   proportional to the complixity of the positions. This was 3 x user-defined
   analysis time when move changes is greater 2.
3. When move is easy (move_changes <= 0) reduce the engine analysis time to 50%
   of the user-defined analysis time or 100ms whichever is bigger.
Readme:

Code: Select all

Chess Game Analyzer v39.14.beta

In windows you can run the batch file runChessGameAnalyzer.bat and the
engine Deuterium.exe will analyze the sample_game.pgn.

The batch file contains a command line:
chess_game_analyzer --file "sample_game.pgn" --engine "Deuterium.exe" --eoption "Hash value 128, Threads value 1" --movetime 500 --startmove 8 --outfile "analyzed_games.pgn"

To use stronger engine download stockfish 8 or any uci engine that supports
movetime, and multipv commands. Then replace Deuterium.exe in the command line.
--engine "Stockfish.exe"

To increase movetime per position from 500 millisec to 1 sec use,
--movetime 1000

For 5 sec use,
--movetime 5000

If you want the analysis to start at move 1 use,
--startmove 1

The output file analyzed_games.pgn is in append mode, meaning all
analyzed games will be saved here.
Notes:

Code: Select all

IV. Release notes

1. Release date: December 15, 2016
2. Files: 
   a. game_analyzer_v39.14.beta.py
   b. chess_game_analyzer.exe
   c. runChessGameAnalyzer.bat
   d. LICENSE
   e. sample_game.pgn
   f. Deuterium.exe
   g. readme.txt
Tdunbug
Posts: 47
Joined: Mon Mar 07, 2016 12:46 am

Re: v39.13.beta

Post by Tdunbug »

Love this tool, Great job!
Ferdy
Posts: 4840
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: v39.13.beta

Post by Ferdy »

Arpad Rusz wrote:Nice tool! I have some feature requests... :oops:
- Ability to verify not only the game (main line) but also its analysis (variations). Would be useful for checking some endgame studies.
This could be too much work. If I remember right Fritz GUI can check variations.
- Option for Backward analysis (probably that would provide a more reliable analysis)
This tool is just for fun, just trying to extract what the engine is thinking about by showing its alternative lines thru multipv and with Stockfish, I hope to add comments on passer evaluation, who has the upper hand in mobility, king safety and other important evaluation features thru the eval command in Stockfish.
I like the forward approach so that I can compare fairly the engine best move and the game move. There are times that the game move is actually better than the engine recommended move and in this case you have now the luxury of adding move annotation symbols such as ! or !! to the game move.
Arpad Rusz
Posts: 273
Joined: Sat Apr 17, 2010 2:34 pm
Location: Budapest

Re: v39.13.beta

Post by Arpad Rusz »

All right! Thanks for your answer. Maybe I will find the time to implement these features.
Dann Corbit
Posts: 12662
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: v39.14.beta

Post by Dann Corbit »

I got this:
Traceback (most recent call last):
File "game_analyzer_v39.6.beta.py", line 1956, in <module>
File "game_analyzer_v39.6.beta.py", line 1952, in main
File "game_analyzer_v39.6.beta.py", line 1819, in analyze_games
UnboundLocalError: local variable 'anaPvMove2' referenced before assignment

Command line was:

chess_game_analyzer --file "F:\pgn\Eichborn\eichborn.pgn" --engine "F:\project\dcorbit\Stockfish-mate_finder\src\matefinder-x64-mingw.exe" --eoption "Hash value 128, Threads value 10" --movetime 5000 --startmove 8 --outfile "analyzed_eich.pgn"
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Ferdy
Posts: 4840
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: v39.14.beta

Post by Ferdy »

Dann Corbit wrote:I got this:
Traceback (most recent call last):
File "game_analyzer_v39.6.beta.py", line 1956, in <module>
File "game_analyzer_v39.6.beta.py", line 1952, in main
File "game_analyzer_v39.6.beta.py", line 1819, in analyze_games
UnboundLocalError: local variable 'anaPvMove2' referenced before assignment

Command line was:

chess_game_analyzer --file "F:\pgn\Eichborn\eichborn.pgn" --engine "F:\project\dcorbit\Stockfish-mate_finder\src\matefinder-x64-mingw.exe" --eoption "Hash value 128, Threads value 10" --movetime 5000 --startmove 8 --outfile "analyzed_eich.pgn"
Try v39.14.beta.
Toadofsky
Posts: 27
Joined: Sat Dec 03, 2016 2:20 pm

Re: v39.14.beta

Post by Toadofsky »

Cool! Using the default parameters I annotated the sample game PGN and (after removing "--" null move variations not supported by Lichess) uploaded the results as a Lichess study.
User avatar
Kirk
Posts: 5700
Joined: Sat Mar 11, 2006 3:44 am

Re: v39.13.beta

Post by Kirk »

Hi

What is the future of this project?

Thanks!
“He knew all the tricks, dramatic irony, metaphor, pathos, puns, parody, litotes and... satire. He was vicious”
Ferdy
Posts: 4840
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: v39.13.beta

Post by Ferdy »

Kirk wrote:Hi

What is the future of this project?

Thanks!
I stopped developing it, maybe other people would, source is available.

I prefer working on chess artist.
https://github.com/fsmosca/chess-artist