Skip to content

Kletternaut/Chess_analyzer

ย 
ย 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

77 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Chess Analyzer Pro

License Python Build Status

Chess Analyzer Pro Logo

๐ŸŒ Official Website: chess-analyzer-ut.vercel.app
Visit the official site for detailed documentation, latest updates, and to report bugs or request features.

Chess Analyzer Pro is a powerful, full-stack Python desktop application designed to bring professional-grade chess analysis to your local machine. Inspired by platforms like Chess.com, it combines the robust analysis capabilities of Stockfish with a sleek, responsive PyQt6 interface.

๐Ÿ“ธ Screenshots

Analysis View Stats Tab Settings Tab History Tab
Main Interface Stats Tab Settings Tab History Tab

๐Ÿš€ Features

Core Analysis

  • Stockfish Integration: Leverages the world's strongest chess engine for deep, move-by-move analysis.

  • Move Classification: Automatically classifies every move (Brilliant, Great, Best, Excellent, Good, Inaccuracy, Mistake, Blunder, Miss).

  • Win Probability: Calculates and displays win probability swings for every move.

  • Opening Explorer: Identifies openings and variations using a built-in book and online APIs.

  • Ending Analysis: Charts game outcomes by type (Checkmate, Time, Resignation).

User Interface

  • Interactive Board: Fully functional chessboard with drag-and-drop support and visual move indicators.
  • Evaluation Graph: Dynamic graph visualizing the game's evaluation flow.
  • Game List: Easy navigation between multiple games in a PGN.
  • Move List: Detailed move history with classification icons and evaluation scores.

Import & Export

  • PGN Support: Robust parsing for single and multi-game PGN files.
  • Direct Text Input: Paste PGN text directly from your clipboard for quick analysis.
  • Web Imports:
    • Chess.com: Import from user profiles or specific game URLs.
    • Lichess: Import from usernames or specific game URLs.
  • Data Backup: Export your entire game history to CSV for backup or analysis in other tools, and import it back seamlessly.

Audio & Visuals

  • Splash Screen: Beautiful startup screen for a polished launch experience.
  • Sound Effects: Immersive audio feedback for moves, captures, checks, castles, and game completion.
  • Board Themes: Multiple board color themes to customize your chessboard appearance.
  • Piece Themes: Choose from different piece sets to personalize your playing experience.
  • Dark Mode: Modern dark theme for reduced eye strain during long analysis sessions.

๐Ÿ’ป Tech Stack

  • Core: Python 3.10+
  • GUI: PyQt6 (Modern, responsive desktop interface)
  • Engine: Stockfish (Via UCI protocol for world-class analysis)
  • Database: SQLite references locally (analysis_cache.db) to cache analysis results, ensuring instant loading for previously analyzed games.
  • Config: Local config.json for persistent user settings.
  • Integrations:
    • Groq AI: AI-powered natural language game summaries with customizable models.
    • Lichess & Chess.com: Direct game import APIs.

๐Ÿ”’ Data Privacy & Local Storage

We prioritize your privacy. Chess Analyzer Pro is a "Local-First" application.

  • Local Database: All analysis data and game history are stored in a local SQLite database (analysis_cache.db).
  • No Cloud Uploads: Your games and moves are never uploaded to our servers. Analysis happens entirely on your machine using the bundled Stockfish engine.
  • Secure Config: API keys (Groq, Lichess) are stored locally in config.json and are never shared.

๐Ÿ› ๏ธ Installation

Prerequisites

Steps

  1. Clone the Repository

    git clone https://github.com/yourusername/chess-analyzer-pro.git
    cd chess-analyzer-pro
  2. Create a Virtual Environment (Recommended) Using uv (faster and more reliable):

    # Install uv if you haven't already
    pip install uv
    
    # Create virtual environment
    uv venv .venv
    
    # Activate
    # Windows
    .venv\Scripts\activate
    # macOS/Linux
    source .venv/bin/activate
  3. Install Dependencies

    uv pip install -r requirements.txt
  4. Setup Stockfish

    • Download the Stockfish engine for your OS.
    • Extract the executable to a known location (e.g., inside a stockfish/ folder in the project root).

๐ŸŽฎ Usage

  1. Run the Application

    uv main.py
  2. Configure Engine

    • Go to Settings > Configure Engine....
    • Select your Stockfish executable path.
  3. Load a Game

    • File > Open PGN...: Load a local .pgn file.

    • File > Load from Chess.com User...: Fetch recent games for a specific user.

    • File > Load from Lichess User...: Fetch recent games for a Lichess user.

    • File > Load from Chess.com URL...: Analyze a specific game URL.

  4. Analyze

    • Click Analysis > Analyze Game to start the engine.
    • Watch the progress bar as the engine evaluates each move.
    • Once complete, explore the move list and graph!

๐Ÿงช Testing

Run the test suite to ensure everything is working correctly:

python -m pytest tests/

๐Ÿค Contributing

Contributions are welcome! Please follow these steps:

  1. Fork the repository.
  2. Create a new branch (git checkout -b feature/YourFeature).
  3. Commit your changes (git commit -m 'Add some feature').
  4. Push to the branch (git push origin feature/YourFeature).
  5. Open a Pull Request.

๐Ÿ”ฎ Roadmap (Version 2.0)

  • PDF Export: Generate professional PDF reports.
  • Coach Mode: AI-powered natural language explanations.
  • Opening Repertoire Builder: Tools to build and practice openings.
  • Endgame Tablebases: Integration with Syzygy tablebases.
  • Multi-Engine Support: Compare analysis from different engines.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

Note: The chess piece graphics in assets/pieces/ are a separate work licensed under CC BY-SA 3.0 (see the Third-Party Assets section below).

Third-Party Assets

The chess piece graphics shipped in assets/pieces/ come from the Cburnett SVG chess set by Colin M.L. Burnett.

The SVGs are kept in a separate directory so they can be replaced or removed without touching the MIT-licensed source code.

Acknowledgements

About

A free Alternative to chess.com analysis engine built using pyqt5 and stockfish.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • Python 100.0%