A lightweight, keyboard-first GUI and CLI for analyzing Hex with the KataHex engine. Built with substantial AI assistance.
Most Hexata features are also available in the online version.
- Interactive board with optional move numbers and drag-to-move editing.
- Live engine analysis overlays (winrate/visits, priors, candidates, Elo view, PVs).
- Candidate filtering and batch analysis modes.
- Move list panel with undo/redo, navigation (HexWorld-style shortcuts), and eval graph (winrate or Elo).
- Native handling for pass and swap moves.
- Clipboard import/export to HexWorld and Hexata format, plus flexible move-text import.
- Adjustable board size, analysis noise, and multi-engine support.
- Fast, responsive feel with low engine and UI latency.
- Install deps:
pip install -r requirements.txt(pygame only). - Install KataHex separately (engine binary, config, and model weights): KataHex 20240812
- Edit
config.iniand set[engine.hex.<name>].cmdto point at your KataHex binary, config, and model.- Example format:
cmd = path/to/katahex gtp -config path/to/engine.cfg -model path/to/weights.bin.gz - To enable Y, add an
[engine.y.<name>]profile using a compiled engine and the Y weights.
- Example format:
- Run:
python3 main.py gui
?helpspacetoggle analysisp/n(or scroll) prev/next,f/lfirst/lastmmove numbers,ccoords,tpriors,eElo view- Right-click or drag to toggle candidates
Run python3 main.py cli --help for available commands. See the CLI output schema for JSON output.
A few implementation details were tricky to get right and are useful background for understanding the design:
- Three coordinate systems are in play: GUI board coordinates, engine play coordinates, and KataHex analyze tokens.
- Swap support was especially tricky. Subtree pruning around moves 1 and 2 means editing either move can make the other collide with later descendants, and those invalid descendants need to be removed without disturbing surviving sibling branches. The inverse problem also appears after transposition: a coordinate that looks duplicated can still be valid because swap moved the opening stone away.
- Drag-edit branch merging was another tricky case. If a dragged move lands on a sibling move that already exists, the two branches must merge recursively, and sibling order becomes the tie-breaker for which continuation stays preferred.
