# Strategy for geometric die guessing game

The first day of statistics class, we played a betting game to visualize the basics of probability distributions. It worked like this:

1. The teacher begins by rolling a die repeatedly until the number is not six.
2. The teacher calls out the number of the die.
3. At every iteration of this round, the teacher offers the option of stopping. At each iteration, every student gains 1 point unlesss he stops, after which he can gain no points for the iteration.
4. If the number is six, all remaining students receive a zero for the iteration.

We repeat for 30 rounds. Score distributions appeared approximately Normal. Needless to say, side-by-side histograms showed that girls consistently outperformed boys (the score difference was in the ballpark of 5).

Apparently boys tended to "hold on" to their scores too long, because then they'd have received a lot of zeroes. Some students committed the gambler's fallacy, assuming that a 6 was due after a while.

What would be the ideal strategy for playing this game?

Edit:

There was a small misunderstanding. Yes, points are banked, and each round can only add points. Every player chooses only for himself whether to stop and keep the points or to risk a 6 and a 0.

• To clarify- do you "bank" points over the rounds? I.e. if you get 3 points in the first three rounds, then "stop" before round 4, you get no points for the fourth round but your end score raises by three and you can start gaining more points again in round 5? Apr 14, 2015 at 20:06

This is one variant of a class of games sometimes referred to as 'Pig' games or jeopardy dice games, though individual games have other names. You may have seen the game Pass the Pigs, for example, which is a game in this genre. Optimal play for the main game (Pig itself) has been looked at, and many people have discussed optimal play for Pass the Pigs (but it's tricky since the probabilities are not determinable by symmetry arguments -- indeed it depends on the surface one plays on and the wear on the pigs as well as any manufacturing differences from pig to pig).

Optimal play depends on what it is you want to optimize (in Pass the Pigs the aim is to be the first to accumulate a target number of points -- in the early game that's going to be close to expectation-maximizing, but in the end-game the strategy may be quite different).

However, let's say we want to maximize the expected score. Further, let's think of just one of the students playing (what happens to everyone else doesn't matter, as in this calculation we're not specifically trying to score higher than another player, just maximize expected score). What's her best strategy?

Imagine in some round that the player has already got some bank of points at risk, $b$ and has to decide whether to stop or play that turn. (Points from previous rounds are not at risk in this game.)

If the student plays, then with a chance of 5/6 the student gains $1$, and with a chance of 1/6 the student gains $-b$ (i.e. loses those points).

The expected return for playing is $(5-b)/6$. This is positive if $b<5$ and negative if $b>5$ and zero when $b=5$.

If the student holds (stops), the expected return is $0$.

So to maximize expected points:

If you have 4 or fewer points at risk, don't stop.

At 5 points an expectation-maximizer is indifferent to stopping. (By contrast, a slightly risk-averse player would stop at 5, a slightly risk-seeking player would play one more round.)

At 6 points, it's against our expectation-maximizer's interest to keep playing.

If you had some other thing you wanted to optimize, you might choose a different strategy.

In this answer also the two-player nature of the game is adressed, which is given already when you assume that your opponent can track your actions -- as it is usually the case in a classroom.

## Preliminary considerations and single-player game

Let us denote the probability for getting $k$ points when you target $n$ points by $p_n(k)$. It is given by [*]

$$p_n(k) = \left(\frac56\right)^n \delta_{kn} + \left(1-\left(\frac56\right)\right)^n \delta_{k0}$$

The expectation value when you target $n$ points is

$$E_n = \sum_k k \, p_n(k) \\= n \left(\frac56\right)^n$$

for which I obtain from Wolfram Alpha:

In a single player game, I would therefore expect to perform best by choosing the targets $n=5$ or $n=6$.

## Two-player game

This is just a short explanation what one would do ... I've not done it for this game.

For reasons of simplicity, let us consider the following hypothetic version of your game. Before each "inner round", the players write down the targeted number on a sheet and hand it to the professor, who communicates each of these to the class. (Otherwise, it would be possible for players to change their initial decision according to the actions of the other players, which would make the whole thing more complicated.)

For solving the two-player case, let us first define the state $s$ in which the game can be by

$$s=(s_1, s_2, r)$$

where $s_i$ denoted the current "banked" or permanent points of player $i$ and $r$ the current round number. For each of those possible states, player one and two can target $k=1,2,\ldots$ points. For practical reasons, let us limit $k$ by 20, say.

Now the minimax theorem, the fundamental theorem for two-player zero-sum games, states that there exist an optimal mixed strategy which is denoted by $(p_1,\ldots,p_{20})$. It requests you to randomly choose one of the pure target point strategies $j$ with probability $p_j$.

Those strategies are obtained by solving a linear programming problem for a given payoff matrix $M_s$ in state $s$. Its entry $M_{s,k_1k_2}$ contains the probability for player 1 to win in state $s$ when he targets $k_1$ points and his opponent $k_2$ points. By solving the linear program, one further obtains the value $V_s$ of such a game state, which can be interpreted as the probability of winning the game in this state when both players follow the optimal strategy.

With this, one iterates over each state starting from the end of the game (after round 30) to the beginning. In round $r$, by knowing the winning probabilites for each state in round $r+1$ and by using the probabilities derived for the single-player version of the game, one can set up all corresponding payoff matrices in round $r$, and for each of them solve the linear program. By this, one finally arrives at round 1, the value of which is $\frac 12$ due to reasons of symmetry.

In summary, you gain the optimal mixed strategy for each of the possible states the game the be.

I'll stop here as I have no idea on your knowledge in game theory. If you have none, the former might be rather cryptic but nevertheless might give you a slight idea how to proceed. If you have some experience in game theory I can also add some mathematics.

[*] That might look a bit overkill here as the distribution is rather trivial in this case. However, a slight change of the game where you add the shown die points instead of 1 makes this more complicated approach neccessary.

EDIT: as an aside: I formerly solved a different version of the game, which is played by two players in rounds. They throw a single die on their own as often as they want and sum up the die points. At any time they can banke these points, but if a six is thrown all current points are lost and the other player has the turn. The player to have 50 or more points at the end of player two's turn wins the game.

For this setup, the non-simultaneous actions allows for a solution in pure strategies and also for a different solution technique, namely dynamic programming. On this page, you can find some excerpts of the optimal strategies I found (--in german language).