This application allows users to analyze chess games using Stockfish engine, visualize the chessboard, and track game moves with a dynamic evaluation bar.
- Chessboard Visualization: Display the chessboard with pieces loaded from PNG files.
- PGN File Loading: Load a PGN file to analyze a game's moves.
- Move Navigation: Navigate through game moves, both forward and backward.
- Evaluation Bar: Visualize the evaluation score dynamically with a split bar indicating advantage for white and black sides.
- Move History: Display the history of moves made in the game.
- Stockfish Integration: Use Stockfish engine for game analysis and evaluation.
-
Clone the Repository:
git clone [https://github.com/your-username/Chess-Game-Analysis.git](https://github.com/mominalix/Python-GUI-Chess-Game-Analysis-with-Stockfish.git) cd Chess-Game-Analysis
-
Install Dependencies:
pip install -r requrements.txt
-
Download Stockfish:
- Download the appropriate Stockfish binary for your operating system from Stockfish Official Site.
- Place the downloaded executable in the
stockfish
directory within your project.
-
Run the Application:
python main.py
-
Load a PGN File:
- Click on the "Load PGN" button to load a PGN file containing a chess game.
-
Navigate Through Moves:
- Use the navigation buttons ("Next Move" and "Previous Move") to move forward or backward through the game moves.
-
Move Pieces on the Board:
- Click on a piece and then click on its destination square to make a move on the chessboard.
-
Reset the Board:
- Click on the "Reset Board" button to reset the board to the initial state.
-
Analysis Bar:
- The vertical bar on the left side of the board dynamically shows the evaluation score from Stockfish, split to indicate advantage for white and black sides.
-
Quit the Application:
- Close the application window or press
Ctrl+C
in the terminal to exit.
- Close the application window or press
Chess-Game-Analysis/
│
├── main.py # Main application entry point
├── gui.py # GUI setup and interaction
├── engine.py # Chess engine integration (Stockfish)
├── move_history.py # Move history management
├── navigation.py # Navigation buttons for moves
├── stockfish/ # Directory for Stockfish engine
│ └── stockfish.exe # Stockfish executable (platform specific)
├── assets/ # Directory for chess piece images
│ └── piece_images/ # Directory containing piece images (wp.png, bp.png, etc.)
└── README.md # Documentation file