Copyright (c) 2026 STARGA, Inc. All rights reserved.
NikolaChess is a supercomputer-class chess engine written 100% in MIND.
- 64-bit bitboard representation
- Piece-centric board arrays
- Incremental Zobrist hashing
- Legal move validation
- Magic bitboard sliding piece attacks
- Staged move generation
- Move ordering with history heuristics
- Alpha-beta with principal variation search
- Iterative deepening
- Aspiration windows
- Null move pruning
- Late move reductions (
src/lmr.mind) - Futility pruning
- Check extensions
- Singular extensions
- ABDADA algorithm for SMP
- Lock-free transposition table
- Work stealing
- GPU acceleration via MIND Runtime
- Monte Carlo Tree Search with PUCT selection (AlphaZero-style)
- Policy+Value network with ResNet backbone
- Batched leaf evaluation on GPU
- Virtual loss for parallel expansion
- Dirichlet noise for root exploration
- SPTT (Superparallel Tree Traversal) algorithm
- Dynamic switching between alpha-beta and MCTS
- Position analyzer for algorithm selection:
- High branching factor → MCTS
- Tactical positions → Alpha-beta
- Endgame → Alpha-beta with tablebases
- History-modulated Late Move Reductions
- ProbCut pruning with statistical cutoff prediction
- Enhanced killer move tracking
- Countermove heuristic with history bonuses
- HalfKA feature extraction (45,056 features)
- Efficiently updatable accumulator
- Quantized int8/int16 weights
- SIMD acceleration (AVX2/AVX-512)
- CUDA batched inference
Input: HalfKA features (64 * 64 * 11 = 45,056)
↓
Feature Transformer (45,056 → 1024) × 2 perspectives
↓
ClippedReLU
↓
Hidden Layer 1 (2048 → 16)
↓
ClippedReLU
↓
Hidden Layer 2 (16 → 32)
↓
ClippedReLU
↓
Output (32 → 1)
- Attention-based root move reordering
- 4-head self-attention
- Position encoding
- ~15 Elo gain at root
- Batch positions from Lazy SMP threads for GPU inference
- 32-256 positions per batch
- Asynchronous CUDA streams
- 1M+ positions/sec throughput
- Multi-GPU distribution (up to 8 GPUs)
- CNN-based fortress detection (95%+ accuracy)
- Tapered phase evaluation with smooth transitions
- Dynamic contempt based on opponent strength
- King activity bonus in endgames
- Fortress detection network
- Draw probability estimation
- Opposite-color bishop handling (
src/ocb_simd.mind)
- Known draw positions
- Theoretical endgame draws
- Fortress patterns
- Syzygy tablebase probing (7-man, 8-man)
- Endgame-specific evaluation
- Mating patterns
- Standard UCI implementation
- MultiPV support
- Ponder support
- Hash/Threads options
- SPRT (Sequential Probability Ratio Test) for Elo measurement
- A/B testing configuration with customizable parameters
- 30 curated benchmark positions:
- Openings, middlegame tactics, complex positions
- Rook, pawn, and complex endgames
- Automated statistical significance testing
- Lichess API v2
- Challenge handling
- Time management
- Rating-based behavior
Position → Move Generation → Search Tree
↓
NNUE Evaluation ← Feature Extraction
↓
Alpha-Beta Pruning
↓
Best Move Selection
↓
UCI Output
on(cuda::gpu0) {
parallel for i in 0..batch_size {
features[i] = extract_halfka(&positions[i]);
scores[i] = forward(&net, &features[i]);
}
}
| Component | Size | Notes |
|---|---|---|
| Transposition Table | 256MB-32GB | Configurable |
| NNUE Weights | ~40MB | Quantized |
| Accumulator Stack | 2MB/thread | Per-thread |
| Move Stack | 256KB/thread | Per-thread |
| Metric | Target | Hardware |
|---|---|---|
| Search NPS | 50M+ | RTX 4090 |
| NNUE Eval | 1M/sec | RTX 4090 |
| Perft(6) | <1 sec | Single core |
See Mind.toml for configuration:
- Release optimizations (LTO, codegen-units=1)
- Target-specific builds (CUDA, CPU, legacy)
- Feature flags (syzygy, lichess)