# Optimal strategy for a combinatoric dice game

The game can be played at https://xcvd.github.io/dice-game/

The player gets 12 throws of 3 dice and chooses a grid to place these throws in (there are 6*6*6=216 possible throws). Each throw is place in the leftmost available position of the grid and there are 4 grids to choose from.

After placing a throw, the player may throw and place again until all grids have been filled.

Once each grid is filled, points are awarded for 3 of the same dice face value on any of the paylines in that grid (shown above, there are 5 paylines). Points earned are equal to the face value of the dice on for the payline. Once all 12 combinations have been placed, the amount of points is totalled.

The total points earned by the player are the sum of the points for each individual 3x3 grid.

Wins on separate paylines are added together.

Is the optimal strategy for this game simple to compute? Can anybody give me some pointers in the right direction?

• There are some differences of opinion about how to interpret your question. I, for one, am not sure about the rules of the game because I don't know what is being "ordered" at the outset. What exactly is the "result of the throw": all nine values, sums of three values, subsets of three values? What are the rules and restrictions for "placing" values on the grid? (For instance, can a grid cell be occupied by more than one value?) What is the "face value of the dice": sums of three dice, sums of all nine, or something else? What exactly is a "win line"? Is it related to the line segments?
– whuber
Mar 15, 2018 at 14:48
• If you are rolling 3 dice at a time, how does the 'ordering' work w/i that set of 3? Is it just whichever lands leftmost to rightmost from the thrower's point of view, or can you shuffle those as you like, but the ordering just prevents you from shuffling the rows? When you decide to go for another grid, do I understand correctly that you forever lose the option of using the score from the current grid? Mar 15, 2018 at 15:03
• At stats.stackexchange.com/a/155402/919, I outline a general approach for such games. I believe it may apply here--although the coding would be much more complicated due to the complicated rules of your game.
– whuber
Mar 15, 2018 at 18:19
• It's growing clearer. It might help to abstract the rules a little bit. A "throw" is a random variable with values in the ordered multi-3-subsets of $\{1,2,3,4,5,6\}.$ A decision is a selection of any unoccupied column among the 12 columns in the game. The game therefore can be modeled as an influence diagram in which throws and decisions alternate. So, apply the standard backwards-forwards procedure to work out the optimal decision for any state of the game and result of a throw. The principal complication concerns computing the value of any final state, but that's an easy program to write.
– whuber
Mar 15, 2018 at 18:33
• @gung I believe it's more complex than that. During game play, one is not stopping: one is choosing. The game ultimately is played to completion and optimal play at any stage depends on the prospects across all subsequent decisions. There is a formal relationship--optimal stopping can be expressed in terms of a decision tree where a binary decision is made at each juncture--but the special characteristic of optimal stopping that isn't present here (besides the extreme simplicity of the decisions) is the requirement that exactly one decision to stop may be made.
– whuber
Mar 15, 2018 at 20:32