PlayNook

Who Invented Tic-Tac-Toe? Nobody Did

historymaths

Title graphic reading Who invented tic-tac-toe, showing a Roman scratched three-in-a-row board with three round counters a side beside a modern noughts and crosses grid filled with Xs and Os

Want to try it? MENACE is playable right here.

Play MENACE

Nobody invented tic-tac-toe. There is no inventor, no date and no first edition — and the reason that is interesting rather than disappointing is what turns up when you look for one.

The oldest thing usually offered as an ancestor is not the same game. That is not a matter of interpretation: both games can be solved completely, and they come out differently.

  • No inventor and no date — the game has no origin point to find
  • Terni lapilli, the Roman relative, is a first-player win
  • Tic-tac-toe is a draw — so the two are provably different games
  • 1952 — the year it became one of the first graphical computer games

When was tic-tac-toe invented?

It was not. Games this simple do not get invented — they get arrived at, repeatedly, wherever people have a flat surface and something to mark it with. A three-by-three grid and "make a line" is close to the smallest possible game, and no culture needs to hear about it from another one to find it.

What can be dated is the earliest surviving evidence, and here the honest answer is the useful one: scratched three-in-a-row boards survive across the Roman world, cut into pavements, steps and roof tiles. The Romans called the game terni lapilli — "three little stones".

That is the real ancestor. It is also not our game.

What was the Roman game?

Three stones each, not nine. You place your three, and then — this is the part that changes everything — you keep playing, moving one stone each turn, until somebody makes a line.

Our game ends when the board fills up. The Roman game cannot fill up. Six pieces on nine squares means there are always three empty ones, and the game runs until someone actually wins.

Three cards comparing the Roman game terni lapilli, the same game with the centre barred on the opening move, and modern tic-tac-toe. The Roman game is a first-player win; barring the centre makes it a draw; modern tic-tac-toe is a draw.
Both solved completely. Same board, same eight lines, different answers.

The Roman game is a first-player win. Ours is a draw. Two games that share a board and a winning condition, and one of them is broken while the other is the standard example of a fair game — that is as clean a demonstration as you could ask for that they are not the same thing.

Why does the centre matter so much?

Because it is on twice as many lines as an edge.

Three by three grid showing how many of the eight winning lines pass through each square: four through the centre, three through each corner and two through each edge square.
Counted from the eight lines. The same asymmetry, two very different consequences.

In our game that makes the centre the best opening and nothing more — the second player can still hold the draw. In a game where the pieces keep moving, the same advantage compounds every turn, and it decides the game.

The Morris family is what happens when this idea is taken seriously: the same "place then move" structure on bigger boards, with enough room that it stays a real contest. Three Men's Morris is playable here, and it is essentially the Roman game.

Is tic-tac-toe really 3,000 years old?

You will read that it goes back to ancient Egypt, usually with a date around 1300 BC and a mention of markings on roofing tiles.

Treat it carefully. Grid-shaped scratches are genuinely common on ancient surfaces, and some of them certainly were games — but a scratched grid does not record its own rules. The same three-by-three pattern is used for counting frames, for mason's marks, for decoration, and for at least half a dozen different games. Without a text saying how it was played, "this is tic-tac-toe" is a guess dressed as a fact.

The Roman evidence is better because it comes with a name attached in the written record. Even there, as above, the name belongs to a different game.

Why is it called noughts and crosses?

Because that is what the marks are: a nought is a zero, and a cross is a cross. It is the older and more literal of the two names, and it remains standard in Britain, Ireland, Australia and New Zealand.

The American name has a stranger history. "Tick-tack-toe" — also written tit-tat-toe — was originally a different children's game entirely: players closed their eyes and brought a pencil down onto a slate of numbers, chanting the phrase as they did it, and scored whatever they hit. The rhythm is the point; the words do not mean anything.

At some stage in the nineteenth century the name detached from that game and attached itself to this one. Nobody planned it, which by now should sound familiar.

How many pieces do you need?

None, if you have a pencil — which is the whole reason the game spread. But the question comes up constantly for people making a travel set or a classroom version, and it has an exact answer.

Five of one mark and four of the other. Nine squares, alternating turns, first player goes first: X gets moves one, three, five, seven and nine, and O gets the four in between. A set with five and five has one piece too many, and a set with four and four cannot finish a game.

The Roman set is different again: three and three, and the board never fills. That is the single detail that tells you which game a dug-up board belonged to — not the grid, which is identical, but how many stones were found with it.

When did tic-tac-toe come out as a computer game?

1952, and this date is solid.

A.S. Douglas wrote OXO for the EDSAC at Cambridge as part of a doctoral thesis about the interaction between people and computers. It played a perfect game against a human opponent and drew the board on a cathode ray tube — which makes it, on most reckonings, one of the very first computer games with a graphical display.

The choice of game was not sentimental. Tic-tac-toe is small enough to solve exhaustively on a machine with almost no memory, and familiar enough that anybody could sit down and test whether the thing worked.

The machines built to play it

Once it was solved, the game became a demonstration piece — the thing you build to show that a machine can do something surprising.

  • 1961: MENACE. Donald Michie built a machine out of 304 matchboxes and coloured beads that starts out knowing nothing and learns to play by being rewarded and punished. It is reinforcement learning, twenty-five years early, in a shoebox. You can play it here or print all 304 labels and build one.
  • 1975: the Tinkertoy computer. A group at MIT built a machine from a children's construction toy that plays a perfect game. It has no electronics at all.

Both exist because the game is exactly the right size: too big to be trivial by hand, small enough to be finished completely.

So how many games are there?

255,168 — if you count every distinct way a game can be played out, and stop the moment somebody has three in a row.

That number, and the four other figures people quote alongside it, are worked through in how many tic-tac-toe games there are. The short version is that the competing numbers are not contradictions; they are answers to five different questions.

Why has it survived?

Because it costs nothing. No board to own, no pieces to lose, no rules to explain — a corner of a napkin and thirty seconds. Every child works out within a few dozen games that it is drawn with sensible play, and that is usually the end of it.

Which is the quiet joke in the whole history: the game survived for two thousand years by being easy to abandon. It is the first strategy game most people meet, the first one they solve, and the reason they go looking for a harder one.

If that is where you are, a bigger board is the first thing most people try — and it does not work, for reasons that can be computed. Gomoku is the same idea with room to breathe, and Nine Men's Morris is where the Roman game grew up. If you want to keep the grid, there are printable tic-tac-toe sheets here too.