iamjarret / pystockfish

Implements an easy-to-use Engine class to integrates the Stockfish chess engine with Python
GNU General Public License v3.0
30 stars 13 forks source link

Import a pgn file and analyze? #14

Open bhathiya opened 7 years ago

bhathiya commented 7 years ago

Is it possible to import an entire game from a pgn file, and then analyze it?

For example, to find if the white queen is available after the 10th move? Or what are the mistakes made in the game etc.?

Thanks.

marshallcc commented 7 years ago

Hi Bhatihiya,

You'll need to parse the PGN. Then feed it to pystockfish move by move. It'd be a good feature if it were automated.

Best, Jarret

bhathiya commented 7 years ago

Hi Jarret,

Thank you for the response. Do you mean I should parse the PGN using some other library? If yes, I can do that with python-chess. Let's say I did that and have the list of moves? Could you please show me how I can feed it to pystockfish and get something like I have mentioned above?

Appreciate your help.

Thanks, Bhathiya

marshallcc commented 7 years ago

Main example answers your question.

Best, Jarret

bhathiya commented 7 years ago

Thank you. I'll try that.