How to Play Hex — Bridges, Templates, and the Pie Rule

How to Play Hex — Bridges, Templates, and the Pie Rule

Hex was independently invented twice: by Piet Hein in 1942 (sold in Denmark as Polygon) and by John Nash in the late 1940s, while he was a graduate student at Princeton. Nash showed that the first player always wins with perfect play, but no one knows the winning strategy on full-size boards. Here’s how to play Hex and how to think about it.

The rules

Two players (Red and Blue) take turns placing stones on a rhombus-shaped hex grid. The objective: connect your two sides with an unbroken chain of your stones. Red connects top to bottom; Blue connects left to right.

There are no captures and no draws: once the board is full, exactly one player has a connecting chain. Nash’s strategy-stealing argument shows the first player can always win on any board size, IF they know the right strategy. Explicit winning strategies are only known for small boards.

Strategy 1: Bridges

A ‘bridge’ is two of your stones that are not touching but share two empty neighboring cells. That pattern GUARANTEES connection regardless of your opponent: if they fill one of the two cells, you fill the other to connect.

Recognize bridges: the two stones sit with a gap between them that is filled by two empty cells side by side, each touching both stones. Bridges are the fundamental positional element of Hex, and they let you cover ground twice as fast as placing stones side by side.

Strategy 2: Edges and templates

Templates are known patterns that guarantee a connection between one of your stones and your edge, as long as a specific area of cells stays empty. A stone on the second row connects to the edge with a simple bridge to the edge.

Learn the third-row template next (often called the ziggurat): a stone three rows from your edge, with a particular trapezoid of empty cells below it, always reaches the edge regardless of your opponent’s moves. Fourth-row templates exist too, but they need a much larger empty area.

Strategy 3: Chain bridges and understand ladders

Multiple bridges chained together form a guaranteed connection across the board. Building a chain of bridges from edge to edge is the macro-strategy of Hex.

A ‘ladder’ in Hex is something different: when a player is pushed along the second row near an edge, both sides keep placing stones in forced pairs, sliding along the edge. The defender’s goal is to make the ladder run toward an area where the attacker has no helpful stone waiting (an ‘escape’), so it fizzles out.

Strategy 4: The first move

Without any balancing rule, the center is the strongest opening move on any board size, which is why casual games between unequal players often start there.

On 11×11 (a common tournament size) or 13×13 played with the pie rule below, strong players instead open with moves that are neither clearly winning nor clearly losing, often near an edge or corner, so the opponent has a hard choice about whether to swap.

Strategy 5: The ‘pie rule’

Tournament Hex uses the ‘pie rule’ or ‘swap rule’ to balance the first-mover advantage. After Player 1 makes their move, Player 2 can either: take Player 1’s first move as their own (swap), or play normally.

This forces Player 1 to make a ‘fair’ opening — too strong an opening and Player 2 swaps; too weak and Player 1 loses.

Practice

Play our Hex on 7×7, 9×9, 11×11, or 13×13, either against the computer or with two players on one screen. The CPU is a simple opponent: it takes a winning cell when it sees one, blocks your immediate wins, and otherwise favors central cells next to its own stones. That makes it a good sandbox for practicing bridges and edge templates. The game doesn’t enforce the pie rule, so in two-player mode agree on a swap before you start.

Frequently asked questions

Can a game of Hex end in a draw?

No. Once every cell is filled, exactly one player has a connecting chain, so every game has a winner. In practice, games end well before the board fills.

What is a bridge in Hex?

A bridge is two of your stones that share two empty neighboring cells. If your opponent takes one of those cells, you take the other, so the two stones are effectively connected.

Why does Hex use the pie rule?

The first player has a proven winning advantage. The pie rule lets the second player take over the first move, so the first player has to choose an opening that is roughly balanced.

Want a break from connection puzzles? The Chrome Dino game needs one key and zero planning.

Related reading

🔌 Connect any AI assistant to dinogame.gg — we run an MCP server: https://dinogame.gg/mcp