How lynx-chess/lynx works
Lynx is a hand-crafted-evaluation chess engine. Its main workflow accepts UCI commands, updates a game position, searches for a move, and reports engine output; the README identifies UCI-compatible GUIs as the interface for the executable. The graph also preserves position parsing, move generation, evaluation, transposition storage, and optional online tablebase probing. Connections are limited to relationships supported by the README or SOURCE INDEX references; several internals were not sampled, so uncertain links are omitted.
Main entry points: Game.cs Game state · NegaMax.cs NegaMax search · Engine.cs Engine · MoveGenerator.cs Move generator
Components 19
UCI interface
- UCI handler
src/Lynx/UCIHandler.cs - UCI commands
src/Lynx/UCI/Commands/GUI/GoCommand.cs - CLI runner
src/Lynx.Cli/Runner.cs
Chess state
- Game state
src/Lynx/Model/Game.cs - Position
src/Lynx/Model/Position.cs - FEN parser
src/Lynx/FENParser.cs - Move encoding
src/Lynx/Model/Move.cs - Move generator
src/Lynx/MoveGenerator.cs
Search and evaluation
- Engine
src/Lynx/Engine.cs - Search orchestration
src/Lynx/Searcher.cs - NegaMax search
src/Lynx/Search/NegaMax.cs - Hand-crafted evaluation
src/Lynx/Evaluation.cs - Transposition table
src/Lynx/Model/TranspositionTable.cs
Engine support
- Attack tables
src/Lynx/Attacks.cs - Attack generation
src/Lynx/AttackGenerator.cs - Configuration
src/Lynx/Configuration.cs - Online tablebase
src/Lynx/OnlineTablebaseProber.cs - Viriformat data
src/Lynx/Datagen/ViriformatLoader.cs
Other components
- Chess GUI
Connections 21
- Chess GUI → UCI handler: sends UCI
README.md - CLI runner → UCI handler: runs handler
src/Lynx.Cli/Runner.cs - UCI handler → UCI commands: routes commands
src/Lynx/UCIHandler.cs - UCI commands → Engine: requests search
src/Lynx/Engine.cs - Engine → Search orchestration: delegates search
src/Lynx/Engine.cs - Engine → Game state: owns game
src/Lynx/Engine.cs - Game state → FEN parser: parses position
src/Lynx/Model/Game.cs - Game state → Position: updates position
src/Lynx/Model/Game.cs - Game state → Move encoding: parses moves
src/Lynx/Model/Game.cs - Search orchestration → NegaMax search: dispatches search
- NegaMax search → Game state: searches position
src/Lynx/Search/NegaMax.cs - NegaMax search → Move generator: generates moves
src/Lynx/Search/NegaMax.cs - NegaMax search → Transposition table: probes table
src/Lynx/Search/NegaMax.cs - NegaMax search → Hand-crafted evaluation: evaluates positions
- Move generator → Position: reads position
src/Lynx/MoveGenerator.cs - Move generator → Move encoding: encodes moves
src/Lynx/MoveGenerator.cs - Attack generation → Attack tables: builds attacks
- Position → Attack tables: uses attacks
src/Lynx/Model/Position.cs - Engine → Online tablebase: probes positions
src/Lynx/Engine.cs - Configuration → Online tablebase: configures probing
- Viriformat data → Game state: loads games
src/Lynx/Datagen/ViriformatLoader.cs