← Back to blog

Game Theory for Beginners (Using Tic-Tac-Toe to Explain It)

The math of strategic decision-making, explained without jargon Β· 13 min read

Game theory sounds like a thing only economists with calculators care about. It isn't. It's the mathematical study of strategic decision-making, and you can learn its core ideas from a game you already know: tic-tac-toe.

If you've ever played tic-tac-toe seriously enough to think "what's the best move here?" β€” you were already doing game theory. The field just makes that question rigorous, expands it to situations beyond games (like business, war, evolution, and dating), and gives us tools to think about it precisely.

This article is an unintimidating tour. We'll start with what game theory actually is, build up the vocabulary, walk through the two most famous concepts (Nash equilibrium and minimax), and finish with the most famous non-tic-tac-toe example in the field: the Prisoner's Dilemma. By the end, you'll have a working mental model for thinking about any strategic situation.

What game theory actually is

The field began formally in 1944, when the mathematician John von Neumann and the economist Oskar Morgenstern published a book called Theory of Games and Economic Behavior. The title makes it sound narrow β€” games, economics β€” but the book's claim was much grander: that the same mathematical tools could be used to analyze any situation where the outcomes depend on the choices of multiple decision-makers.

That's the operative phrase: multiple decision-makers. Game theory isn't about games per se. It's about any situation where what's best for you depends on what other people choose to do. Tic-tac-toe is one such situation. So is chess. So is deciding whether to compete on price with a rival business. So is two countries negotiating a trade agreement. So is evolution, where each organism's reproductive success depends on the strategies of other organisms in its environment.

Since 1944, game theory has won at least eleven Nobel Prizes in Economics and quietly shaped fields as different as biology, computer science, military strategy, and political theory. But the foundational ideas remain simple enough to explain through tic-tac-toe.

The vocabulary

Before going further, a few terms.

Players are the decision-makers. In tic-tac-toe there are two: X and O. In real-world game-theoretic situations, there might be many more.

Strategies are complete plans of action. In tic-tac-toe, your strategy is "what would I do in every possible position I could find myself in?" Note that a strategy isn't just a single move β€” it's a comprehensive plan covering every situation.

Payoffs are the outcomes of the game, expressed as numbers. In tic-tac-toe, the payoffs are simple: +1 if you win, 0 if you draw, -1 if you lose.

And then there are the categories of games:

Tic-tac-toe is the simplest example of a sequential, zero-sum, perfect-information, two-player game. Many of game theory's foundational results apply specifically to this class. Anything you learn about tic-tac-toe scales up β€” with caveats β€” to bigger games like chess and Go.

Concept 1: Best response and Nash equilibrium

The first big idea in game theory is the best response: the move that gives you the highest payoff given what your opponent is doing. Not the best move in general β€” the best move conditional on the opponent's strategy.

The second big idea is what happens when both players are simultaneously playing their best response to each other. That's called a Nash equilibrium, named after the mathematician John Nash (whose life inspired the film A Beautiful Mind). In an equilibrium, neither player can improve by unilaterally changing their strategy. Both are stuck β€” in a good way. Equilibrium positions are stable.

In tic-tac-toe, what's the equilibrium? Both players play optimally. X opens with the center or a corner; O responds with the unique correct counter; both follow the priority list (win, block, fork, block-fork, center, opposite corner, corner, edge); the game ends in a draw. Both players are playing best responses to each other, and neither could do better by changing their strategy.

This equilibrium has a payoff of 0 for both players. Tic-tac-toe's Nash equilibrium is "everyone draws." That's the answer the field can give you in one sentence.

Concept 2: Minimax and the maximin theorem

The second classic idea β€” actually the older of the two, going back to von Neumann in 1928 β€” is the minimax theorem (or sometimes "maximin theorem"). It says: in any finite, two-player, zero-sum, perfect-information game, there exists a unique "value" of the game, achievable by both players playing optimally.

What does "value" mean here? It's the payoff that both players will get under optimal play. For tic-tac-toe, the value is 0 (a draw). For some hypothetical game where the first player has a winning strategy, the value would be +1 (a win for player one, a loss for player two). For a game where the second player always wins, the value would be -1 (from the first player's perspective).

The algorithm that finds this value is called minimax β€” and yes, it's the same algorithm we covered in our minimax article. The idea is simple: each player picks the move that maximizes their own payoff, assuming the opponent will then pick the move that minimizes it. Recursive, exhaustive search to the end of the game tree.

For tic-tac-toe, minimax finishes computing essentially instantly (the game tree has about 26,830 distinct positions, accounting for symmetry β€” easy work for any modern machine). For chess, the same algorithm in principle works but the tree is roughly 10^120 positions deep, which is more than the number of atoms in the observable universe. So chess engines do depth-limited minimax with smart heuristics. The principle is identical; the computation is different.

Concept 3: Solved games and the spectrum of complexity

A game is "solved" if its value is known and an optimal strategy can be computed. We covered this in detail in our article on why tic-tac-toe is a draw, but it's worth situating tic-tac-toe in the larger landscape:

The deep insight here is that "having a perfect strategy" and "knowing what that strategy is" are different questions. We know perfect strategies exist for chess and Go (this follows from the minimax theorem). We just can't compute what they are.

Concept 4: The Prisoner's Dilemma

Tic-tac-toe is the perfect example of one branch of game theory β€” zero-sum, perfect-information, sequential games. The other famous example showcases a completely different branch and is worth understanding for contrast.

The setup of the Prisoner's Dilemma: two suspects are arrested for a crime. They're held in separate cells with no communication. Each is offered the same deal independently: "Confess and rat out your accomplice, and we'll go easy on you. If you stay silent, we'll throw the book at you."

The payoff structure (in years of prison time, where less is better):

What should each prisoner do? Here's the twist: regardless of what your partner does, confessing is always better for you. If they stay silent, you go free instead of doing a year. If they confess, you do 5 years instead of 10. Confessing dominates silence as a strategy.

So both prisoners β€” acting rationally in their own interest β€” will confess. Both will serve 5 years. Even though they could have served only 1 year each by cooperating. The Nash equilibrium of the Prisoner's Dilemma is the worst collective outcome.

This is a non-zero-sum game (the players' interests aren't directly opposed) with imperfect information (they can't see each other's choice). The result is dramatically different from tic-tac-toe, where rational play leads to a fine outcome (a draw). In the Prisoner's Dilemma, rational play leads to mutual disaster.

The Prisoner's Dilemma has been used to model arms races (both nations build weapons even though both would prefer not to), climate negotiations (every nation has an incentive to free-ride on others' emissions cuts), business competition (companies advertise heavily, raising costs for everyone), and many other real-world situations. It's probably the most important conceptual export of game theory to other fields.

Why all this matters

Game theory affects how we think about an enormous range of human and natural systems. A few examples:

Once you see strategic structure, you see it everywhere. Every situation where multiple parties make interlocking decisions has a game-theoretic shape, and game theory gives you tools to think about that shape clearly.

Tic-tac-toe is the most accessible doorway into this field. The mechanics are familiar; the rules are simple; the analysis is small enough to do in your head. If you want to go deeper, our minimax explainer walks through the algorithm in detail, and Ken Binmore's short book Game Theory: A Very Short Introduction is an excellent starting place for further reading.

Most importantly: every time you play a serious game of tic-tac-toe, you're doing applied game theory. The "Impossible" AI on our site is game theory made visible. It computes the Nash equilibrium of every position on the fly. Watching it play (and trying to beat it) is one of the best ways to develop intuition for what the field actually does.


See game theory in action: our "Impossible" AI plays the Nash equilibrium of every tic-tac-toe position.

Play vs the AI β†’

Related reading