The World at PlayWorld Games · Ready to Play
Hex board and pieces

Modern Strategy Games

Hex

Create an unbroken path between your two sides of a board that can never end in a draw.

THE WORLD AT PLAY · PLATE NO.16 / 38

How You WinWin by joining your own two opposite edges with an unbroken chain of your stones: Blue connects top to bottom, Vermilion connects left to right. Hex has no draws — one side always connects before the board fills.

The Story

Where it came from, and why it turned out this way.

DesignPiet Hein · Denmark, 1942 · independently reinvented by John Nash, 1948

Invented twice

In 1942 the Danish poet and mathematician Piet Hein published the game as Polygon in the newspaper Politiken. Six years later, in 1948, John Nash at Princeton independently arrived at exactly the same game with no knowledge of Hein's version. Princeton students called it Nash, and also John, because it was so often played on the hexagonal tiles of the communal bathroom floor. Parker Brothers published it as Hex in 1952, and that name stuck.

It cannot be drawn, and that is a theorem

Hex's most beautiful property is that when the board is full, exactly one player is connected. This is not stipulated by the rules; it is provable, because two paths running in opposite directions cannot avoid crossing on a plane. The statement is known as the Hex theorem, and it has been shown to be equivalent to Brouwer's fixed point theorem in topology. A game whose win condition is equivalent to a fixed point theorem is genuinely unique in the history of games.

Nash proved the first player wins, and nobody knows how

Nash's strategy-stealing argument produces an almost magical result. Suppose the second player had a winning strategy. Then the first player could place a stone anywhere and simply follow that strategy — an extra stone can never hurt you in Hex — so the first player would also win, a contradiction. Therefore the first player wins. But the argument constructs nothing: it proves the win exists without indicating a single move. Winning play on boards of ordinary size remains unknown today.

The swap rule patches a theorem

Since the first player theoretically wins, Hex needs compensation, and its solution is elegantly minimal: the second player may swap, taking over the stone just played along with its color. That leaves the opener afraid to play too strong a first move — play it too well and it gets taken; play it too poorly and you are simply worse. One rule converts a proven win into a problem of judging your own strength precisely. This pie rule has since been borrowed by a great many modern abstracts.

  • Piet Hein also devised the superellipse and wrote the aphoristic poems he called grooks; Hex was only one of his many occupations.
  • In Hex, attack and defense are literally the same act: the only way to cut your opponent off is to connect first, which is why purely defensive moves are almost always bad.
  • The bridge is Hex's basic vocabulary: two stones of one color sharing two empty neighbors, where taking one lets you fill the other, so they already count as connected.

Complete Rules

Start with what a turn allows and how the game is won.

Board
7 / 9 / 11 rhombus (9 by default)
Blue
Moves first, connects top and bottom
Vermilion
Moves second, connects left and right
  1. Winning conditionBlue must build a path of mutually adjacent blue stones from the top row to the bottom row, and Vermilion a path from the leftmost column to the rightmost. The first player to connect wins immediately, and the path need not be straight or shortest.
  2. How a turn worksplayers alternate placing one stone on any empty hex. Stones never move, flip, or get captured, and victory is checked after every placement. As long as any empty hex remains you must play — passing is not allowed.
  3. Each hex has six neighbors: left, right, upper-left, upper-right, lower-left, and lower-right. Because rows are offset by half a cell, the hexes directly above and below on screen are not adjacent. In coordinates, the neighbors of (row, col) are (row, col−1), (row, col+1), (row−1, col), (row−1, col+1), (row+1, col−1), and (row+1, col).
  4. The swap rule may be used exactly once, after the first stone is placed and before the second player has played: the user takes over the stone on the board along with its color and connection direction, and the opponent switches to the other color and plays immediately. The stone stays exactly where it is, neither moved nor mirrored. The rule exists to neutralize the first-move advantage — the opening player dares not play too strong a first move, or it will simply be taken over.
  5. Hex has no draws. The four corner hexes belong to two edges at once, and whoever occupies one uses it for their own direction.
  6. Board size can be switched between 7, 9, and 11 in the settings, and switching starts a new game immediately. The larger the board, the more the first-move advantage depends on the swap rule to balance it.

Your First Game

Use this order of thought to get through a complete game quickly.

  1. Start by confirming your color and target edges: Blue connects top and bottom, Vermilion left and right, and colored strips around the board show which is which. The most common beginner error is focusing on blocking and forgetting that the same move should also advance your own path — in Hex those two goals were always supposed to be one move.
  2. The bridge is the most important connection shape: two stones of the same color with two shared empty neighbors between them. If your opponent takes one, you take the other, so they already count as connected. In coordinates, (row, col) forms a vertical bridge (used by Blue) with (row−2, col+1) and (row+2, col−1), and a horizontal bridge (used by Vermilion) with (row−1, col+2) and (row+1, col−2).
  3. Building with bridges covers ground twice as fast as placing stones adjacently, with identical safety: every time your opponent attacks a bridge you fill the other foot, and the chain never breaks. Learning to see bridges is the dividing line between a complete novice and a beginner who understands the game.
  4. Edge templates save you a move: a blue stone on the second row is already safely connected to the top edge as long as both hexes toward it, (row−1, col) and (row−1, col+1), are still empty — no extra move required. Near the bottom the corresponding hexes are (row+1, col−1) and (row+1, col). Vermilion reads the same thing with rows and columns swapped.
  5. The opening move is usually near the center, and the second player must decide whether to swap: take over a strong central first move, but play your own stone if the opener chose a corner or an edge. The test is simple — if you would have wanted to play there yourself, swap.
  6. Before every move, compare distances: count how many moves you still need to connect and how many your opponent needs. If you are ahead, keep reinforcing the thinnest section of your own path; if you are behind, you must squeeze into the narrowest part of their path rather than quietly patching your own.

Practical Strategy

Move from knowing the rules to playing with a plan.

  • Think of the position as "how many moves away from connecting am I," and prefer moves that shorten your own distance while lengthening your opponent's. The AI on this site uses connection-distance-guided Monte Carlo tree search with exactly the same idea.
  • Do not force a block where your opponent is already thick — patch the thinnest part of your own route instead. This is the least intuitive and most important principle in Hex: the instant you connect, your opponent's path is cut automatically, so you never need to defend for its own sake.
  • Use bridges and virtual connections to cover more ground while keeping several repair points in reserve. A solid narrow chain cannot be broken, but it wastes moves and is easily bypassed from the side — wide and virtual beats narrow and solid.
  • When your opponent attacks a bridge, fill the other foot immediately rather than deferring. That attacking move usually gains them nothing, and after you respond you still hold the initiative — but if you go elsewhere instead, the bridge really does break.
  • Central hexes are valuable to both players because they shorten paths in both directions at once. Contest the center in the opening and spread toward your own two edges in the middlegame; that is the most generally applicable move order.
  • Calculate precisely in the endgame. Because the win condition is whole-board connectivity, there is always a single critical hex late in the game. Finding the hex both players must have, and taking it first, usually ends the game on the spot.

Winning and Special Rules

Details that are easy to miss but can change the result.

  • The swap rule is available exactly once, and a swap-sides button appears on that turn. After it is used both players' colors and target edges are exchanged, the first stone stays in place, and the swapped player continues.
  • Two paths running in opposite directions cannot avoid crossing on a planar hex grid, which is the intuitive reason Hex must have a winner. When the board is full exactly one side is connected, so the rules need no draw clause at all.
  • The AI evaluates the swap as a candidate move like any other, so when it plays second it genuinely judges whether to take the swap rather than deciding at random.
  • Board sizes 7, 9, and 11 are switched in the settings, and any change starts a new game immediately; your saved difficulty setting is unaffected.

Common Mistakes

The traps new players fall into most often.

  • Judging adjacency with square-grid intuition and treating (row−1, col−1) or (row+1, col+1) as neighbors. They are not adjacent on a hex grid, and every connection you compute from that assumption will be wrong.
  • Placing every stone directly beside the previous one, producing a slow, narrow solid chain. The same number of moves covers twice the distance with bridges.
  • Thinking only about blocking, and laying down a string of stones that contribute nothing to your own connection. Purely defensive moves are almost always bad moves in Hex.
  • Panicking when a bridge is attacked and going elsewhere to reinforce, so the bridge actually breaks. A bridge's value rests entirely on the promise to fill the other foot when attacked — abandoning that means you never had the bridge.
  • Pushing forward without noticing that your chain is still one move short of the edge. Edge templates require actually counting the empty hexes, not assuming.

Play Hex against AI now

Play Now