Skip to content
hexanna1Public

About

Lightweight, keyboard-first GUI for analyzing Hex.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Hexata

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.

GUI example

Main features

  • 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.

Quick setup

  • Install deps: pip install -r requirements.txt (pygame only).
  • Install KataHex separately (engine binary, config, and model weights): KataHex 20240812
  • Edit config.ini and set [engine.hex.<name>].cmd to 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.
  • Run: python3 main.py gui

Quick controls

  • ? help
  • space toggle analysis
  • p/n (or scroll) prev/next, f/l first/last
  • m move numbers, c coords, t priors, e Elo view
  • Right-click or drag to toggle candidates

CLI

Run python3 main.py cli --help for available commands. See the CLI output schema for JSON output.

Notes on tricky parts

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.

About

Lightweight, keyboard-first GUI for analyzing Hex.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages