chess.ai/
├── script.py # Main application (Full-featured GUI)
├── test_requirements.py # Test suite for all components
├── requirements.txt # Python dependencies
├── README.md # Comprehensive documentation
├── QUICKSTART.md # Quick start guide (this file)
├── setup.sh # Automated setup script
├── .venv/ # Python virtual environment
└── .qodo/ # Project metadata
- Size: ~400 lines of production-ready code
- Features:
- Modern Tkinter GUI with dark theme
- Image upload and display
- Real-time board detection (OpenCV)
- FEN notation conversion with presets
- Stockfish integration for analysis
- Best move detection
- Attack/Defense classification
- Top 3 candidate moves
- Live progress tracking
- Error handling & validation
- System requirements
- Installation instructions (all OS)
- Usage guide with examples
- FEN notation explanation
- Troubleshooting section
- Technical details
- Learning resources
- Python version validation
- Dependency verification
- Stockfish engine testing
- FEN validation tests
- Position analysis tests
- Result: ✅ ALL TESTS PASS
Pillow>=9.2.0 # Image processing
python-chess>=1.9.4 # Chess logic
stockfish>=3.28.0 # Engine wrapper
opencv-python>=4.6.0 # Board detection
- Automated environment configuration
- Dependency installation
- Stockfish detection/installation
cd /Users/nazky/Documents/RPL/chess.ai
chmod +x setup.sh
./setup.shcd /Users/nazky/Documents/RPL/chess.ai
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
brew install stockfish # macOS./.venv/bin/python script.py✅ TEST 1: Python Version PASSED
✅ TEST 2: Required Dependencies PASSED
✅ TEST 3: Stockfish Engine PASSED
✅ TEST 4: Chess FEN Validation PASSED
✅ TEST 5: Basic Position Analysis PASSED
🎉 ALL TESTS PASSED!
- Click "Upload Chess Screenshot"
- Select any chess image
- Click "Scan & Analyze Position"
- Select "Starting Position" from presets
- View analysis results instantly
- Enter custom FEN:
rnbqkbnr/pppppppp/8/8/4P3/8/PPPP1PPP/RNBQKBNR b KQkq e3 0 1 - Click "Analyze"
- See best move (e.g., "c5") and evaluation
- Load "Fool's Mate (Black Won)" preset
- See "Mate in 2" evaluation
- Get best defensive move
| Component | Technology | Version |
|---|---|---|
| GUI | Tkinter | Python built-in |
| Chess Engine | Stockfish | 14+ |
| Python Library | python-chess | 1.9.4+ |
| Image Processing | OpenCV | 4.6+ |
| Image Format | Pillow | 9.2+ |
| Python | CPython | 3.14.2 |
| OS | macOS (M-series) | ARM64 |
- ✅ Image upload (PNG, JPG, JPEG, BMP)
- ✅ Board detection (OpenCV-based)
- ✅ FEN notation generation
- ✅ FEN normalization and validation
- ✅ Stockfish integration
- ✅ Best move analysis
- ✅ Checkmate detection
- ✅ Attack/Defense classification
- ✅ Multi-move evaluation
- ✅ Modern responsive GUI
- ✅ Status tracking
- ✅ Error handling
- ✅ Cross-platform support
- ✅ Python 3.8+
- ✅ Image processing library (OpenCV)
- ✅ Chess engine (Stockfish)
- ✅ GUI framework (Tkinter)
- ✅ FEN generation
- ✅ Best move detection (Attacking)
- ✅ Best move detection (Defending)
- ✅ Screenshot upload
- ✅ Results display
-
README.md - Full documentation
- Installation guides for all OS
- Usage instructions
- Troubleshooting
- Learning resources
-
QUICKSTART.md - This file
- Project overview
- Quick setup
- Testing results
-
script.py - Inline code comments
- Clear sections
- Function documentation
- Error handling
- ✅ All dependencies installed
- ✅ Stockfish properly configured
- ✅ Python syntax validated
- ✅ All tests passing
- ✅ GUI framework available (Tkinter)
- ✅ Image processing working
- ✅ Chess engine responsive
- ✅ Cross-platform paths handled
- ✅ Error messages informative
- ✅ Code well-documented
# Verify Tkinter is available
python3 -m tkinter
# If it opens, Tkinter is working# On macOS
brew install stockfish
# On Linux
sudo apt install stockfish
# Verify
which stockfish- This is normal for deep analysis
- Thinking time is set to 2 seconds
- Reduce by editing
time=2.0->time=0.5
- Stockfish: https://stockfishchess.org/
- python-chess: https://python-chess.readthedocs.io/
- OpenCV: https://docs.opencv.org/
- Chess.com: https://www.chess.com/
- Understanding FEN: Learn FEN notation from chess.com
- Basic Analysis: Try simple positions (starting position)
- Complex Positions: Test with puzzle FEN strings
- Competitive Play: Analyze your own games
- Deep Understanding: Study Stockfish evaluations
- Train ML model for piece detection
- Add PGN export functionality
- Integrate with chess.com API
- Support multiple engines
- Add opening database
- Create mobile version
- Chess Study: Analyze positions for learning
- Game Analysis: Review your games
- Puzzle Solving: Get engine hints
- Teaching: Show students optimal moves
- Research: Study engine evaluation patterns
- Version: 1.0
- Created: March 2026
- Status: ✅ Production Ready
- Python: 3.8+
- Tested on: macOS 12+ (Apple Silicon)
- Core functionality working
- Dependencies installed
- Stockfish integrated
- Tests passing
- GUI responsive
- Error handling
- Documentation complete
- Cross-platform compatible
- Ready for production
Your AI Chess Scanner is ready to use!
# Run it now
./.venv/bin/python script.pyEnjoy chess analysis! ♟️
For questions or issues, refer to README.md or check system requirements with:
python test_requirements.py