In Hex you win by connecting, not by blocking, and the tool for it is the bridge: two of your stones with two empty cells between them cannot be cut, because if the computer takes one cell you take the other. Hard looks only two moves ahead and plays the same reply every time, so seven moves beat it, the fewest a win can take: g1, f2, e3, d4, c5, b6, b7. Against Expert, d4, f2, f3, f4, e6, f1, f5, e7 won every time we tried it at its usual depth, and a player who weighs both paths — his own and the computer's — wins 95% of games against Normal.
The board is a 7×7 rhombus of hexagons. You are red and join the top edge to the bottom; the computer is blue and joins the left edge to the right. You always move first, and there is no swap rule, so the computer can never take your opening stone for itself.
The game shows no labels, so this page names cells like a chessboard: columns a–g from left to right along your top edge, rows 1–7 from top to bottom. Each row sits half a cell to the right of the one above, so the board leans to the right. The centre is d4; your edges are rows 1 and 7, the computer's are columns a and g.
Every inner cell has six neighbours. For d4 they are c4 and e4 in its own row, d3 and e3 above it, and c5 and d5 below it. The rule to remember: above a cell are the same letter and the next one, below it the previous letter and the same one. So a straight line down the board does not run down one column: it drifts one letter to the left every row, like g1, f2, e3, d4, c5, b6, a7.
The two pointed corners, a1 and g7, have only two neighbours each; the two blunt corners, g1 and a7, have three. Corner cells belong to both players' edges.
Two theorems stand behind every game here; the article under the board tells their history, so this is only what they mean for you.
In practice the theorem promises nothing: from a won position a random player beat Normal once in 5,000 games and never beat Hard in 2,000. What wins is technique, and the rest of this page is about that.
Two adjacent stones are connected for good. Two stones that are not adjacent but share two empty neighbours are connected too, as long as you answer: if the computer takes one of the shared cells, you take the other. That shape is the bridge, and it is the basic move of Hex, because it covers two rows with one stone where an adjacent step covers one.
| From d4, a bridge to | The two shared cells | Direction |
|---|---|---|
| c6 | c5 and d5 | two rows down, one letter back |
| e2 | d3 and e3 | two rows up, one letter on |
| e5 | e4 and d5 | one row down, one letter on |
| c3 | c4 and d3 | one row up, one letter back |
The first two are the ones that carry you across the board; the last two move you sideways while keeping contact.
The edges have the same trick, called an edge template. A stone on row 6 touches two cells of row 7 — c6 touches b7 and c7 — so if both are empty it is already connected to the bottom: whichever the computer takes, you take the other. A stone on row 2 is connected to the top the same way (c2 touches c1 and d1). Hex players also know larger templates, such as the «ziggurat» for a stone on the third row from an edge, but they need more empty space and more care (theory).
The habit that goes with all of this is to answer the intrusion: when the computer plays into one of your bridges or templates, close it at once. We gave a simple player — one that shortens its own path and nothing else — this single extra rule. Against Normal its wins rose from 63% to 67% (5,000 games each), against Hard from 8.8% to 15% (2,000 games each). Every winning line on this page ends the same way: the computer takes one cell of a template and you take the other.
The computer knows about bridges: its evaluation treats a bridge between two of its own stones as almost finished. It does not know about edge templates, so it counts a stone on your second row as still one cell short of the edge.
The classic advice is that a blocking stone placed right in front of an enemy stone does little: there are always two cells to step around it. A block works when it stands a few rows ahead, where it can meet the path wherever it turns (theory, and long practical experience).
Hard shows why. In the seven-move win below, every one of its stones goes right beside your last one, and you simply step to the other side: g1, f2, e3, d4, c5, b6 run straight down the short diagonal while Hard answers g2, f3, e4, d5, c6 and then a7, too late.
Measured on this engine, what matters is to count both paths. Two simple players, 5,000 games each against Normal:
| How the move is chosen | Wins vs Normal |
|---|---|
| A random empty cell | 0.02% (1 game) |
| Shorten your own path to the far edge, ignore the computer's | 63% |
| The same, and answer intrusions into bridges and edge templates | 67% |
| Shorten your path and lengthen the computer's: the cell with the best difference | 95% |
| The same, looking two moves ahead | 99.1% |
«Path» here means what the computer itself measures: the number of empty cells still missing from the cheapest chain between a player's two edges. The jump from 63% to 95% is the whole value of defence: a move that makes your path one cell shorter and the computer's one cell longer is worth two.
Theory says the centre wins on 7×7. Against the engines here the first move matters much less than what follows it: we fixed each of the 49 first moves and let five fixed players continue the game against Hard and Expert (one game each, since neither involves chance), and a player who weighs both paths one move ahead played 100 games from each first move against Normal.
| First move | vs Normal (100 games) | Fixed tests won (of 5) |
|---|---|---|
| g1 (blunt corner) | 96% | 4 |
| e2, f2, g2 (next to it) | 99–100% | 3 each |
| d4 (the centre) | 97% | 1 |
| a1, g7 (pointed corners) | 70%, 90% | 0, 2 |
| b4 | 31% | 0 |
| All 49 moves, average | 87% | 1.3 |
Two things stand out. The cells around the blunt corner g1 did best, while the centre, the theoretical winner, won only one of its five fixed tests against these particular engines. And the weak first moves are mostly edge cells and a few on the left side, such as b4, a5 and a6: against Normal, edge openings averaged 84% and inner ones 89%.
The fixed tests: a one-move-ahead player and a two-move-ahead player against Hard, one- and three-move-ahead players against Expert at depth four, and a four-move-ahead player against Expert at depth five. They are single games, so treat the column as a hint, not a ranking.
All three levels first take a winning cell if they have one, then block yours if you threaten to win next move. After that:
Hard, in seven moves. No win can be shorter, since your chain needs a stone in each of the seven rows. Play g1, f2, e3, d4, c5, b6, b7. Hard answers g2, f3, e4, d5, c6, a7, and b7 completes the chain: b6 had both b7 and a7 below it, and Hard could take only one.
A second seven-move line starts in the centre: d4, e3, f2, d5, f1, c6, c7. Hard answers d2, b3, a5, g3, d6, b7. Your chain runs f1–f2–e3–d4–d5–c6–c7. Both lines also beat the engine at three moves ahead: it answers the first line in the same way and the second differently, and loses both.
Expert, in eight moves. Play d4, f2, f3, f4, e6, f1, f5, e7. Expert answers e2, e3, e4, c6, a7, e5, d7, and you win. Your column f1–f4 joins e6 by a bridge (e5 and f5), e6 joins the bottom by an edge template (d7 and e7), and Expert breaks into both too late. At depth six it answers c6 with d6 and a7 with b7 instead, and the line still wins; it also won all three times we played it against the real clock.
The Expert line depends on how deep Expert gets, so on a slow device it can fail: at depths two to four, and at seven, the computer answers differently and the line runs into an occupied cell. For a slow device there is another line: e2, c4, c3, b6, c5, c2, c1, b7 wins against the engine at depths two, three and four (at four: e3, d3, g2, b5, d2, b1, a7), and no line of seven moves beats depth four from e2, g1 or d4. Hard's lines do not depend on the device. Normal is random: Hard's centre line beat it in only 20% of 2,000 games, so against Normal play by the principles, not by a list.
| Your rule | vs Normal | vs Hard | vs Expert* |
|---|---|---|---|
| A random empty cell | 0.02% | 0% | 0% |
| Shorten your own path | 63% | 8.8% | 0.6% |
| … and answer intrusions into bridges and templates | 67% | 15% | 1.2% |
| Best difference of the two paths, one move ahead | 95% | 12 of 49 first moves | 3 of 49 first moves |
| The same, two or three moves ahead | 99.1% | 21 of 49 (two ahead) | 15 of 49 (three ahead) |
* Expert at a fixed depth of four, weaker than it plays on a fast computer; 500 games per rule for the first three rows. The last two rules have no randomness, so against Hard and Expert they were played once from each first move. Normal: 5,000 games per rule.
Weighing both paths alone takes a simple player from 63% to 95% against Normal; the fixed lines win against Hard every time.
No. When the board is full, exactly one player has a connecting chain; blocking the opponent everywhere means you have connected yourself. This is a theorem (Gale, 1979), and it is why the game here always ends with a winner.
With perfect play, yes: Nash's strategy-stealing argument proves the first player has a winning strategy on any board size, without saying what it is. That is why serious games use the swap rule. The game here has no swap rule and you move first, so in theory you can always win.
On 7×7 the centre, d4, is a proven winning move. Against the computer here the first move matters less than the play that follows: a player who weighs both paths won 87% of games against Normal on average over all 49 first moves, and the cells around the blunt corner g1 did best.
Two of your stones that are not adjacent but share two empty neighbours, such as d4 and c6 sharing c5 and d5. The opponent cannot cut it in one move: if he takes one shared cell, you take the other. It is the basic way to cross the board quickly and safely.
Against Hard here, play g1, f2, e3, d4, c5, b6, b7: it wins in seven moves, the fewest possible, every time. Against Expert at its usual depth, d4, f2, f3, f4, e6, f1, f5, e7 won every time we tried. Against Normal, which is random, weigh both paths and answer intrusions into your bridges: that wins about 95% of games.
After the first move, the second player may take that stone as his own instead of replying. It stops the first player from opening in the centre, so the first move has to be one that is neither too strong nor too weak. The game here does not use it.
Small boards have. All first moves on 7×7 were solved by computer in 2003, and 8×8 and 9×9 were solved in the following decade. On the tournament sizes, 11×11 and 13×13, it is known that the first player wins but not how.