ChessPilot
ChessPilot copied to clipboard
Introducing an advanced chess bot that automates gameplay on 2D on-screen chess boards, delivering a seamless and immersive experience.
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 **2D on-screen chess board** (Chess.com, Lichess, WorldChess, etc.), 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:
- Verify the release on GitHub.
- Scan the binary on VirusTotal.
-
Build from source (
python src/main.py) for maximum safety. - 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
- ONNX Model: https://github.com/Zai-Kun/2d-chess-pieces-detection
- VC++ Redistributable (Windows): https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist
- Stockfish Engine: https://stockfishchess.org/
Linux
Install system dependencies:
# Ubuntu / Debian
sudo apt install python3-pyqt6
# Arch Linux
sudo pacman -S python-pyqt6
# Fedora
sudo dnf install python3-qt6
Wayland Users (Arch Linux only)
If you are running Wayland instead of X11, install the following:
sudo pacman -S wayland-utils
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
- Choose White or Black.
- Set castling rights if needed.
- Adjust analysis depth.
- Pick Manual or Auto mode.
- (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