Ultimate Tic-Tac-Toe: Why a Solved 3x3 Does Not Solve It
By Nesim Razon, independent mobile developer · 2026-11-25
Ordinary Tic-Tac-Toe is a solved draw, so it is tempting to think a version made of nine such boards is just nine times the work. It is not. The extra rule that links the boards changes the whole character of the game, and it makes a computer opponent much harder to build. Here is how the game works, how big it really is, and what we did in our own app.
What 'solved' means for the small game
A game is solved when the result with perfect play from both sides is known. For the 3x3 game that result is a draw. There are only 5,478 different positions that can appear on the board when you play from the empty grid and stop at a win or a full board. I checked that number again with a short script before writing this, and it matches.
A program can look at every one of those positions in the blink of an eye. That is why a perfect opponent for the small game is easy: it simply tries every continuation and assumes you always find your best reply. Nothing in this story carries over automatically to the bigger game, and the reason is the first thing to understand.
The rules of Ultimate Tic-Tac-Toe
Picture a big 3x3 grid. Each of its nine squares holds a complete small 3x3 board, so there are 81 cells in total. Players alternate with X and O. The twist is how you choose where to play: the cell you take inside a small board decides which small board your opponent must play in next. If you mark the top-right cell of any small board, your opponent has to move in the top-right small board of the big grid.
Winning a small board works as usual: three of your marks in a row there claims that board for you. To win the whole game you claim three small boards in a line on the big grid. That means every move matters twice. It is a move in a local fight, and it is also an instruction about where the next fight happens.
The cases people forget
- The sent board is already won or completely full. Then the rule has no board to point at, and the player to move may choose any small board that is still open. In our app this is exactly the implemented rule.
- A won small board still has empty cells, but nobody can play in them any more. A board is closed as soon as it is won or full.
- A small board that fills up without a winner is closed and belongs to nobody. It does not count for either side on the big grid.
- If every small board is closed and nobody has three in a line on the big grid, the game is a draw.
- The very first move can go anywhere, because there is no previous move to point at a board.
How big is the game, really?
Counting exactly is hard, so I did not try. Instead I wrote a script that plays 20,000 random legal games and measured them. A typical game lasts about 59 moves, with a range from 27 to 77 in my sample. On an average turn the player has about 9.2 legal cells to choose from, and roughly one turn in ten is a free choice where the sent board was closed.
Multiplying the number of options along a typical random game gives roughly 10 to the power of 49 distinct move sequences, as an order of magnitude from this sampling. The small game has 255,168 complete games. These are not exact counts and I am not claiming one, but the gap is far too big to close with a faster computer. Even a crude upper bound for filling 81 cells with three possible states, 3 to the power of 81, is about 4.4 times 10 to the power of 38, and that ignores the rules entirely.
Why the 3x3 result does not transfer
A draw on every small board does not give a draw on the big one. Winning a small board is the means, not the end, and the order of fights is dictated by the sent-board rule. A move that is the best answer inside one small board can be a disaster for the whole game, because it sends your opponent to a board where they can win immediately. The reverse is also true: a locally weak move can be the right one if it sends the opponent somewhere harmless.
So you cannot solve the nine small boards separately and glue the answers together. The boards talk to each other through every move. I am not aware of a simple full solution of the complete game that I could point you to, so do not rely on me for a claim either way. What I can say safely is that the answer for 3x3 tells you nothing about it, and that the game is far too large for the naive search that works on the small one.
Why the computer opponent is harder to build
For the small game a program searches to the end of every line, so it never has to guess how good a position is: the result is known. In Ultimate it cannot reach the end of the lines from an early position. It has to stop after a few moves and ask how good the position looks right now. That judgement is called an evaluation function, and writing it is a design job, not a calculation.
A good evaluation has to weigh several things: small boards already won, threats of two in a row inside open boards, two claimed boards in a line on the big grid with the third still open, and the value of getting a free choice. Different weights make the program play differently, and a weak weight can make a deep search play worse than a shallow one. Testing is mostly watching games and checking that the stronger level beats the weaker one.
What our Tic-Tac-Toe app does
Version 2.1.0 of our app adds an Ultimate mode next to the classic game, with Easy, Medium, Hard and a two-player option on the same phone. The code follows the rules above, including the free choice when the sent board is closed, and a unit test covers each of those cases.
Easy sometimes spots a move that wins the whole game, sometimes grabs a small board, and otherwise plays a random legal cell. Medium looks one move ahead with simple scores: it likes winning a small board, blocks the opponent's completion, and avoids sending you to a board where you could win at once or handing you a free choice. Hard runs a search called alpha-beta, which skips branches that cannot change the result. It deepens step by step up to nine moves ahead and stops early when it runs out of its search budget, which is about 350,000 positions, then scores the end of each line with a hand-written evaluation. Its very first move of a game is random.
That also means Hard is strong but not perfect in Ultimate, unlike Hard in the classic mode, where the minimax search really does reach the end. Our tests check that Hard beats Medium and Easy in practice and that a Hard move arrives in under three seconds on a test run. They do not claim perfection, and neither do I.
Playing it well
A few habits help against any opponent. Before every move, look at the board you are about to send your opponent to and ask whether they can win it or force something good there. Be careful about handing out free choices, since the player who can pick any board has the initiative; our own Medium and Hard levels treat that as a cost. Remember that a small board only matters because of the big grid, so a draw on a small board is sometimes a good result if it stops a line of three.
If you enjoyed the history and the small game, the classic mode is still there for the quick perfect-play practice. When you want to see why the larger version keeps people busy, try Ultimate on Medium first and then step up to Hard.
Frequently asked questions
Is Ultimate Tic-Tac-Toe solved like the 3x3 game?
The 3x3 result does not carry over, and the game is vastly larger. I am not aware of a simple full solution I can point to, so treat it as an open question in this post.
What happens if I am sent to a board that is full or already won?
You may play in any small board that is still open. This is the rule implemented in our app.
How do you win the whole game?
Win three small boards in a row, column or diagonal on the big grid. If every board closes without that, the game is a draw.
How many moves does a game take?
In a sample of 20,000 random games the average was about 59 moves, ranging from 27 to 77. Human games are different, so take that as a rough guide.
Does the Hard level play perfectly?
No. In Ultimate it searches up to nine moves ahead with a node budget and a hand-written evaluation, so it is strong but not perfect. Classic Hard is perfect.
More from the blog
- Tic-Tac-Toe: A Solved Game, an Early Computer and Its Variants
- Moving From GitHub Pages to Your Own Domain Without Losing SEO
- Kotlin/Native and Swift: The 'Different Argument Labels' Error
- Kotlin Multiplatform: Platform Features as a Nullable Interface
- Beamies: How a Solver Measures and Raises Difficulty
300 Maze Levels With Monsters, Checked by a Solver