Ethereal Chess Engine is a competitive chess engine optimized for memory-constrained environments. This version has been specifically tuned to operate within strict memory limits while maintaining strong playing strength. We also optimized Cfish. For this competition, we noticed that C was the best programming language in terms of memory efficiency, and better than C++.
- 10 seconds per game
- 0.1 second Simple Delay (unused time is not banked)
- Games played in pairs with color swapping
- 5 MiB RAM limit
- Single CPU core @ 2.20GHz
- 64KiB compressed submission size limit
- Standard chess rules apply
- Automatic draws:
- Threefold repetition
- 50-move rule (no captures or pawn moves)
- Random opening positions from a curated selection
- Reduced to 1 MB from original size
- Modified
tt_initto work with smaller keysize - Switched from 2 MB hugepages to standard 4096 byte memory pages
- Reduced
MAX_PLYandMAX_MOVESparameters intypes.hby 50% - Optimized for memory efficiency while maintaining search depth
- Reduced PK cache size from 2^16 to 2^13 elements
- Updated PK cache mask accordingly
- Balanced between memory usage and evaluation accuracy
- Skill rating modeled as Gaussian N(μ,σ²)
- μ: estimated skill
- σ: uncertainty factor (decreases over time)
- Initial rating: μ₀ = 600
- Ratings adjusted based on game outcomes
- Self-play validation episode on submission
- Automatic error detection and logging
- Performance monitoring throughout competition
- Memory allocations optimized for 5 MiB RAM constraint
- Critical attention to memory page alignment
- Efficient state management for time control handling
- Memory efficiency without sacrificing playing strength
- Robust time management for 10s games
- Optimization for single-core performance
The following were removed:
- Openings poly book
- Endgame book
- Print statements
- Chess 960 support
Also, the file was compressed first with 7z, then gz.
The memory reductions were the same as Ethereal. Other things were tried, but they did not help or hurt the performance.
Local testing was done between different versions to check for improvements or degradation as kaggle submissions were limited per day. The matchups were tracked in an excel sheet along with the specific commit.