All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
-
V3 Engine with GPU/CPU Support:
device.py- Automatic CUDA detection with CPU fallbackcuda_kernels.py- Numba CUDA batch evaluation kernelsparallel_search.py- Thread pool for parallel root searchchess_transposition_table.py- Thread-safe TT with RLock
-
Thread Safety:
- Thread-local counters for search statistics
- Locked history and killer move tables
- Thread-safe transposition table with automatic eviction
- Support for 15+ CPU threads on multi-core systems
-
GPU Acceleration (CUDA):
- Batch position evaluation kernel
- Automatic CPU fallback if CUDA unavailable
- 512MB VRAM budget enforcement
- Memory usage monitoring
- Added
numba>=0.63.0for CUDA support - Added
llvmlite>=0.46.0(numba dependency)
-
V2 Engine Architecture: Complete rewrite with modular design
chess_engine.py- Core game state and move generationchess_algorithm.py- Negascout search with SEE, MVV-LVA, killer moveschess_heuristic_calculation.py- Comprehensive evaluation functionchess_opening_book.py- 50+ opening position databasechess_transposition_table.py- Position cachingchess_hash.py- Zobrist hashing for position identification
-
Modern Web UI: React + Vite frontend with FastAPI backend
main/client/- React applicationmain/server/- FastAPI REST endpoints
-
Comprehensive Evaluation Function:
- Material counting (centipawn values)
- Piece-square tables with tapered evaluation
- Bishop pair bonus (+50 cp)
- Rook on open/semi-open files (+15-25 cp)
- Passed pawn bonuses (up to +150 cp)
- Pawn structure penalties (doubled/isolated)
- King safety (pawn shield, castling bonus)
-
Search Enhancements:
- Negascout (Principal Variation Search)
- Quiescence search with SEE pruning
- Static Exchange Evaluation (SEE)
- Check extensions
- MVV-LVA move ordering
- Killer moves heuristic
- History heuristic
- Transposition table with 1M entry limit
-
Test Suite: 80 comprehensive tests covering:
- Move generation
- Special moves (castling, en passant, promotion)
- Check/checkmate/stalemate detection
- PGN import/export
- Algorithm correctness
- API endpoints
- Restructured engine into
v1/(legacy) andv2/(current) directories - Disabled AI hints for V2 (performance optimization, will re-enable in V3)
- Search depth set to 5 for balanced speed/strength
- Repetition detection bug causing premature search termination
- Transposition table pollution from stale entries
- Move ordering for captures (now uses SEE)
- Initial chess engine with basic move generation
- Pygame-based visual interface
- V1 search algorithm with alpha-beta pruning