The Classic Connection Game, Free in Your Browser
Hex is a two-player strategy game played on a rhombus of hexagons. The rules fit in two sentences: players take turns placing one stone of their colour on any empty cell, and the first to link their two sides of the board with an unbroken chain wins. Red connects the top edge to the bottom edge, Blue connects the left edge to the right edge — the coloured borders on the board show exactly whose side is whose. That is the entire game, and it is deep enough to have kept mathematicians busy for eighty years.
Invented Twice, by Piet Hein and John Nash
Hex was discovered independently by two people. The Danish mathematician and poet Piet Hein introduced it in 1942, and the mathematician John Nash reinvented it around 1948 as a graduate student at Princeton, where classmates called it “Nash”. Nash was drawn to a beautiful fact about the game that a simpler-looking board like noughts and crosses does not share.
The No-Draw Theorem
Hex can never end in a draw. Fill the board completely, in any arrangement whatsoever, and exactly one player will have a winning connection — never both, never neither. It sounds too neat to be true, but it is a proven theorem, and it is equivalent to a famous result in topology (the Brouwer fixed-point theorem). We take the honest, nerdy route to prove it here: the automated test suite for this page fills thousands of random boards and checks, every time, that exactly one side is connected. If our board maths were wrong, that test would fail — so the game you are playing is verified draw-proof by brute force, not just by our word.
Why the First Player Wins — and How the Pie Rule Fixes It
Because there are no draws, one player must have a winning strategy, and a short argument called strategy-stealing shows it is the first player: if the second player had a winning strategy, the first player could just place a stone anywhere and then follow that same strategy, with a spare stone that can only ever help. That is a genuine edge, which is why serious play uses the pie rule: after the opening move, the second player may swap and take it. Now nobody wants to open too strongly, and the game is fair again. It is the same idea as “you cut, I choose”. Toggle the pie rule on in setup, and try the same math-classic thinking in our Nim game, the drawn-curve territory battle of the sprouts game, or a lighter connection race in four in a row. If you like hex grids for other reasons, the Minecraft circle generator plots shapes onto a block grid the same way.
Which Board Size to Play
The tournament standard is 11×11, big enough for the game’s full strategic depth. Smaller boards are faster and friendlier for learning — 7×7 is a brisk game you can finish in a couple of minutes. The shortest possible win is always a straight line from one side to the other, so it takes exactly as many stones as the board is wide; the table below is computed from the same grid maths the win checker uses.