How pgg106/alexandria works
Alexandria is a UCI chess engine. A chess GUI or other UCI client sends commands; the engine parses positions and search limits, searches legal continuations, evaluates positions, and reports a best move and analysis. The runtime also supports move-generation/perft work and a neural-network evaluator; the README documents UCI compatibility and an externally downloaded network. The graph follows relationships visible in the README and source index; unsampled implementation details are not inferred.
Main entry points: search.cpp Position search · uci.cpp UCI command loop · position.cpp Board position · movegen.cpp Legal move generation
Components 19
UCI interface
- UCI command loop
src/uci.cpp - Engine I/O
src/io.cpp
Chess state and moves
- Board position
src/position.cpp - Legal move generation
src/movegen.cpp - Move application
src/makemove.cpp - Attack tables
src/attack.cpp - Perft
src/perft.cpp
Search and evaluation
- Position search
src/search.cpp - Move ordering
src/movepicker.cpp - Search heuristics
src/history.cpp - Transposition table
src/ttable.cpp - Time management
src/time_manager.cpp - Classical evaluation
src/eval.h - NNUE evaluation
src/nnue.cpp
Engine runtime
- Program entry
src/main.cpp - Search threads
src/threads.h - Engine initialization
src/init.cpp
Other components
- UCI client
- Neural network file
Connections 31
- UCI client → UCI command loop: sends UCI commands
README.md - Program entry → Engine initialization: initializes
src/main.cpp - Program entry → UCI command loop: starts loop
src/main.cpp - UCI command loop → Board position: parses positions
src/uci.cpp - UCI command loop → Position search: starts search
src/uci.cpp - UCI command loop → Time management: sets search limits
src/uci.cpp - UCI command loop → Transposition table: configures hash
src/uci.cpp - UCI command loop → Legal move generation: uses for commands
src/uci.cpp - UCI command loop → Engine I/O: uses output
src/uci.cpp - Engine I/O → UCI client: reports results
- Board position → Move application: parses move sequences
src/position.cpp - Board position → Attack tables: updates check state
src/position.cpp - Legal move generation → Attack tables: queries attacks
src/movegen.cpp - Legal move generation → Board position: reads board state
src/movegen.cpp - Legal move generation → Move application: tests moves
src/movegen.cpp - Position search → Board position: searches position
src/search.cpp - Position search → Legal move generation: generates moves
src/search.cpp - Position search → Move ordering: orders moves
src/search.cpp - Position search → Search heuristics: uses heuristics
src/search.cpp - Position search → Transposition table: probes and stores
src/search.cpp - Position search → Time management: checks limits
src/search.cpp - Position search → Classical evaluation: evaluates positions
src/search.cpp - Position search → Search threads: uses thread data
src/search.cpp - Classical evaluation → Board position: reads position
src/eval.h - Board position → NNUE evaluation: maintains accumulators
- NNUE evaluation → Board position: evaluates features
src/nnue.cpp - NNUE evaluation → Neural network file: loads network data
README.md - UCI command loop → Perft: dispatches perft
src/uci.cpp - Engine initialization → Board position: initializes chess state
src/init.cpp - Engine initialization → Transposition table: initializes table
src/init.cpp - Engine initialization → Search threads: initializes threads
src/init.cpp