Connection Games Codexery

Hex (board game)

Abstract connection game invented by Piet Hein and popularized by John Nash.

Hex (board game)

Szczepan1990 18:30, 22 July 2006 (UTC) · Public domain

Hex is a two-player abstract strategy game played on a rhombus-shaped board made up of hexagonal cells. Each player tries to connect two opposite sides of the board. The game was created by Danish mathematician and poet Piet Hein in 1942, and later independently rediscovered by mathematician John Nash, who helped popularize it. The standard board size is 11×11, though 13×13 and 14×14 boards are also used. The game can also be played on hexagonally ruled graph paper with a pencil.

Players take turns placing a stone of their color on any empty hex. Once placed, stones stay on the board for the rest of the game. The goal is to form a continuous chain of your own stones linking your two assigned sides. The first player to do so wins. Because of the board’s topology, a draw is impossible—one player will always succeed in connecting their sides.

Despite the straightforward rules, Hex involves deep strategy and sharp tactics. Its mathematical foundations connect to the Brouwer fixed-point theorem, matroids, and graph connectivity.

Hex is a finite, perfect-information game and belongs to the category of connection games. It is a partisan connection game, not strictly a Maker-Breaker game, though it shares some positional game elements. Since draws cannot occur, Hex is also a determined game. It is a special case of the node version of the Shannon switching game.

To offset the first player’s advantage, the swap rule (or pie rule) is commonly used: after the first move, the second player may choose to switch sides with the first player. In practice, most games end with a resignation when the outcome becomes clear.

**History**

Piet Hein invented Hex in 1942 and introduced it at the Niels Bohr Institute. He later renamed it Con-tac-tix, but it became known in Denmark as Polygon after his article in the December 26, 1942 edition of the newspaper *Politiken*, which was the first published description of the game.

John Nash rediscovered the game around 1948 or 1949 at Princeton University. According to Martin Gardner, who featured Hex in his July 1957 Mathematical Games column, Nash’s fellow players called it either Nash or John—the latter because it could be played on hexagonal bathroom tiles. Nash claimed he invented the game independently, but there is doubt: Danish players, including Aage Bohr, played Hex at Princeton in the 1940s, so Nash may have subconsciousl

inventor
Piet Hein (1942)
rediscovered_by
John Nash (1948 or 1949)
board_size
Traditionally 11×11; also 13×13 and 14×14
game_type
Finite, two-player perfect information abstract strategy game; a partisan connection game
key_property
Draws are impossible; first player has a theoretical winning strategy
complexity
PSPACE-complete (proved 1981)
notable_implementation
Shannon's analog Hex machine (c. 1950)

Lore & Background

The game was invented by Danish mathematician Piet Hein in 1942 at the Niels Bohr Institute. Hein first published it under the name Polygon in the Danish newspaper Politiken on 26 December 1942. The game was later rediscovered at Princeton University by mathematician John Nash in 1948 or 1949. Nash's fellow players called the game either Nash or John, the latter referring to the fact that it could be played on hexagonal bathroom tiles. There is dispute over whether Nash discovered the game independently; Hein expressed doubt, and Martin Gardner privately wrote to Hein that a 'flash of a suggestion' from

Reader's Guide

Hex holds significance as a classic connection game that bridges recreational play and advanced mathematics. Its rule that draws are impossible—known to Hein from the start—makes it a determined game, and the first player has a theoretical winning strategy, though explicit strategies have only been found for small boards. The game's complexity was formally established in 1981 when it was proven PSPACE-complete. Hex also inspired early artificial intelligence research: Claude Shannon and E. F. Moore built an analog Hex-playing machine around 1950 using a resistance network, and later computer programs used Monte Carlo tree search methods. In 2019, the program Mootwo, based on the open-source Polygames project using zero-learning and convolutional neural networks, defeated a top human player on a 19×19 board. The game remains a subject of study in combinatorial game theory and a benchmark for AI development.

Did You Know?

Origins and the Nash Controversy

The story of Hex begins in 1942 at the Niels Bohr Institute, where Danish mathematician and poet Piet Hein conceived the game. He first published a description in the Danish newspaper Politiken on December 26 of that year under the name Polygon, distributing it as 50-sheet pads of empty 11×11 boards for pencil-and-pen play. Hein later rebranded it as Con-tac-tix, though Polygon had already taken hold in Denmark. The game's wider fame is tangled in a dispute. In 1948 or 1949, John Nash at Princeton began teaching what he called an independent discovery. His fellow players nicknamed it 'Nash' or simply 'John,' the latter a nod to sketching it on hexagonal bathroom tiles. Nash maintained he had invented it alone, yet Danish visitors—including Aage Bohr—had been playing the game at Princeton during the 1940s, suggesting the idea may have reached him secondhand. When Martin Gardner featured Hex in his 1957 Mathematical Games column, Hein wrote questioning Nash's claim. Gardner publicly gave Nash the benefit of the doubt but privately told Hein he believed a 'flash of a suggestion' had come from a Danish source that Nash later forgot. Parker Brothers marketed the game as 'Hex' in 1952, and that name stuck.

Rules and the No-Draw Guarantee

Hex is a two-player abstract strategy game played on a rhombus-shaped grid of hexagonal cells, most commonly 11×11, though 13×13 and 19×19 boards are also popular. The game can be played with physical stones or simply with pencil on hexagonally ruled paper. Each player is assigned a color—conventionally red and blue, or black and white—and a pair of opposite board edges. The four corner hexagons belong to both adjacent edges. Play proceeds in alternating turns: each player places one stone of their color on any empty cell. Once placed, a stone is never moved, replaced, or removed. The objective is straightforward—build an unbroken chain of adjacent stones linking your two assigned edges. The first player to complete such a connection wins. A defining feature of Hex is that draws are topologically impossible; the board's geometry guarantees that exactly one player can complete a connection. To offset the first player's inherent advantage, the swap rule, also called the pie rule, is standard: after the first move, the second player may choose to exchange positions. In practice, most games end not with a final stone but with the losing player resigning once the outcome is clear to both sides.

Mathematical Foundations and Theoretical Results

Despite its deceptively simple rules, Hex sits atop a rich structure of mathematical theory. The game is a finite, perfect-information, two-player determined game belonging to the family of connection games. More specifically, it is a Maker-Breaker positional game and a special case of the node version of the Shannon switching game. Its impossibility of draws is rooted in the Brouwer fixed-point theorem, and its strategic structure connects to matroid theory and graph connectivity. Piet Hein himself recognized in 1942 that the first player holds a theoretical advantage and that exactly one player can connect their sides. In 1952, John Nash formalized this with an existence proof showing that on symmetrical boards the first player possesses a winning strategy. However, in 1964, mathematician Alfred Lehman demonstrated that Hex cannot be represented as a binary matroid, meaning the clean, determinate winning strategies available for the Shannon switching game on a regular rectangular grid do not carry over. This result underscored that Hex's strategic depth resists simple algebraic reduction, keeping the game a fertile ground for ongoing research into combinatorial game theory and topological arguments.

From Shannon's Machine to Modern Publishing

Hex's influence extended early into the realm of computing. Around 1950, Claude Shannon and E. F. Moore built an analog machine that played the game using a resistance network: resistors represented the edges of the hexagonal grid, and light bulbs served as the vertices. A legal move corresponded to identifying a particular saddle point in the circuit. The machine played a reasonably strong game, and later researchers developing computer Hex algorithms emulated Shannon's network topology to create competitive players. On the commercial side, the game's publication history is varied. After Hein's original 50-sheet pads in Politiken, Parker Brothers released a boxed version under the name 'Hex' in 1952, cementing that title. They also issued a 'Con-tac-tix' edition in 1968. In 1974, 3M included Hex in its Paper Games Series, offering a compact 5½-by-8½-inch pad of fifty ruled grids. Today, Nestorgames publishes the game in three board sizes—11×11, 14×14, and 19×19—keeping the classic connection game accessible to both casual players and competitive enthusiasts.

Gallery

Frequently Asked Questions

What is Hex and who created it?

Hex is a two-player abstract strategy game in which each player drops stones onto a rhombus-shaped hexagonal grid, aiming to form an unbroken path between their two opposite edges. It was first devised by Danish mathematician and poet Piet Hein in 1942 and later independently reinvented by John Nash, who went on to help spread its popularity.

Can a game of Hex end in a draw?

No — the topological structure of the board guarantees that one player must always complete a connecting chain, so a tie is mathematically impossible. This also means the first player holds a theoretical winning strategy, though no one has yet fully solved the game.

What board sizes are used in Hex?

The traditional playing field is an 11×11 rhombus of hexagonal cells, though 13×13 and 14×14 boards are also popular for longer, more intricate matches. The game can even be played casually on hexagonally ruled paper with just a pencil.

How computationally hard is Hex?

Hex was proven to be PSPACE-complete in 1981, placing it among the most difficult problems known to computer science. This implies that determining an optimal strategy for even modest board sizes is intractable with current computational methods.

What makes Hex a partisan connection game?

The two players have asymmetric objectives — each must link a different pair of opposite sides — which classifies Hex as partisan rather than impartial. Despite that asymmetry, the game remains one of perfect information with no hidden elements or randomness involved.

More in Connection games 1-24

Spotted an error? Know more?

This is a living reference — every entry is fact-audited, and reader corrections feed straight into our audit queue. Suggest an edit · See this site's audit record

Comments

Loading…
Open in the interactive codex →