I am working on a research project where we need to run stockfish on hundreds of thousands of pgns we have collected. We need to extract all information generated from stockfish like centipawns, inaccuracies, blunders, mistakes, etc. I know you can download stockfish .exe and some gui to use it with. But we need to run it on large number of existing pgns in an automated manner preferably using python.
-
1Stockfish itself is a command line program so I suspect it should be possible to call it from within a python program.– koedemJan 25 at 9:24
-
1Pleaes note that blunders, mistakes and so on are not engine output but rather definitions made on top to (at least in theory) make analysis more human-readable– DavidJan 25 at 14:44
-
Related: Is there a way to get blunders, mistakes and inaccuracies using Stockfish?– SecretAgentManJan 25 at 15:19
2 Answers
Download Stockfish form official website. Note that there are different versions for different cpus - pick first one that works.
Then you can communicate with stockfish using UCI protocol. For python library python-chess supports it.
For distributed analysis Lichess developed Fishnet which is open source. Maybe you can adapt it for your needs?