A Brief Analysis of the "Pick 15" Game

Yesterday, in the "Scientific Computing Software" class, we covered a game called "Pick 15": among the nine digits 1–9, two players take turns picking a number, no repeats allowed, and whoever ends up with three numbers among their picks that sum to 15 wins.

This is a simple game that falls under game theory. There's a famous result in game theory called Zermelo's theorem, which states that in a two-player finite game with complete information and no element of chance, either the first or the second player is guaranteed to have a winning strategy, or at least a non-losing one. Chinese chess, for example, belongs to this category: it tells us that one of the two sides must have a non-losing strategy (possibly a draw, possibly a win, but never a loss). Of course, Zermelo's theorem only guarantees existence — it doesn't tell us how to find this strategy, nor even which side possesses it. This is actually fortunate, because if such a strategy were ever discovered explicitly, a game like chess would lose much of its point.

The Pick 15 game mentioned above obviously falls into this category too. Unlike the endless variety of chess, its space of possibilities is much simpler, and it's fairly easy to see that the first player has a clear advantage. Let's analyze it below. more

In the Matlab Pick15 program used in our course, the human plays first, and the computer follows a "three-step strategy":

● If possible, make the winning move.
● If necessary, block the opponent's winning move.
● Otherwise, randomly occupy an empty square.

Is there a problem with this strategy?

Let's look at one scenario: say the first player picks 4. Then the second player is free to pick anything from the remaining 8 numbers — say, 7. Then the first player picks 8. The second player is forced to pick 3. Then the first player picks 5, and at that point the second player has already lost, because to "block" the first player's win, they'd need to pick both 6 and 1 — but they can't have both, so they're doomed. The whole sequence looks like this:

pick15_1pick15_1

This scenario at least tells us that the "three-step" strategy above is not perfect: according to its rules, when the first player picks 4, the second player might well pick 7 — yet picking 7 leads to a guaranteed loss.

We can abstract this process into a general form:

pick15_2pick15_2

The entire outcome depends only on the first three numbers. Clearly, if all the numbers in the boxes are distinct and all belong to the set 1–9, then the first player (red) wins. Naturally, the first player would love for this to happen. But the description above involves quite a few constraints — is it really so easy to satisfy them all? As it turns out, yes, remarkably easy. I did a bit of analysis with inequalities and found that a large portion of these conditions are mutually compatible — satisfying one condition often ends up satisfying a whole batch of others as well. That's a bit abstract stated this way, and formula-based analysis isn't very illuminating either, so instead I wrote a rather crude Matlab program, which produced the following table:

1st 2nd 1st
1 2 6
1 4 8
2 1 4
2 1 5
2 3 5
2 3 6
2 4 7
2 4 8
2 6 8
2 6 9
3 2 4
3 6 8
4 1 2
4 1 5
4 2 3
4 2 6
4 7 5
4 7 8
4 8 6
4 8 9
5 1 2
5 1 4
5 3 2
5 3 6
5 7 4
5 7 8
5 9 6
5 9 8
6 2 1
6 2 4
6 3 2
6 3 5
6 8 4
6 8 7
6 9 5
6 9 8
7 4 2
7 8 6
8 4 1
8 4 2
8 6 2
8 6 3
8 7 4
8 7 5
8 9 5
8 9 6
9 6 2
9 8 4

This table shows: if the first player picks the first number, and the second player picks the second number, then the first player picks the third number and wins immediately! This table contains 48 such guaranteed-win situations! And of course, that's not the whole story of winning positions.

What if it's $a+c-b < 1$ or $a+c-b > 9$? This is also an advantage for the first player, because it tells us that no matter what the first player picks at that step, the second player cannot win — the first player has no need to "watch their back," and can freely choose whatever number is most advantageous. If, after the first player makes this choice, the second player is then unable to "block" the win, the first player wins outright. How many such situations are there? Surprisingly, there turn out to be 80 of them!! The winning patterns are as follows:

1st 2nd 1st 2nd 1st
1 7 5 9 6
1 7 5 9 8
1 7 6 8 5
2 6 4 9 8
2 7 4 9 5
2 7 4 9 8
2 7 5 8 4
2 7 5 8 9
2 8 4 9 6
2 8 6 7 4
2 9 5 8 6
2 9 5 8 7
2 9 6 7 5
2 9 6 7 8
2 9 7 6 5
3 1 8 4 5
3 9 4 8 5
3 9 5 7 4
3 9 5 7 8
4 1 8 3 2
4 1 8 3 5
4 2 8 3 6
4 3 9 2 5
4 6 2 9 8
4 7 2 9 5
4 7 2 9 8
4 8 2 9 6
4 9 3 8 5
4 9 5 6 3
4 9 5 6 8
5 1 6 4 2
5 1 6 4 7
5 1 7 3 2
5 1 7 3 6
5 1 8 2 3
5 1 8 2 4
5 3 8 2 1
5 3 8 2 6
5 3 9 1 2
5 3 9 1 4
5 7 1 9 6
5 7 1 9 8
5 7 2 8 4
5 7 2 8 9
5 9 2 8 6
5 9 2 8 7
5 9 3 7 4
5 9 3 7 8
5 9 4 6 3
5 9 4 6 8
6 1 5 4 2
6 1 5 4 7
6 1 7 2 5
6 2 8 1 4
6 3 8 1 2
6 3 8 1 5
6 4 8 1 2
6 7 1 8 5
6 8 2 7 4
6 9 2 7 5
6 9 2 7 8
7 1 5 3 2
7 1 5 3 6
7 1 6 2 5
7 9 2 6 5
8 1 3 4 5
8 1 4 3 2
8 1 4 3 5
8 1 5 2 3
8 1 5 2 4
8 2 4 3 6
8 2 6 1 4
8 3 5 2 1
8 3 5 2 6
8 3 6 1 2
8 3 6 1 5
8 4 6 1 2
9 3 4 2 5
9 3 5 1 2
9 3 5 1 4

From these statistics, we can see that if the first player picks an even number, the second player must pick 5 — otherwise they're guaranteed to lose!! (This is of course assuming the first player plays optimally.) So the "three-step" strategy above isn't just flawed — it's seriously flawed, since we'd end up with a win rate of $\frac{7}{8}$! Are there any other guaranteed-win patterns beyond these? I don't think so, because once five moves have been made without a win, I believe that after the second player's next pick there are only three numbers left to choose from — with essentially no freedom of choice left, and the game should already be heading to a draw.

Of course, this sort of purely computational analysis at best gives us some practical information, without offering much aesthetic insight. There's another approach that lets us look at this problem from a different angle — we'll get into that next time (naturally, such analyses can already be found online). Below I've attached my rather crude program:

Three-in-a-Row Win Checker (Matlab).txt

Five-in-a-Row Win Checker (Matlab).txt

Winning Results.xls

English translation of a post from 科学空间 | Scientific Spaces by 苏剑林. Original: https://kexue.fm/archives/1973
Translated automatically with claude-sonnet-5; all equations are reproduced verbatim from the source. Copyright remains with the original author.