Skip to content

Introducing an advanced chess bot that effortlessly automates gameplay on virtually every board configuration, delivering a seamless and immersive experience.

License

Notifications You must be signed in to change notification settings

OTAKUWeBer/ChessPilot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ChessPilot Logo


ChessPilot β€” v2.x

A fully offline chess position evaluator and autoplayer for Windows and Linux β€” powered by ONNX and Stockfish.


A lightweight, privacy-first tool that reads a real chess board from a screenshot/webcam, evaluates the position locally with Stockfish, and (optionally) plays the best move automatically.


πŸŽ₯ Demo Video


πŸŽ‰ Highlights (What's New)

v2.1.0 β€” Stability, Precision & Performance

  • Full pawn promotion support β€” handled automatically and reliably.
  • Small under-the-hood improvements for cross-platform stability.

v2.0.0 β€” PyQt6 UI (Polished)

  • Brand-new PyQt6-based frontend (replaces old Tkinter UI).
  • Same workflow and shortcuts β€” just smoother and more stable.

⚑ Features

  • 100% Offline β€” all detection & analysis run locally.
  • Automatic Stockfish Download (CPU-Optimized) β€” ChessPilot automatically detects your CPU features (AVX2, AVX512, POPCNT, etc.) and downloads the most optimized Stockfish build on first run.
  • FEN Extraction β€” ONNX-based piece detector (Zai-Kun’s model).
  • Stockfish Analysis β€” instant best-move suggestions.
  • Auto Move Execution β€” applies engine moves to the GUI board.
  • Manual Play β€” use Play Next Move to control timing.
  • Automatic Promotion β€” follows Stockfish’s preferred choice.
  • Castling Rights & Depth Control β€” flexible configuration.
  • Retry Logic β€” failed moves automatically retried up to 3 times.
  • Cross-Platform β€” AppImage/DEB for Linux, EXE for Windows.

πŸ“¦ Download

πŸ‘‰ Download the latest release

The ONNX model (chess_detectionv0.0.4.onnx) is included inside all official AppImage, EXE, and DEB builds.


πŸ”’ Windows Antivirus Warnings (False Positives)

Windows may flag unsigned executables β€” this is common for small open-source projects.

If you see a warning:

  1. Verify the release on GitHub.
  2. Scan the binary on VirusTotal.
  3. Build from source (python src/main.py) for maximum safety.
  4. Only run if comfortable β€” or use a VM.

πŸ› οΈ Engine Configuration (engine_config.txt)

Place this file next to the executable to customize Stockfish:

# ChessPilot Engine Configuration # Memory in MB (64–1024 recommended) setoption name Hash value 512 # Number of CPU threads setoption name Threads value 2

Restart ChessPilot after editing.


βš™οΈ Prerequisites (From Source)

PyQt6 is required for the UI.

Related Links


Linux

Install system dependencies:

sudo apt install python3-pyqt6 # Ubuntu / Debian sudo pacman -S python-pyqt6 # Arch Linux sudo dnf install python3-qt6 # Fedora

Install Python dependencies:

pip install -r requirements.txt

Make sure your Python virtual environment is activated if you are using one.

Windows

pip install -r requirements.txt

If you see errors about missing vcruntime or msvcp DLLs, install the latest VC++ Redistributable - here.


▢️ Run (From Source)

git clone https://github.com/OTAKUWeBer/ChessPilot.git cd ChessPilot pip install -r requirements.txt python src/main.py

Workflow

  1. Choose White or Black.
  2. Set castling rights if needed.
  3. Adjust analysis depth.
  4. Pick Manual or Auto mode.
  5. (Press ESC to reopen color selection.)

βœ… Platform Support

  • Windows β€” tested, EXE provided
  • Linux β€” tested, AppImage & DEB provided (Wayland supported)
  • macOS β€” not yet supported (looking for contributors)

πŸ” Troubleshooting & FAQ

Board detection is incorrect β†’ Move the ChessPilot UI aside so the detector has a clear view of the board.

Stockfish didn’t download β†’ Check your internet connection and firewall settings. β†’ Alternatively, manually place a Stockfish ZIP or binary in the src/ folder.


🀝 Contributing

PRs and issues are welcome.

Areas that need help:

  • macOS packaging
  • UI/UX enhancements

πŸ“œ License

This project is under the MIT License.


πŸ™ Acknowledgments

Project & Dependencies

  • Zai-Kun β€” ONNX 2D chess piece detector
  • Stockfish Team β€” world-class chess engine
  • Microsoft VC++ Runtime
  • All contributors and testers