Abstract
In tic-tac-toe two players take turns marking a $3\times3$ grid, and whoever gets three marks in a row, column or diagonal wins. “How often does the first player win” is answered by three ways of counting. No new theorem or law is claimed.
First, counting move sequences equally, the first player wins $\mathbf{0.514108}$——the sequences stopped when the game is decided number $255168$: $131184$ first-player wins, $77904$ second-player wins and $46080$ draws (Section 2).
Second, playing at random, the first player wins $\mathbf{0.584921}$——if both choose uniformly among the empty squares, the first player wins with probability exactly $737/1260$, the second with $121/420=0.288095$, and the game is drawn with $8/63=0.126984$. Playing $200000$ random games gave $0.584060$ for the first player, a difference of $0.000861$ from the formula (Section 3).
Third, with best play on both sides, the first player wins $0$——the value of the opening position is a draw, and every one of the $9$ first moves leads to a draw (Section 4).
Fourth, and this is the core. The three numbers differ in what is taken as equal——each sequence counted as one, each empty square equally likely at every move, or the best move on both sides. Playing at random, shorter sequences are more probable, and since first-player wins are decided early, their share is larger than when sequences are counted (Section 5).
Fifth, on the side of best play, one wrong reply loses——if the first player takes a corner, $7$ of the second player’s $8$ replies lose and only the centre keeps the draw. If the first player takes the centre, the $4$ edges lose (Section 4).
Keywords: tic-tac-toe, game tree, first-player win rate, optimal play, weighting of counts.
Scope (what is not claimed)
No new theorem or law is claimed——that tic-tac-toe is drawn with best play, and that there are $255168$ sequences and $5478$ positions, are known. That a finite game has a determined outcome under best play has been known since Zermelo ($1913$). Openings are not treated——best replies are shown only for the move after a centre, corner or edge opening. How people play is not discussed——“playing at random” means only choosing uniformly among the empty squares. Relation to earlier papers: Paper 164 showed that “probability” has four addresses: frequency, belief, axiom and context——the three numbers here differ in what is taken as equal on the same tree, an example of where probability is placed changing the number. Paper 602 solved the positions of Nim exhaustively——tic-tac-toe can likewise be solved by following the whole tree, but here the issue is not who wins but the weights needed to state it as a share. What is added is deriving three shares from the same tree and setting them side by side, computing the probabilities under random play exactly as fractions and matching them with random games, and placing the separator on what is taken as equal and showing that the length of a sequence changes its weight.
1. Notation and the Question
Setting: number the squares $0$ to $8$ from the top left (the centre is $4$, the corners $0,2,6,8$, the edges $1,3,5,7$). The two players take turns marking an empty square; three in a line wins, and a full grid without a line is a draw. A game stops as soon as it is decided.
Question: what is “the share of first-player wins”, and how does the answer change with the way of counting?
2. Counting Sequences
Computation 2.1: all move sequences from the empty grid to the end of the game were followed and counted.
| result | sequences | share |
|---|---|---|
| first player wins | $131184$ | $\mathbf{0.514108}$ |
| second player wins | $77904$ | $0.305305$ |
| draw | $46080$ | $0.180587$ |
| total | $255168$ | $1$ |
Computation 2.2: the positions (arrangements of marks) appearing along the sequences, including the empty grid, numbered $5478$. Merging those that coincide under the $8$ rotations and reflections leaves $765$.
Observation 2.3 counting sequences, the first player wins slightly more than half. Of the $255168$ sequences, $131184$ end in a first-player win——this is the share when every sequence is counted as one.
3. Playing at Random
Computation 3.1: with both players choosing uniformly among the empty squares, the probabilities of the results were accumulated position by position exactly as fractions.
| result | probability (fraction) | decimal |
|---|---|---|
| first player wins | $737/1260$ | $\mathbf{0.584921}$ |
| second player wins | $121/420$ | $0.288095$ |
| draw | $8/63$ | $0.126984$ |
The three add up to exactly $1$. Playing $200000$ random games gave $0.584060$ for the first player, $0.000861$ from the fraction (within random variation).
Observation 3.2 playing at random, the first player wins more than when sequences are counted. $0.584921$ against $0.514108$, while draws are smaller, $0.126984$ against $0.180587$——the count is on the same tree, yet the answer differs.
4. Best Play
Computation 4.1: with the first player maximising and the second minimising the first player’s result, the value of each position (first-player win $1$, draw $0$, second-player win $-1$) was fixed from the end backwards. The opening position has value $0$, and all $9$ first moves have value $0$.
Computation 4.2: after the first move, the second player’s replies that lose (value $1$) were counted.
| first move | losing replies | replies keeping the draw |
|---|---|---|
| centre ($4$) | edges $1,3,5,7$ | the $4$ corners |
| corner ($0$) | $1,2,3,5,6,7,8$, seven squares | the centre only |
| edge ($1$) | $3,5,6,8$ | the other $4$ |
Observation 4.3 with best play, nobody wins. And the path to the draw is narrow: after a corner, the second player has no drawing reply but the centre——“the first player wins $0$” on the side of best play holds only when not a single reply is wrong.
5. The Separator
Observation 5.1 this is the core: the three numbers differ in what is taken as equal. Counting sequences, every sequence is one. Playing at random, every empty square is equal at each move. Under best play, only the best moves on both sides are chosen——three different weights are placed on the same tree of $255168$ sequences.
Observation 5.2 playing at random, shorter sequences weigh more. Since the squares available fall as $9,8,7,\dots$, a sequence of length $L$ has probability one over $9\times8\times\cdots\times(10-L)$. A draw always takes nine moves, while first-player wins are decided at the fifth, seventh or ninth move——the early first-player wins are counted more heavily than when sequences are counted, so the first player’s share rises from $0.514108$ to $0.584921$ and draws fall.
Observation 5.3 beside Paper 164. Paper 164 showed that “probability” has four addresses——the three numbers here come from the same grid and rules, yet what is taken as equal changes them. Asked “what is the chance the first player wins”, one must first ask back for the address.
Observation 5.4 beside Paper 602. Paper 602 solved the positions of Nim exhaustively and told wins from losses by addition without carries——tic-tac-toe is also solved by following the whole tree, but the answer is the single word “draw”. Asking for a share needs weights on the tree.
Observation 5.5 what is not said. Openings are not treated and how people play is not discussed——what is shown is three shares from the same tree and that their difference comes from how the weights are placed.
6. Roll Call and Closing
- $255168$ sequences (Computation 2.1): $131184$ first, $77904$ second, $46080$ draws.
- first-player share by sequences $\mathbf{0.514108}$ (Computation 2.1): slightly over half.
- $5478$ positions, $765$ merged (Computation 2.2): under $8$ rotations and reflections.
- random play: $737/1260=\mathbf{0.584921}$ (Computation 3.1): random games give $0.584060$.
- draws fall from $0.180587$ to $0.126984$ (Observation 3.2): same tree, different answer.
- best play has value $0$ (Computation 4.1): a draw after every first move.
- after a corner only the centre keeps the draw (Computation 4.2): $7$ replies lose.
- the three numbers differ in what is taken as equal (Observation 5.1): the core.
- random play weighs shorter sequences more (Observation 5.2): early wins count more.
- ask for the address before the probability (Observation 5.3): Paper 164.
Closing: How often does the first player win at tic-tac-toe? The answer splits three ways by what is taken as equal——counting the $255168$ sequences equally gives $0.514108$, both players choosing uniformly among empty squares gives $737/1260=0.584921$, and best play on both sides gives $0$, always a draw. Three different weights are placed on the same tree——playing at random, a sequence of length $L$ has probability one over the product of the numbers of available squares, so the early first-player wins count more. On the side of best play, after a corner the second player has no drawing reply but the centre. Placed among the earlier papers——this is an example of the addresses of probability in Paper 164 changing a number on one grid. Like Nim in Paper 602 it is solved by following the whole tree, but asking for a share needs weights. To be honest——neither openings nor how people play are treated; three ways of counting are only set side by side.
References
- Berlekamp, E. R., Conway, J. H., & Guy, R. K. (1982). Winning Ways for your Mathematical Plays. Academic Press.
- von Neumann, J., & Morgenstern, O. (1944). Theory of Games and Economic Behavior. Princeton University Press.
- Yamagishi, Y. (2026). Probability Has Four Addresses [Paper 164]. Zenodo. 10.5281/zenodo.22092815
- Yamagishi, Y. (2026). Who Wins at Nim Is Decided by Addition Without Carries [Paper 602]. Zenodo. 10.5281/zenodo.22805951
- Zermelo, E. (1913). Über eine Anwendung der Mengenlehre auf die Theorie des Schachspiels. Proceedings of the Fifth International Congress of Mathematicians.
Reference
Yamagishi, Y. (2026). How Often the First Player Wins at Tic-Tac-Toe Splits Three Ways by What Is Taken as Equal [Paper 607]. YOI: https://www.yamagishiyuuki.com/yoi/607
DOI: 10.5281/zenodo.23014454
ORCID: 0009-0006-8587-3450
PDF (English) · PDF (Japanese) · Date proof of the English PDF (OpenTimestamps .ots) · SHA256SUMS
The record page for this paper (in Japanese, with the PDFs in each language and the date proof): YOI 607. This paper is a preprint and has not been peer reviewed.