How maxolek/tomahawk works
Tomahawk is a standalone UCI chess engine. A GUI or other UCI client sends position, option, and search commands; the engine prepares the game position, searches legal continuations, evaluates positions, and returns a best move and search information. Its documented search techniques and NNUE evaluation are represented alongside the board, move-generation, and evaluation layers. The sampled excerpts show the engine’s search/evaluation dependencies, but not complete UCI dispatch or asset-loading implementations, so those internal links are omitted where uncertain.
Main entry points: engine.cpp Engine · searcher.cpp Iterative search · moveGenerator.cpp Move generation · UCI.cpp UCI protocol
Components 16
UCI interface
- UCI protocol
src/UCI.cpp
Game orchestration
- Engine
src/engine.cpp - Game state
src/gamestate.cpp
Position and moves
- Board state
src/board.cpp - Move generation
src/moveGenerator.cpp - Precomputed move data
src/PrecomputedMoveData.cpp - Sliding attacks
src/magics.cpp
Search and evaluation
- Iterative search
src/searcher.cpp - Classical evaluation
src/evaluator.cpp - NNUE inference
src/NNUE.cpp - Transposition table
include/tt.h - Opening book
src/book.cpp
Runtime resources
- NNUE weights
bin/nnue_wgts - Book files
bin/opening_books - Piece-square tables
bin/pst
Other components
- UCI client
Connections 19
- UCI client → UCI protocol: sends commands
- UCI protocol → Engine: dispatches commands
- Engine → Board state: sets position
- Engine → Game state: tracks game
- Engine → Move generation: generates legal moves
- Engine → Iterative search: starts search
- Engine → Opening book: uses opening book
- Iterative search → Board state: searches position
- Iterative search → Move generation: generates moves
- Iterative search → Classical evaluation: evaluates position
- Iterative search → NNUE inference: updates accumulator
- Iterative search → Transposition table: probes and stores
- Board state → Sliding attacks: queries attacks
- Move generation → Precomputed move data: uses lookup data
- Move generation → Sliding attacks: queries attacks
- UCI protocol → UCI client: returns best move
- NNUE weights → NNUE inference: network parameters
- Book files → Opening book: book data
- Piece-square tables → Classical evaluation: table data