Chess Artist

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

Moderators: hgm, Rebel, chrisw

Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess Artist

Post by Ferdy »

Chess Artist v1.0.rc2 is released at https://github.com/fsmosca/chess-artist ... g/v1.0.rc2

Couple of new features in game annotation includes:
Comment on king safety (need stockfish engine)
Comment on passed pawn (need stockfish engine)
Comment on mobility (need stockfish engine)
comment on sacrificed material

It can also generate chess puzzles from a pgn file input.

Sample annotated game from move 15 to move 40

Command line:

Code: Select all

chess-artist.exe --infile iommast19.pgn --outfile out_iommast19.pgn ^
--enginefile C:\chess\engines\stockfish_19100908_x64_modern.exe ^
--engineoptions "Hash value 128" ^
--movestart 15 --moveend 40 --movetime 5000 ^
--job analyze --eval search
[pgn] [Event "FIDE Chess.com Grand Swiss"] [Site "Douglas ENG"] [Date "2019.10.10"] [Round "1.1"] [White "Carlsen, Magnus"] [Black "Kuzubov, Yuriy"] [Result "1-0"] [WhiteTitle "GM"] [BlackTitle "GM"] [WhiteElo "2876"] [BlackElo "2636"] [ECO "D37"] [Opening "QGD"] [Variation "4.Nf3"] [WhiteFideId "1503014"] [BlackFideId "14112906"] [EventDate "2019.10.10"] [Annotator "engine: Stockfish 091019 64 POPCNT, prog: Chess Artist v1.0.rc2"] {Hash 128mb, Threads 1, @ 5.0s/pos, move eval is in pawn unit wpov} 1. d4 Nf6 2. c4 e6 3. Nf3 d5 4. Nc3 Nbd7 5. cxd5 exd5 6. Bg5 c6 7. Qc2 h6 8. Bh4 g5 9. Bg3 Nh5 10. O-O-O Nxg3 11. hxg3 Nb6 12. e4 Be6 13. Bd3 Qf6 14. e5 Qg7 {, followed by O-O-O} 15. Nh2 $1 {+0.07} 15... g4 $2 {+1.08} ({} 15...O-O-O 16. f4 Kb8 17. f5 Bd7 {+0.17}) 16. Ne2 $5 {+0.79} 16... O-O-O {+0.86} ({} 16...h5 {+0.79}) 17. Nf4 $5 {+0.40} 17... Qg5 $2 {+1.17} ({} 17...h5 18. Kb1 Kb8 19. Nf1 c5 {+0.50}) 18. Kb1 $2 {+0.66} ({} 18. Nf1 {+1.17}) 18... h5 {+0.82} 19. Nf1 {+0.57} ({} 19. a4 Kb8 20. a5 Nc4 21. a6 {+0.71}) 19... Rh6 $2 {+1.21} ({} 19...Kb8 20. Bh7 Rc8 21. Rxh5 Qe7 {+0.57}) 20. Ne3 $2 {+0.38} ({} 20. Nxe6 {+1.21}) 20... Kb8 {+1.09} 21. Nf5 $2 {+0.46} ({} 21. a3 {+0.99}) 21... Bxf5 {+0.96} 22. Bxf5 {+0.29} 22... h4 {+0.65} 23. Ne2 $5 {+0.57} 23... hxg3 {+0.65} ({} 23...Nc4 24. gxh4 Rxh4 25. Rxh4 Qxh4 {+0.57}) 24. Rxh6 $5 {+0.13} {, with the idea of Rf6} 24... Bxh6 {+1.18} 25. Nxg3 {+0.38} {, planning Qe2} 25... Nc4 $3 {+0.73} 26. Bd3 $2 {-0.13} ({} 26. Qe2 Qf4 27. Bxg4 Rg8 28. Bf3 {+0.80}) 26... Nd2+ $5 {-0.12} 27. Ka1 {-0.41} 27... Qf4 {+0.00} 28. Nf5 $6 {-0.23} ({} 28. a3 Qxf2 29. Nf1 Qxg2 30. Nxd2 {+0.00}) 28... Bg5 {-0.17} {, followed by Qxf2} 29. Nd6 $1 {-0.21} 29... Qxf2 {+0.00, white had sacrificed material} 30. Qc3 $2 {-1.11} ({} 30. Bf5 Be3 31. Nxf7 Rg8 32. Nd6 {+0.00}) 30... Rd7 {-1.11} 31. Qb4 {-2.30} 31... a5 $1 {-1.87} {, followed by axb4} 32. Qxa5 {-2.24} 32... Qxd4 {-2.09} 33. Rxd2 {-2.01} 33... Bxd2 $2 {-0.13} ({} 33...Qxe5 34. Re2 Qxd6 35. a3 Rd8 {-2.13}) 34. Qxd2 {-0.64} {, followed by Qe2} 34... Qxe5 $3 {-0.28} 35. Nf5 {-0.82} {, planning a3} 35... c5 $3 {-0.27} 36. Bb1 $4 {-1.76} ({} 36. Qe2 {-0.17}) 36... d4 {-1.34} 37. Qd3 {-1.33} {, followed by a3} 37... Qd5 $1 {-1.43} 38. Qg3+ {-1.54} 38... Ka7 {-0.96} 39. Qxg4 {-1.29} 39... d3 $2 {-0.49} ({} 39...c4 {-1.29}) 40. Ne3 $2 {-0.94} ({} 40. Qa4+ {-0.49}) {, with the idea of Nxd5} 40... Qd4 $3 {-0.20} 41. Qf3 d2 42. Nd1 Qc4 43. Qe3 Rd4 44. a3 Qc1 45. Qb3 Rd6 46. Ka2 c4 47. Qf3 Rb6 48. Bf5 Rb5 49. Qe3+ Ka6 50. Bg4 Qc2 51. Qc3 Qb3+ 52. Kb1 Rd5 {WhiteBlunder=1, BlackBunder=0, WhiteBad=6, BlackBad=5} 1-0 [/pgn]
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess Artist

Post by Ferdy »

Chess Artist v1.0.rc5 is released at https://github.com/fsmosca/chess-artist ... g/v1.0.rc5
User avatar
PeterO
Posts: 215
Joined: Sun Jul 31, 2016 6:35 pm

Re: Chess Artist

Post by PeterO »

Hi Ferdy,

I am NOT a computer expert - just a windows user and chessplayer :D .
I dont know how to work with a python script :oops: !
Is it possible to make it an exe?

Peter
User avatar
Guenther
Posts: 4605
Joined: Wed Oct 01, 2008 6:33 am
Location: Regensburg, Germany
Full name: Guenther Simon

Re: Chess Artist

Post by Guenther »

PeterO wrote: Fri Oct 18, 2019 8:02 pm Hi Ferdy,

I am NOT a computer expert - just a windows user and chessplayer :D .
I dont know how to work with a python script :oops: !
Is it possible to make it an exe?

Peter
It is...
https://rwbc-chess.de

trollwatch:
Chessqueen + chessica + AlexChess + Eduard + Sylwy
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess Artist

Post by Ferdy »

PeterO wrote: Fri Oct 18, 2019 8:02 pm Hi Ferdy,

I am NOT a computer expert - just a windows user and chessplayer :D .
I dont know how to work with a python script :oops: !
Is it possible to make it an exe?

Peter
Visit https://github.com/fsmosca/chess-artist/releases
and download chess-artist.zip under assets dropdown, uncompressed it to see the exe file.
purechess
Posts: 82
Joined: Wed Nov 28, 2018 1:28 pm
Full name: Heinrich Pulliter

Re: Chess Artist

Post by purechess »

Had problems with PGN where only a FEN position is defined.
How to analyse thèse with your script?
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess Artist

Post by Ferdy »

purechess wrote: Fri Mar 19, 2021 7:24 pm Had problems with PGN where only a FEN position is defined.
How to analyse thèse with your script?
Can you post an example?
purechess
Posts: 82
Joined: Wed Nov 28, 2018 1:28 pm
Full name: Heinrich Pulliter

Re: Chess Artist

Post by purechess »

This PGN which is just a position doesn't work to analyze

Code: Select all

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "001"]
[White "White to move"]
[Black "?"]
[Result "*"]
[FEN "8/6kp/6p1/8/8/2q1BNP1/6KP/8 w - - 0 1"]
[SetUp "1"]
*
I have Python 3.8.2

I invoke Chess-artist

Code: Select all

python3 chess_artist.py --infile PGN/diagram.pgn --outfile out.pgn --enginefile ./Engine/matefinder --engineoptions "Threads value 4, Hash value 128" --movetime 3000 --job analyze --eval search 
Result

Code: Select all

Analyzing engine: MateFinder 011020 64
Annotating game 1...
Traceback (most recent call last):
  File "chess_artist.py", line 2648, in <module>
    main()
  File "chess_artist.py", line 2637, in main
    g.AnnotatePgn()
  File "chess_artist.py", line 1887, in AnnotatePgn
    self.matBal = Analyze.SaveMaterialBalance(game)
  File "chess_artist.py", line 1699, in SaveMaterialBalance
    endFen = nextNode.board().fen()
UnboundLocalError: local variable 'nextNode' referenced before assignment
Ferdy
Posts: 4833
Joined: Sun Aug 10, 2008 3:15 pm
Location: Philippines

Re: Chess Artist

Post by Ferdy »

purechess wrote: Sat Mar 20, 2021 5:44 pm This PGN which is just a position doesn't work to analyze

Code: Select all

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "001"]
[White "White to move"]
[Black "?"]
[Result "*"]
[FEN "8/6kp/6p1/8/8/2q1BNP1/6KP/8 w - - 0 1"]
[SetUp "1"]
*
I have Python 3.8.2

I invoke Chess-artist

Code: Select all

python3 chess_artist.py --infile PGN/diagram.pgn --outfile out.pgn --enginefile ./Engine/matefinder --engineoptions "Threads value 4, Hash value 128" --movetime 3000 --job analyze --eval search 
Result

Code: Select all

Analyzing engine: MateFinder 011020 64
Annotating game 1...
Traceback (most recent call last):
  File "chess_artist.py", line 2648, in <module>
    main()
  File "chess_artist.py", line 2637, in main
    g.AnnotatePgn()
  File "chess_artist.py", line 1887, in AnnotatePgn
    self.matBal = Analyze.SaveMaterialBalance(game)
  File "chess_artist.py", line 1699, in SaveMaterialBalance
    endFen = nextNode.board().fen()
UnboundLocalError: local variable 'nextNode' referenced before assignment
Normally the game to be analyzed in the pgn file should have a move in it.

I fixed the crash when the game has no move. After the fix, the analyzed output of that game without a move would look like this.

Code: Select all

[Event "?"]
[Site "?"]
[Date "????.??.??"]
[Round "001"]
[White "White to move"]
[Black "?"]
[Result "*"]
[FEN "8/6kp/6p1/8/8/2q1BNP1/6KP/8 w - - 0 1"]
[SetUp "1"]
[Annotator "engine: Stockfish 12, program: Chess Artist v2.27.0"]

{Hash 128mb, Threads 1, analysis 3.0s per position, move score is in pawn unit,
positive is good for white and negative is good for black}
{WhiteBlunder=0, BlackBlunder=0, WhiteBad=0, BlackBad=0} *

There is a way to analyze the position in that game, save that position in the epd file.

diagram.epd

Code: Select all

8/6kp/6p1/8/8/2q1BNP1/6KP/8 w - -
command line:

Code: Select all

python chess_artist.py --infile ./EPD/diagram.epd --outfile out_diagram.epd --enginefile ./engine/stockfish/sf12.exe --engineoptions "Hash value 128, Threads value 1" --eval search --job analyze --movetime 10000
epd output:

Code: Select all

8/6kp/6p1/8/8/2q1BNP1/6KP/8 w - - acd 28; acs 10; bm Bd4+; ce +641; Ae "Stockfish 12";
Jonathan003
Posts: 239
Joined: Fri Jul 06, 2018 4:23 pm
Full name: Jonathan Cremers

Re: Chess Artist

Post by Jonathan003 »

I have downloaded the latest version of Chess-artist from here.
https://github.com/fsmosca/chess-artist ... /tag/v2.12
I want to try it to blundercheck my white repertoire.
I want to avoid that an engine has to go over the same opening lines again and again.
I have a pgn database with the ecoA part of my white repertoire.
It are about 400 games with opening lines, variating from 6 to 36 ply.
I have put all files together in one folder C:\Users\creme\Documents\Second trial repertoire\chess-artist
What would be the best script to use to blunder check the opening lines for the white moves?
I have tried this script

Code: Select all

chess-artist --infile ecoA.pgn --outfile out.pgn --enginefile SF13 --engineoptions "Threads value 4, Hash value 1024" --movetime 6000 --job analyze --color white --eval search 
But no blunders where find, and I'm sure there are.
How can I define the threshold for blunders?