An in-depth chess game analyzer written with Python 3 using Stockfish engine.
Run pip3 install -r requirements.txt
Run python3 src/ChessAnalyzer.py gamefile [b] [depth]
- b means Black at the bottom. White otherwise.
- Default depth is 18.
Works with Windows, MacOs and Linux.
gamefile is :
- A PGN file (.pgn or .txt)
- A FEN (example:
python3 src/ChessAnalyzer.py "r1b1k1nr/pp3ppp/n3p3/2pp3q/3b3P/N3PNP1/P2B1P2/2RQKB1R b Kkq - 0 10"
)
When you give the program a PGN file, it analyzes all the moves in the game, then you can review each move and see if it was the best one, a good one or an mistake.
The program file show you the best move for this configuration
- Press
r
to rotate the chess board - Press
f
to print the actual FEN in the terminal - Press
p
to print the score of the move and the score of the best one - Press
q
oresc
to quit
On this screenshot, white has played fxe4, which is a mistake because it gives mate in one move for black. The best move was Kd2 with a score of -3165.