Puzzle Desk

Hex

Take turns placing stones on the hexagons. Build an unbroken chain between your two edges before the computer joins its own. One side always gets there, so there are no draws.

0:00time

Also try Gomoku → Also try Go →

How to play Hex

How to play

You play pink and move first; the computer plays blue. Take turns placing one stone on any empty hexagon, and stones never move. You win with an unbroken chain of pink stones from the dotted top-left edge to the dotted bottom-right edge. The computer needs a blue chain between the ringed top-right and bottom-left edges. On a phone, when the cells are small, tap once to preview a cell and again to place your stone.

Bridges

Two of your stones with two empty cells between them form a bridge: if the computer takes one of those cells, take the other and your stones stay linked. A stone on the second row from your edge, with both edge cells in front of it empty, is linked to that edge in the same way. Bridges cover ground faster than a solid line and can’t be cut in one move.

Swap rule

Moving first is a big advantage. To even it out, turn on Swap rule before your first move. After your first stone, the computer may take it over: the stone turns blue in its mirror-image cell and you move again. The computer swaps whenever your first stone isn’t on the edge of the board, so with the swap rule on, open on an edge.

Board sizes

There is one computer opponent, and it plays to the board. On 7×7 it thinks briefly and leaves you chances; on 9×9 and 11×11 it searches much longer and blocks well. 11×11 is a common size for serious play.

Questions

How do you win at Hex?

Connect your two edges with an unbroken chain of your own stones. The chain can wind any way it likes; only the link from edge to edge counts. The four corner cells belong to both of the edges they touch.

Can a game of Hex end in a draw?

No. A chain that blocks the other player completely is itself a connection between your own edges, so once the board is full exactly one player has a chain. In practice every game is decided long before that.

Does the first player have an advantage in Hex?

Yes. A classic argument shows the first player can always win with perfect play: an extra stone never hurts in Hex, so if the second player had a winning plan, the first player could borrow it with a stone to spare. It doesn’t say how to win, though. The swap rule removes most of the advantage.

What is a good Hex strategy?

Start near the centre, use bridges instead of solid lines, and block from a distance: a stone a few rows ahead of the computer’s chain is harder to go around than one right next to it. The hint rings a strong cell and says why it helps.

Who invented Hex?

It is usually credited to the Danish poet and mathematician Piet Hein, who introduced it in 1942, and to John Nash, who came up with it independently a few years later.

More games