A fully offline chess position evaluator and autoplayer for Windows and Linux, powered by ONNX and Stockfish.
- Automatic Stockfish Download: Automatically detects your CPU and downloads the best Stockfish version—no manual setup required.
- FEN Extraction: Captures your board state with a local ONNX model (Zai-Kun’s 2D Chess Detection).
- Stockfish Analysis: Integrates with the Stockfish engine to compute the optimal move.
- Auto-Move Execution: Plays the suggested move on your screen automatically.
- Manual Play: Click “Play Next Move” when you’re ready to proceed.
- Board Flipping: Supports playing as Black by flipping the board.
- Castling Rights: Toggle Kingside/Queenside castling.
- Depth Control: Adjust analysis depth via a slider (default: 15).
- Retry Logic: Retries failed moves up to three times.
- ESC Shortcut: Press ESC to reselect playing color at any time.
- Cross-Platform GUI: Built with Tkinter for simplicity.
- 100% Offline: No external API calls—your data stays local.
The ONNX model (chess_detectionv0.0.4.onnx
) is already bundled in official AppImage, EXE, and DEB builds.
Stockfish will be downloaded automatically on first run according to your CPU.
You can fine-tune Stockfish’s performance without touching any code.
Simply place an engine_config.txt
file next to the ChessPilot executable:
# ================================
# ChessPilot Engine Configuration
# ================================
# Memory used in MB (64–1024+ recommended)
setoption name Hash value 512
# CPU threads to use (1–8; match your CPU core count)
setoption name Threads value 2
- Edit
Hash
to adjust how much RAM (in MB) Stockfish uses. - Edit
Threads
to match your CPU cores. - Save and restart ChessPilot to apply the new settings.
If you're running from source or using the raw files (not packaged AppImage/EXE/DEB), you need:
sudo apt install python3-tk # Ubuntu / Debian
sudo pacman -S tk # Arch Linux
sudo dnf install python3-tkinter # Fedora
Install Python dependencies:
pip install -r requirements.txt
-
Assets Needed (Source only):
Stockfish will be downloaded automatically when you run ChessPilot.
Windows Raw File Users Only: You may also need the Microsoft Visual C++ Redistributable if it's not already installed. Download here
git clone https://github.com/OTAKUWeBer/ChessPilot.git
cd ChessPilot
pip install -r requirements.txt
# Add ONNX model if not using binary
From the project root:
python src/main.py
Workflow:
- Choose White or Black.
- Enable castling rights if needed.
- Adjust analysis depth.
- Select Manual or Auto play.
- Windows: ✅ Tested
- Linux: ✅ Tested (including Wayland via
grim
) - macOS: ❌ Untested (no macOS build; contributions welcome!)
See SHORTCUTS.md for a full list of hotkeys and actions.
Contributions are welcome! Please open an issue or submit a pull request.
This project is licensed under the MIT License. See LICENSE for details.
- Zai-Kun for the ONNX chess piece detector.
- Stockfish Team for the world’s strongest open-source engine.