Play Hex Board Game Against AI
How to Play Hex
Hex looks like a race to build a road, but what decides most games is judgement. Do you take the centre, block right now, or swap after the first move? This page gives you an 11×11 board, multiple AI levels, and built-in hints, undo, and replay.
What Hex Is
Hex is a connection game with very few rules, but a lot of judgement. It is not hexagonal chess, and you do not win by capturing anything. The whole game comes down to one task: connect your two sides before your opponent connects theirs.
The game was proposed independently in the mid-twentieth century by Piet Hein and John Nash. The rules are almost nothing but edge-to-edge connection, which is what makes Hex so clean: no draws, no moving stones, and every move changes both players' paths at once. It looks simple, but it rewards big-picture reading.

Learn Your Two Sides First
Black connects the two dark sides on the left and right. White connects the two light sides at the top and bottom. The cells are hexagons, so any cells sharing a side are connected; even the ones that look diagonal are still neighbours. A group of touching stones becomes one connected block, and if that block reaches both of your sides, you win.
Every empty cell is legal, but not every move is worth the same. Do not rush to the exact centre on move one: that cell helps both colours, and the second player will often swap and claim it as their own opening.

Blocking Matters as Much as Building
There are no captures in Hex, and once a stone is placed it never moves. A path does not have to run straight; if it bends and still connects, it counts. Every stone you place is part of your own route and part of the wall in front of your opponent.
Before you move, check how many cells your opponent still needs. If you can cut their shortest path, that is often worth more than extending your own route by one more step.

Against the AI, You Can Use All of This
The side panel lets you choose from multiple AI levels. Beginner Opponent plays random empty cells and is useful for learning the sides. Gentle Practice blocks obvious paths but still misses shorter links. Advanced Practice is steadier at both building and blocking. Strong AI searches further ahead, so centre and edge choices get harder to balance. You can play as Black first or White second.
Hints use the same search as the current level. If you misread a move, use undo; when the game ends, replay the whole thing, and you can copy the move record as well. After the first move you can also swap, start a new game, or resign. Game records stay in this browser only.
11×11hex cells
Blackconnects left to right
Whiteconnects top to bottom
Swapafter move one
Questions
Can a game of Hex end in a draw?
Never. Before the board fills up, one player will always have joined their two edges. The only way to block your opponent is to build a wall of your own stones, and that wall is your own path. Every game has a winner, so there is nothing to count and nothing to split.
Do two cells that touch diagonally count as connected?
Only if they share a full edge. Each hexagon has six neighbours, and because the board is tilted, some cells that look diagonal are actually edge to edge. Cells that meet only at a corner do not connect. When in doubt, zoom in: a complete border line between two cells means they are linked.
The first player seems to have a big edge. Why can you swap after move one?
Going first in Hex really is an advantage, and a stone in the centre is close to a forced win. The swap rule cancels that out. After the first stone lands, the second player may take it as their own instead of replying. That pushes the opener toward a move that is neither too strong nor too weak.
When does the Swap button appear against the AI?
Play White, let the AI open, and the button turns into Swap on your first turn. Press it and that stone becomes yours, then the AI moves. You get exactly one chance; once you place a stone, the offer is gone. Two-player and online rooms do not have this button.
Which AI level should I start with?
Begin with Beginner opponent. It drops stones almost at random, which leaves you room to learn which edges are yours and what a connection looks like. Once you win comfortably, move to Gentle practice: it blocks obvious paths, so you have to start routing around it. The stronger levels fight for the centre and cut short links, and suit players who already use bridges.
What is a bridge?
Two stones of the same colour with two empty cells between them, where both empty cells touch both stones. If your opponent takes one of those cells, you take the other and stay connected. That makes a bridge faster than laying stones side by side, and much harder to cut.
Is the hint the AI's best possible move?
No. Hints use the same search as the level you picked, so a Beginner hint plays like a Beginner. The useful habit is to choose a cell yourself first and decide whether you are building or blocking, then compare. If the two differ, undo and try both lines to see which path ends up shorter.
If I refresh or close the page, is my game still there?
Yes. Games against the AI and two-player games are saved separately in this browser and pick up where you left off. A different browser, a private window, or clearing site data will lose them. You never need an account, and these games are not sent to a server.
Can I undo or ask for hints in an online room?
No. Online moves reach your opponent the moment they are accepted, with no hints and no undo. The host can switch colours before the first move, either player can offer a draw or resign during play, and you can start a rematch afterward. If you drop out, reopening the link usually puts you back in the same room.
Is 11×11 the board size used in tournaments?
Tournaments and computer play mostly use 11×11, 13×13, or 19×19. An 11×11 game takes a few minutes yet still rewards the swap, bridges, and fighting for the centre, which makes it a good size to learn on and to play every day. It is the only size available here for now.