Logo
Chess Analyzer Pro
ReleasesDocsBlogDownload

Documentation

Getting StartedUsage GuideConfigurationArchitectureFiles & DataTroubleshootingHow We Calculate AnalysisChangelogFor Developers

Chess Analyzer Pro

Professional local-first chess analysis.

Project

  • GitHub Repository
  • Download
  • Documentation
  • Report Feedback/Bug

Resources

  • Stockfish Engine
  • Beekeeper Studio
  • My Lichess Profile
  • My Chess.com Profile

Developer

  • Portfolio
  • GitHub Profile
  • LinkedIn
  • Contact Me
© 2025 Utkarsh Tiwari. Open Source.

For Developers

A technical guide for contributors to the Chess Analyzer Pro codebase.

Project Overview

Chess Analyzer Pro is a desktop application built with Python and PyQt6. It follows a modular architecture to separate the GUI from the heavy Stockfish analysis logic.

  • Stack: Python 3.10+, PyQt6 (GUI), Stockfish (Engine), Google Gemini (AI).
  • Repo: imutkarsht/Chess_analyzer

Directory Structure

Chess_analyzer/
├── src/
│   ├── backend/    # Core logic (Analysis, Engine wrapper, APIs)
│   ├── gui/        # PyQt6 Widgets (Board, Graphs, Analysis Panel)
│   └── utils/      # Helpers (Config, Logging)
├── assets/         # Static resources (images, icons)
├── tests/          # pytest suite
├── main.py         # Entry point
└── build.spec      # PyInstaller configuration

Setup for Development

  1. Clone & Install

    git clone https://github.com/imutkarsht/Chess_analyzer.git
    cd Chess_analyzer
    
    # Create virtual environment
    python -m venv venv
    
    # Activate (Windows)
    .\venv\Scripts\activate
    
    # Install dependencies
    pip install -r requirements.txt
    
  2. Run Locally

    python main.py
    

Development Guides

Common Scenarios

1. Changing "Blunder" Thresholds

To adjust how strict the move classification is:

  • File: src/backend/analyzer.py
  • Action: Locate _classify_move and adjust the wpl (Win Probability Loss) values.
    • Example: Change if wpl >= 0.20: to 0.30 to make it less strict.

2. Adding a New Column to Move List

  • File: src/gui/analysis_view.py
  • Action: In MoveListPanel class:
    1. Update setColumnCount count.
    2. Add a new header label.
    3. Populate the data in the refresh method.

3. Adding a New API (e.g., Lichess)

  • Backend: Create a new service in src/backend/ (reference chess_com_api.py).
  • GUI: Import it in src/gui/main_window.py and add a connection to a new Menu Action.

Testing

We use pytest for stability.

# Run all tests
pytest

# Run specific test
pytest tests/test_game_load.py

[!IMPORTANT] Always run tests after adding a new feature.

Building for Distribution

To create the ChessAnalyzerPro.exe file:

pyinstaller build.spec

The output will be located in the dist/ directory.