Papers
Topics
Authors
Recent
Search
2000 character limit reached

Hex: Connection Game & Mathematical Theory

Updated 5 July 2026
  • Hex is a two-player, perfect-information connection game played on an n×n board where each player aims to connect opposite board sides.
  • The game is underpinned by the Hex Theorem, which ensures a unique winner by leveraging principles from graph theory, planar topology, and fixed-point theory.
  • Hex presents significant computational challenges due to its high branching factor, driving advancements in AI, combinatorial game theory, and machine learning strategies.

Hex is a two-player, perfect-information connection game played on a rhombus tiled by hexagonal cells. On an n×nn\times n board, the players alternately color empty cells; one player aims to connect the top and bottom sides, while the other aims to connect the left and right sides. A fully colored Hex position has exactly one winner, so draws are impossible, and the game has become a standard meeting point for graph theory, planar topology, fixed-point theory, combinatorial game theory, and computational game playing (Yang, 18 Jul 2025).

1. Rules, board structure, and formal model

A standard Hex board is an n×nn\times n rhombus of hexagonal cells. The literature commonly names the players Red and Blue, or Black and White. Red aims to connect the top and bottom sides by a continuous chain of Red cells; Blue aims to connect the left and right sides by a continuous chain of Blue cells. An 11×1111\times 11 board is widely used and is described as “ultra-weakly solved” in the sense that the first player has a winning strategy by a strategy-stealing argument (Yang, 18 Jul 2025).

A graph-theoretic formulation encodes the board as a cell adjacency graph G=(V,E)G=(V,E), where VV is the set of cells and two distinct cells u,vVu,v\in V are adjacent when they share a side. If SRVS_R\subset V denotes the set of cells touching Red’s two designated boundary sides and SBVS_B\subset V the analogous set for Blue, then a Red win is the existence of a path in GG whose vertices are Red-colored cells and whose endpoints lie in the two components of SRS_R; Blue is defined analogously with respect to n×nn\times n0 (Yang, 18 Jul 2025).

This formulation makes Hex a connection game rather than a capture game. The relevant invariant is global connectivity, not local material balance. In computational terms, this matters because solving arbitrary Hex positions is PSPACE-complete, and the large branching factor on standard boards makes exhaustive search difficult (Young et al., 2016).

2. The Hex Theorem and the impossibility of draws

The central structural fact is the Hex Theorem: on any completely filled n×nn\times n1 Hex board, exactly one player has a continuous path connecting their two opposite sides. In the notation of one standard statement, if every tile is marked either with n×nn\times n2 or n×nn\times n3, then either there exists an n×nn\times n4-path connecting sides n×nn\times n5 and n×nn\times n6 or an n×nn\times n7-path connecting sides n×nn\times n8 and n×nn\times n9. An equivalent restatement on the integer-grid model 11×1111\times 110 says that if 11×1111\times 111 is divided into two sets 11×1111\times 112 and 11×1111\times 113, then either 11×1111\times 114 contains a connected path joining the 11×1111\times 115 and 11×1111\times 116 edges, or 11×1111\times 117 contains a connected path joining the 11×1111\times 118 and 11×1111\times 119 edges (Yang, 18 Jul 2025).

The geometric intuition uses the interface between opposite colors. Whenever adjacent cells have different colors, one draws a boundary segment between them. These segments form paths that cannot terminate in the interior and must end at the board’s corners. Because the two target connections are “orthogonal,” simultaneous completion would require a crossing, but Hex forbids crossing because a cell cannot be colored by both players. The interface therefore separates the board into regions in a way that forces exactly one winning chain (Yang, 18 Jul 2025).

A concise graph-theoretic proof uses a decomposition lemma for graphs of maximum degree two: every finite graph with all degrees at most two is a disjoint union of isolated vertices, simple cycles, and simple paths. Applied to Hex, one constructs a subgraph G=(V,E)G=(V,E)0 consisting of edges lying on interfaces between oppositely colored adjacent tiles, then adds four auxiliary degree-G=(V,E)G=(V,E)1 vertices G=(V,E)G=(V,E)2 at the corners. Since each G=(V,E)G=(V,E)3 has degree G=(V,E)G=(V,E)4, these vertices must be endpoints of simple paths in G=(V,E)G=(V,E)5, and the resulting boundary paths certify that one color connects its designated sides. This proves the no-draw property and excludes simultaneous wins (Yang, 18 Jul 2025).

3. Topological formulations, shape independence, and fixed-point equivalence

Hex admits a more general topological formulation on any finite triangulation of a disk whose boundary is partitioned into four arcs in cyclic order. In that setting, either there is a red chain meeting the two red arcs or a blue chain meeting the two blue arcs, and the two events cannot occur simultaneously. The proof can be organized through a no-retraction argument for the disk and a nonplanarity argument based on G=(V,E)G=(V,E)6, so the conclusion depends only on planarity, connectivity, and the disk topology, not on the literal geometry of a rhombus of hexagons (Prytuła, 2021).

The same topological framework yields an equivalence between Hex and the game of Y. A doubled-and-folded copy of a Y-board produces a Hex-board, and a standard extension trick converts Hex to Y. In this sense, the Hex Theorem and the Y Theorem are equivalent in the generalized triangulated-disk setting (Prytuła, 2021).

A deeper equivalence links Hex to Brouwer’s Fixed Point Theorem. One direction discretizes a continuous map G=(V,E)G=(V,E)7 on a sufficiently fine G=(V,E)G=(V,E)8 grid and partitions the grid into sets

G=(V,E)G=(V,E)9

according to whether the first or second coordinate of VV0 exceeds a chosen VV1 in the positive or negative direction. Boundary constraints show that VV2 cannot reach VV3, VV4 cannot reach VV5, VV6 cannot reach VV7, and VV8 cannot reach VV9. By the Hex Theorem, u,vVu,v\in V0 cannot cover the whole board, so there is an uncovered grid point u,vVu,v\in V1 satisfying u,vVu,v\in V2; taking u,vVu,v\in V3 yields a fixed point. The converse direction assumes a filled Hex partition with neither an u,vVu,v\in V4-connection nor a u,vVu,v\in V5-connection, defines a discrete map by unit displacements u,vVu,v\in V6 or u,vVu,v\in V7, extends it piecewise-linearly to a continuous map u,vVu,v\in V8 on a triangulation of u,vVu,v\in V9, and derives a contradiction to Brouwer by showing that SRVS_R\subset V0 has no fixed point (Yang, 18 Jul 2025).

The paper reviewing these arguments also recalls Sperner’s Lemma in the standard simplex formulation and uses it to derive Brouwer’s theorem on SRVS_R\subset V1 through a labeling

SRVS_R\subset V2

This discrete-to-continuous bridge places Hex in the same formal lineage as Sperner labeling and fixed-point existence (Yang, 18 Jul 2025).

4. Winning strategies, computational complexity, and machine play

John Nash’s classical strategy-stealing argument shows that the first player has a winning strategy. The argument assumes, for contradiction, that the second player has a winning strategy; the first player makes an arbitrary opening move and then “pretends to be the second player.” If the supposed strategy ever prescribes the already occupied opening cell, the first player simply uses another move, relying on the fact that the “extra piece cannot hurt.” Combined with the no-draw property, this proves existence of a first-player winning strategy, but it is non-constructive and does not produce an explicit move-by-move solution (Yang, 18 Jul 2025).

From the viewpoint of complexity theory and computer game playing, Hex is difficult because rewards are terminal, action spaces are large, and global connectivity is hard to evaluate locally. On a standard SRVS_R\subset V3 board, the average number of legal moves is reported as about SRVS_R\subset V4, compared to SRVS_R\subset V5 for chess, and Reisch proved PSPACE-completeness for SRVS_R\subset V6 Hex (Banerjee, 2020).

Classical top-performing Hex programs relied heavily on search. MoHex, described as the current ICGA Olympiad champion in the NeuroHex study, combines Monte Carlo tree search with theorem-based pruning and early win detection (Young et al., 2016). A contrasting line of work trains neural policies or value estimators directly. “NeuroHex: A Deep Q-learning Hex Agent” used an SRVS_R\subset V7-layer CNN on the SRVS_R\subset V8 board with supervised initialization followed by self-play Deep Q-learning, no search at inference time, and reported win-rates of SRVS_R\subset V9 as first player and SBVS_B\subset V0 as second player against a SBVS_B\subset V1-second-per-move version of MoHex after roughly two weeks of training (Young et al., 2016). A later “neurodynamic programming” study on SBVS_B\subset V2 Hex compared CNN and RNN value architectures and found the CNN-PBE agent strongest in head-to-head tournaments, with SBVS_B\subset V3 total wins across two seasons (Banerjee, 2020).

5. Combinatorial game theory and 3-terminal regions

Modern mathematical analysis of Hex treats local subpositions as combinatorial games over structured outcome posets. For monotone set-coloring games such as Hex, a central distinction is between monotone games, in which all moves available to both players are good, and passable games, in which permitting pass moves would not help either player. The framework developed for Hex shows that every passable short game is equivalent to a monotone game, and Hex positions fit naturally into this setting (Selinger, 2021).

A particularly important local object is the 3-terminal region: a region completely surrounded by black and white stones such that the black boundary stones form SBVS_B\subset V4 connected components. The associated outcome poset is

SBVS_B\subset V5

where SBVS_B\subset V6 means no black terminals are connected, SBVS_B\subset V7 mean exactly one pair is connected, and SBVS_B\subset V8 means all three black terminals are connected (Demer et al., 11 Jul 2025).

The structural theorem underpinning this analysis states that Hex is the universal planar Shannon game of degree SBVS_B\subset V9. Every GG0-planar Shannon game is isomorphic to a Hex position, and conversely every Hex position is isomorphic to a GG1-planar Shannon game. This yields a decomposition principle: every Hex position can be analyzed in terms of 3-terminal regions (Demer et al., 11 Jul 2025).

The same work proves that there are infinitely many distinct Hex-realizable values for 3-terminal regions. The basic infinite family is the sequence of superswitches defined by

GG2

These values are pairwise inequivalent, passable, and Hex-realizable. The paper also develops related simpleswitch and tripleswitch constructions, proves cofinality properties, and introduces a database of over GG3 million Hex-realizable 3-terminal values, together with GG4 “primary” positions used as compact generators (Demer et al., 11 Jul 2025).

These local-value tools are applied to automated verification of connects-both templates and pivoting templates, to a new handicap strategy for GG5 Hex, and to the construction of witnesses showing that certain probes are uniquely winning. In particular, they are used to disprove a conjecture of Henderson and Hayward about the ziggurat template by showing that every probe into that template is non-inferior (Demer et al., 11 Jul 2025).

6. Infinite Hex and generalized winning conditions

An infinite version of Hex was introduced by Hamkins and Leonessi on a fixed regular hexagonal tiling of the plane. A position is a coloring GG6, where black tiles are the relevant occupied cells and white tiles are treated as vacant for the purpose of Black’s objective. The winning condition is no longer a finite side-to-side connection; instead, Black must build a two-way infinite black path whose two tails eventually remain in opposite quarter-planes GG7 and GG8 for every GG9 (Törmä, 2023).

The corresponding winning set

SRS_R0

has been shown to be arithmetic. More precisely, it lies in lightface SRS_R1 and is SRS_R2-hard. Since arithmetic sets are Borel, this settles the question of whether the infinite winning condition is Borel (Törmä, 2023).

This has immediate determinacy consequences. By Borel determinacy, every initial position of Infinite Hex is determined in the sense that either one player has a winning strategy or both players have drawing strategies. This differs sharply from finite Hex, where there are no draws on a full board. Hamkins and Leonessi had already shown that perfect play from the empty position in Infinite Hex yields a draw, so the infinite game changes the strategic landscape even though it preserves the connection-game character of finite Hex (Törmä, 2023).

Across these finite, local, topological, and infinite formulations, Hex functions as a mathematically dense model of planar connectivity. Its no-draw theorem is simultaneously a graph theorem, a separation theorem, and a fixed-point analogue; its local regions support a nontrivial combinatorial game theory; and its infinite variant reaches into descriptive set theory (Yang, 18 Jul 2025).

Definition Search Book Streamline Icon: https://streamlinehq.com
References (7)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to HEX.