How ciekce/stormphrax works
Core Engine Components
• UCI Interface (src/uci.*)
• Search Engine (src/search.*)
• Move Generation (src/movegen.*)
• Management (src/position/*)
• Evaluation System (src/eval/*)
NNUE Architecture (Critical Component)
• Input Layer (768x16)
• Hidden Layer (1280)
• Output Layer (1x8)
• Horizontal Mirroring
Attack Generation System
• BMI2 Implementation (src/attacks/bmi2/*)
• Black Magic Implementation (src/attacks/black_magic/*)
• Use conditional paths to show CPU-dependent selection
Supporting Systems
• Transposition Table (src/ttable.*)
• Syzygy Tablebase Integration (src/tb.*)
• Thread Management (indicated by Threads UCI option)
• Time Management (src/limit/*)
Layer the Components
Top: UCI Interface
Middle: Core Engine (search, position, moves)
Bottom: Supporting Systems (NNUE, tablebases, attack generation)
Data Flow
• Double lines: Critical paths
Technical Details
• CPU feature requirements (AVX2, BMI2, etc.)
• Memory management (Hash size)
• Threading model (Lazy SMP)
Time Management → Search Control
• Component types (Core, Supporting, External)
• Special symbols
Remember to include version information and CPU feature requirements as metadata, as these are critical for deployment decisions.
This design should be created using a professional diagramming tool that supports UML or similar notation, with careful attention to layout and spacing for clarity.