Answers.Body: <p>Download Stockfish form <a href="https://stockfishchess.org/" rel="noreferrer">official website</a>. Note that there are different versions for different cpus - pick first one that works.</p>
  <p>Then you can communicate with stockfish using <a href="https://en.wikipedia.org/wiki/Universal_Chess_Interface" rel="noreferrer">UCI protocol</a>. For python library <a href="https://python-chess.readthedocs.io/en/latest/engine.html" rel="noreferrer">python-chess</a> supports it.</p>
  <p>For distributed analysis Lichess developed <a href="https://github.com/lichess-org/fishnet" rel="noreferrer">Fishnet</a> which is open source. Maybe you can adapt it for your needs?</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-25T13:58:22.770Z
Answers.LastActivityDate: 2023-01-25T13:58:22.770Z
Answers.UserDisplayName: Matija Sirk
Answers.Body: <p><a href="https://github.com/rooklift/nibbler" rel="nofollow noreferrer">Nibbler</a> appears to have partial Stockfish support; it's Leela-oriented.</p>
  <p>I've <a href="https://github.com/lichess-org/fishnet/issues/249" rel="nofollow noreferrer">requested</a> for Lichess to make their feature available locally - it helps if they hear from more users, consider commenting. Since it's open-source, locality is of course possible for an outsider to implement, if willing.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-06T21:58:10.190Z
Answers.LastActivityDate: 2023-08-06T21:58:10.190Z
Answers.UserDisplayName: OverLordGoldDragon
Body: <p>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.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-25T09:24:07.573Z
Comments.Text: Stockfish itself is a command line program so I suspect it should be possible to call it from within a python program.
Comments.UserDisplayName: koedem
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-25T14:44:46.850Z
Comments.Text: Pleaes 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
Comments.UserDisplayName: David
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-01-25T15:19:02.300Z
Comments.Text: Related: [Is there a way to get blunders, mistakes and inaccuracies using Stockfish?](https://chess.stackexchange.com/q/41396/26335)
Comments.UserDisplayName: SecretAgentMan
Tags: <analysis><stockfish><pgn><lichess><python>
Title: How to run lichess stockfish analysis locally?
ThreadText: # How to run lichess stockfish analysis locally?
  
  (Asked by: username_0 on 2023-01-25)
  
  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.
  
  **Tags:** analysis, stockfish, pgn, lichess, python
  
  > **Comments:**
  > **username_1**: Stockfish itself is a command line program so I suspect it should be possible to call it from within a python program.  
  > **username_2**: Pleaes 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  
  > **username_3**: Related: [Is there a way to get blunders, mistakes and inaccuracies using Stockfish?](https://chess.stackexchange.com/q/41396/26335)  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_4 on 2023-01-25. Score: 5
  
  Download Stockfish form [official website](https://stockfishchess.org/). Note that there are different versions for different cpus - pick first one that works.
  
  Then you can communicate with stockfish using [UCI protocol](https://en.wikipedia.org/wiki/Universal_Chess_Interface). For python library [python-chess](https://python-chess.readthedocs.io/en/latest/engine.html) supports it.
  
  For distributed analysis Lichess developed [Fishnet](https://github.com/lichess-org/fishnet) which is open source. Maybe you can adapt it for your needs?
  
  
  ---
  
  ### Answer by username_5 on 2023-08-06. Score: 1
  
  [Nibbler](https://github.com/rooklift/nibbler) appears to have partial Stockfish support; it's Leela-oriented.
  
  I've [requested](https://github.com/lichess-org/fishnet/issues/249) for Lichess to make their feature available locally - it helps if they hear from more users, consider commenting. Since it's open-source, locality is of course possible for an outsider to implement, if willing.
  
  
  ---
  
  