The 4,000-Year History of Tic-Tac-Toe
Most of us learn tic-tac-toe before we learn to read. Two kids, a scrap of paper, a borrowed pen. Three rows, three columns, two symbols. The whole game fits in the margin of a notebook.
What almost nobody knows is that this game β the one you doodled in the back of math class β is one of the oldest pastimes humans have. It's older than chess. It's older than backgammon. It's older than the Roman Empire, and it survived the Roman Empire by 1,500 years and counting. People were playing essentially the same game in ancient Egypt that schoolchildren play in SΓ£o Paulo and Mumbai today.
This is its story.
The earliest possible origins (c. 1300 BCE)
The trail starts in Egypt. Archaeologists have found scratched grids on the roofing tiles of ancient Egyptian temples and tombs dating back to roughly 1300 BCE β over 3,300 years ago. Some of these grids are clearly three-by-three. Whether the people who scratched them were playing what we'd recognize as tic-tac-toe, or some related game, is impossible to say for certain. But the visual evidence is striking: humans have been drawing 3Γ3 grids for fun for at least three millennia.
What's harder to overstate is how portable the game is. Other ancient games β senet, the royal game of Ur, mancala β required boards, pieces, or careful setup. Tic-tac-toe needs only a flat surface and something to mark with. A stick in dirt. A finger in sand. A nail on a tile. This made it the universal idle-hands game of antiquity. Anywhere you had soldiers waiting around, workers on lunch break, or kids escaping their parents, you had tic-tac-toe.
Terni Lapilli: the Roman version
The clearest historical record comes from the Romans, who had a variant they called Terni Lapilli β literally "three little stones." Players each had three stones (or sometimes three coins, three pebbles, three of anything small). They took turns placing stones on a 3Γ3 grid until each had placed all three. After that, on subsequent turns, players moved their existing stones to adjacent empty cells. The goal was the same as today: get three in a row.
This rule change β moving pieces after placement, instead of just adding new ones β is interesting. It means a Roman game couldn't end in the kind of "all nine squares filled" draw we get today. It had to end with someone making a line. The game was more dynamic, but probably also longer.
You can still see Terni Lapilli boards scratched into stone all over the former Roman world. They show up on temple steps, in the forums of Pompeii, on the seats of Roman amphitheaters where audiences presumably needed something to do between gladiator fights. There are even Terni Lapilli grids carved into the marble floor of the Basilica Julia in the Roman Forum β the place where Roman senators conducted government business. Apparently even senators got bored sometimes.
The medieval shuffle: noughts, crosses, and other names
After Rome fell, the game didn't die β it just changed clothes. By the Middle Ages, versions of it were being played all over Europe and the Islamic world under various names. In England, it picked up the name "noughts and crosses" β a "nought" being an old word for zero, and a "cross" being, well, a cross. That name stuck in Britain and most of the Commonwealth, and it's still what the game is called in the UK, Australia, New Zealand, India, and most of Anglophone Africa today.
Other languages developed their own names. In Spanish, it's tres en raya ("three in a row"). In French, it's morpion (a name with a strange etymology β the word originally meant a parasitic insect, possibly because of how the rows of crosses look). In German, it's Drei gewinnt ("three wins") or Tic-Tac-Toe. In Japanese, it's maru-batsu (literally "circle-cross"). In Hindi, it's often just called tic-tac-toe, borrowed directly from English.
The name "tic-tac-toe" itself is American, and surprisingly recent. It seems to have entered common usage only in the 19th century. The exact origin of the phrase is murky. The most plausible theory: it comes from an unrelated children's game in which players closed their eyes and tried to mark a slate while chanting "tic, tac, toe" β a kind of nonsense rhythm. The name eventually got attached to the noughts-and-crosses game, and by the early 20th century, "tic-tac-toe" was the standard American name. Curiously, in early 20th-century American usage, the same name was sometimes applied to a numerical game involving rolling pencils. The naming was messy.
The 20th century: the game gets solved
By the early 1900s, tic-tac-toe had achieved its modern form β the simple "fill nine cells, three in a row wins" rules we all know. And by then, mathematicians had figured out something interesting: the game is what's called solved.
A solved game is one where the optimal strategy is fully known, from any position. For tic-tac-toe, the result is a small letdown: with perfect play by both sides, the game is always a draw. Neither player can force a win against an opponent who knows what they're doing. The first player has a slight strategic advantage β they get to choose the opening square, and the center is the strongest opener β but it's not enough to actually win against good defense.
This makes tic-tac-toe a great teaching example for the mathematical field of game theory. It's small enough to analyze completely (only 26,830 possible games exist when you account for board symmetries) but rich enough to illustrate concepts like "minimax," "forcing moves," and "perfect information." When mathematicians want to introduce game theory to a general audience, tic-tac-toe is almost always where they start.
If you'd like to learn the perfect-play strategy yourself, our complete strategy guide walks through it move by move.
OXO: the first video game
Here's a fact that should be more famous than it is. The world's first video game with a visual display β predating Pong, predating Spacewar!, predating Tennis for Two β was a tic-tac-toe game. It was called OXO, and it was written by a British computer scientist named A. S. Douglas in 1952.
Douglas programmed OXO on the EDSAC, an early computer at the University of Cambridge. The game displayed a 3Γ3 grid on a cathode-ray tube (a kind of early television-like screen) and let the human player compete against the computer. The user input their move using a rotary phone dial β yes, really, a rotary dial β and the computer responded with its own move, using a primitive but effective version of the minimax algorithm.
Douglas wasn't trying to invent video games. He was writing his PhD thesis on human-computer interaction, and OXO was a demonstration of how computers could engage in interactive decision-making. It was a research artifact. But it has a strong claim to being the first ever computer game with graphical output. Seventy years later, almost every video game on Earth descends, in some sense, from that humble tic-tac-toe program on a Cambridge mainframe.
The Tinkertoy computer
One of the strangest entries in tic-tac-toe's history is the Tinkertoy Tic-Tac-Toe Computer, built by MIT students in 1975. Three students β Danny Hillis, Brian Silverman, and others β constructed a working computer entirely out of children's Tinkertoy parts. It had no electronics. No silicon. No transistors. Just wooden rods, plastic connectors, and a few rubber bands, all arranged to mechanically compute optimal tic-tac-toe moves.
The machine worked. You'd indicate your move by pressing a wooden lever, and the contraption would slowly grind its way through a kind of physical lookup table to determine the computer's response. It never lost a game. The Tinkertoy computer is now in the collection of the Computer History Museum in Mountain View, California β a wooden monument to the idea that "computation" doesn't actually require any particular technology, just the right structure.
Where tic-tac-toe lives today
If you grew up after 1990, you probably first encountered tic-tac-toe on paper or as a side-game in some other context β the back of a kids' menu at a restaurant, the inside cover of an activity book, a long car ride, a boring class. The game has survived because it's the lowest possible barrier to play. No board, no app, no electricity, no rules to explain. Two squiggles and a grid. Anyone, anywhere, can play.
And yet β because the basic game is solved and gets stale once you understand the strategy β people have spent the last century inventing dozens of variants to keep it interesting. Ultimate Tic-Tac-Toe, invented in the late 20th century, nests nine boards inside a tenth and adds a constraint that turns every move into a deep strategic puzzle. MisΓ¨re flips the win condition. Larger boards with longer winning rows turn the game into something that resembles Gomoku or Connect Four. Wild tic-tac-toe lets either player place either X or O on each turn. Notakto ("no tac toe") removes the X/O distinction entirely β both players play X, and the goal is to avoid being the one to complete three in a row.
The fact that all of these variants exist tells you something important: tic-tac-toe is less a single game than a template. The 3Γ3 grid is a base on which generations of inventors have built more interesting structures. The base game might be solved, but the family of games it generates is genuinely deep.
Why tic-tac-toe endures
It would be easy to write off tic-tac-toe as a kids' game β a simple thing we leave behind when we discover chess or Go. But that misses what's actually remarkable about it. Tic-tac-toe is the most ergonomically perfect game ever invented. The rules are explicable in under thirty seconds. The equipment is "whatever's around." The play time is under a minute. The strategic depth is small but real. And it's universally portable across cultures, languages, ages, and contexts.
Most importantly, it teaches the basic logic of strategic games β anticipating an opponent, blocking threats, creating multiple threats at once β at a scale a five-year-old can grasp. Almost every more sophisticated game you'll ever play (chess, Go, poker, even sports) involves some version of those same concepts. Tic-tac-toe is where you first encounter them. It's the ABCs of strategic thinking.
Four thousand years after the first kid in Egypt scratched a grid into a tile, we're still playing the same game. There aren't many things humans have done for that long without giving up.
Want to put what you've read into practice? Start with the classic 3Γ3 game and try the "Hard" or "Impossible" AI:
Related reading
- How to Never Lose at Tic-Tac-Toe β the complete strategy guide
- How the AI Thinks: Minimax Explained Simply
Sources include the Computer History Museum, the British Museum's collection notes on Roman pavement games, A. S. Douglas's 1952 Cambridge PhD thesis, and standard references on game theory and combinatorial games. Some historical claims (particularly the Egyptian dating) are based on widely cited archaeological interpretations that remain debated among specialists.