HexN≥brsm.dev

About

HexN is a Catan AI built to beat the best human players.

Catan is a hard problem for traditional game AI. It’s a stochastic, imperfect-information game for two to four players with dice, hidden cards, and trading. With more than two players, methods built for two-player zero-sum games are limited; an equilibrium strategy no longer guarantees a result, the other players can team up on the leader, and the best move depends on how the others will play.

Architecture

HexN is a sub-0.5M heterogeneous GNN that reads the board as a graph of hexes and vertices, with roads as links between vertices and a token for each seat. Its value head returns one win probability per seat instead of a single zero-sum score. Its input is the public game state and the seat’s hidden cards.

Training

Networks are trained by self-play reinforcement learning (PPO), by expert iteration, and in leagues where several learners share tables. Training games have no player trades; instead, a separate trade gate integrated with the value network decides trades at play time.

Search

Deep search is a standard approach in game AI. In Catan, search is drastically limited by the size of the action space, the stochastic nature of play, and random dice. HexN relies only minimally on search in play and not at all in training.

Traditional Bots

HexN’s networks measure against two coded bots; Rehex is a classic rules-based reflex agent with no look-ahead and Heximax is an expectimax-n search bot.

Team

Brian (brsm.dev, GitHub) created and directs the project. Brian is an ML hobbyist whose projects range from Cite Unseen, a plagiarism detector adapted from protein sequence alignment, to QNN, a transformer bot that plays Quake Rocket Arena. Brian leads an applied-AI consulting practice in Boston and holds a master’s degree in mathematics and computation.

Claude and Codex write the code, run the experiments, and file the results. Claude also maintains Great Hexpectations, the project’s weekly research journal.