fsmosca / chess-artist

A python script that can annotate chess games in pgn file with static evaluation or search score of an engine, can annotate an epd file with acd, acs, bm, and ce opcodes, can test engine with epd test suite and can generate chess puzzles.
GNU General Public License v3.0
69 stars 18 forks source link

6% speed improvement #39

Closed ghost closed 5 years ago

ghost commented 7 years ago

Further improvements could be: not restarting stockfish everytime. I did this in my own program and it made it 131x faster.

fsmosca commented 5 years ago

With this change bufsize=1 it will no longer run on python 2 and 3, on windows.

fsmosca commented 5 years ago

Regarding the removal of p.stdin.write("ucinewgame\n")

I don't really like this, in uci protocol it is always preferable to send that command to the engine specially when chess artist is used in epd processing.

On the other hand if chess artist is used in game analysis, not sending ucinewgame is reasonable as positions there could be related, but this is really not practical as the engine is quitted after every position analysis.