Introduction¶
Overview¶
This document provides comprehensive documentation for the Kirin Chess Engine. Kirin is a chess engine written in C++ and an integral part of the Kirin autonomous chess system.
Kirin is the computational engine powering an autonomous chess system designed to deliver a complete single-player experience. By integrating intelligent move generation with a physical board capable of independent piece manipulation, the system eliminates the need for a human opponent while preserving the tactile satisfaction of over-the-board play.
Features¶
Bitboard Representation: Efficient 64-bit integer board representation for fast move generation and evaluation
Magic Bitboards: Pre-computed attack tables for sliding pieces (bishops and rooks) using magic number multiplication
Zobrist Hashing: Position hashing for transposition table lookups and repetition detection
Alpha-Beta Search: Negamax search with alpha-beta pruning and iterative deepening
UCI Protocol: Full Universal Chess Interface compatibility for GUI integration
Classical Evaluation: material, piece-square tables, pawn structure, mobility and phase-scaled king safety (Ch. Evaluation)
NNUE Evaluation: a trained network in the custom
.knnueformat, combined with the classical score by blend or residual policy (Ch. NNUE Evaluation)Search Techniques: principal variation search, null-move pruning, late move reductions, aspiration windows, static exchange evaluation, and — implemented but off by default — futility pruning, singular extensions, ProbCut, internal iterative deepening and continuation history (§The pruning and reduction surface)
Move Ordering: hash move, MVV-LVA, killer moves, SEE bucketing and the history heuristic
Time Management: managed clock budgeting with overhead compensation (Ch. Time Management)
Runtime Configurability: 26 UCI options, one per technique, so any feature can be A/B tested without a rebuild (Appendix UCI Option Reference)
Note
Every search technique above is individually switchable at runtime, and several ship disabled. That is a deliberate testing posture rather than an omission — a feature stays off until an SPRT run has demonstrated it earns its place (Ch. Measuring Strength).
System Requirements¶
Component |
Requirement |
|---|---|
Operating System |
Linux (primary development target) |
Memory |
Minimum 256 MB RAM |
Processor |
Any modern 64-bit CPU; ARM64 (Raspberry Pi 5) is a shipping target |
Compiler |
GCC or Clang with C++17 support |
Dependencies |
CMake 3.10+, POSIX headers ( |
Minimum system requirements