Ferdy wrote:Can be found at upper part of the code.
Download:Code: Select all
""" I About the script 1. It takes a pgn file with games in it and analyze those games there one by one if there are more than one game 2. It mainly uses Stockfish uci engine during development. Other uci engines can be used provided those engines support multipv mode II. Application references and dependencies 1. Developed under python 2.7.6 2. Using python-chess library version 0.13.0 site: http://python-chess.readthedocs.org/en/v0.13.0/ III Release notes 1. Release date: January 4, 2016 2. Files: a. game_analyzer_v38.py b. python-chess-0.13.0.tar c. book.bin IV. Chess Game Analyzer Development log A. Notes: 1. Interesting positions are saved in puzzle.epd 2. Existing comments in the original pgn will not be copied to the analyzed game 3. Original pgn file will not be changed by the script 4. Installation of python 2.7.6 or later (not tested though) and python-chess v0.13.0 on your computer are needed for the script to work B. Changes: v38 1. Use command line options instead of interactive user input v37 1. Copy the original headers completely into analyzedGame.pgn 2. Tested using Stockfish 7 under OS windows 7 3. Calculation of position complexity by "pv move changes" starts at iteration depth equal to 9 4. Print statements are now converted to function for python 3.0 and later compatibility
https://app.box.com/s/hmle0vhi3xho06yu7oead13ef59bo49d
Hello, Ferdinand. Thanks for the update. I tried to run it on my linux box, but it complains about I/O operations.
giovanni@giovanni-System-Product-Name:~/Downloads$ python game_analyzer_v38.py --file "Francesco_Carnevale_2016.pgn" --engine "/home/giovanni/Downloads/stockfish_16072409_x64" --eoption "Hash value 128, Threads value 1" --movetime 2000 --startmove 8 --endmove 30 --blundermargincp 15 --bookfile "book.bin" --outfile "anagames.pgn"
Chess Game Analyzer v38
Traceback (most recent call last):
File "game_analyzer_v38.py", line 1389, in <module>
main(sys.argv[1:])
File "game_analyzer_v38.py", line 897, in main
engine_id = get_engine_id(sEngine)
File "game_analyzer_v38.py", line 820, in get_engine_id
p.communicate()
File "/usr/lib/python2.7/subprocess.py", line 800, in communicate
return self._communicate(input)
File "/usr/lib/python2.7/subprocess.py", line 1412, in _communicate
self.stdin.flush()
ValueError: I/O operation on closed file