'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward

*Mark Flanagan,Trevor C. Lipscombe, Adrian Northey and Ian M. Robinson*

#### **Abstract**

'Chance all' is a simple 3D6 dice game that explores a player's attitude to risk vs reward. Strategies for playing the game are explored ranging from zero risk to more complex forms of risk, based on an appreciation of the odds; those strategies more likely to win are identified. In addition, the game may be an indirect measure of an individual's bias towards risk vs reward and how that bias alters through the game as the likelihood of winning and losing changes. It can be used as a simple introductory teaching tool for the Gaussian distribution to examine chance and probability, in evolution and computing science, together with psychological aspects of gameplay.

**Keywords:** dice game, stopping game, probability, Pi, normal distribution, winning strategies, risk and reward

#### **1. Introduction**

**'Chance all'** is a new dice game that uses three six-sided dice (3D6). The game proceeds by rounds. Initially, each player has a score of 0. Each player then throws 3D6 and adds the scores from each die, giving their cast, which must lie between 3 and 18. They are free to keep this number for the value of this round (i.e. stop) or to roll again (i.e. Chance all). If the new cast has a value equal to or less than the original cast, the score for this turn is 0, and the next player takes their turn. If the new cast exceeds the value of the original cast, the player adds the scores for the first and second casts together. Again, the player is invited to stop or to continue to 'Chance all', with the score being added to the previous value provided it is greater than the last cast. If it is equal to or less than the last cast, then the value for this round is 0, and the next player has their turn. This cycle of pushing their luck continues until the player feels ready to stop, or loses all scores this round. The next player repeats the procedure for their turn until all players have had their go in the round. In subsequent rounds, the value from the preceding round is the starting value and either zero or the value for the turn is added on, giving a cumulative score round by round. The game continues until the first player exceeds a cumulative score of 100 and is declared the winner. If, in the same round, more than one player exceeds 100, the player with the highest

cumulative total wins. A flowchart for the game is presented in Appendix 1. The starting player in each round can be rotated in a clockwise manner to avoid any bias. This simple game has a rich complexity that is explored in the sections below.

#### **2. Investigating the results from 3D6**

As the game involves rolling 3D6 dice and adding the scores to give a total value for the cast (the throw), the probability distribution involved can be investigated by a number of methods. First, one can simply count the outcomes for three dice. The first record of this in literature appears to be a reference dating to 1678, due to Strode [1]. The total number of throws that yield a given 3D6 cast from 3 to 18 is shown in **Figure 1**, and counting each 3D6 result gives values that match Strode.

An analytical way to determine the probability distribution for rolling n 1D6 dice (where n is the number of 1D6 dice to be thrown) is via the expansion of

$$\left(\mathbf{x} + \mathbf{x}^2 + \mathbf{x}^3 + \mathbf{x}^4 + \mathbf{x}^5 + \mathbf{x}^6\right)^{\mathrm{n}} \tag{1}$$

Each coefficient A in the series expansion below (i.e. A.xm) represents the number of throws that gives the cast value m, where n≤m≤6n. In the case of 3 dice, n = 3 and the expansion is

$$\begin{aligned} \left(\mathbf{x} + \mathbf{x}^2 + \mathbf{x}^3 + \mathbf{x}^4 + \mathbf{x}^5 + \mathbf{x}^6\right)^3 &= \mathbf{1}\mathbf{x}^3 + \mathbf{3}\mathbf{x}^4 + \mathbf{6}\mathbf{x}^5 + \mathbf{10}\mathbf{x}^6 + \mathbf{15}\mathbf{x}^7 + \mathbf{21}\mathbf{x}^8 + \mathbf{25}\mathbf{x}^9 \\ + 27\mathbf{J}\mathbf{x}^{10} + 27\mathbf{J}\mathbf{x}^{11} + 25\mathbf{J}\mathbf{x}^{12} + 2\mathbf{1}\mathbf{x}^{13} + \mathbf{15}\mathbf{x}^{14} + \mathbf{10}\mathbf{x}^{15} + \mathbf{6}\mathbf{x}^{16} + \mathbf{3}\mathbf{x}^{17} + \mathbf{1}\mathbf{x}^{18} \end{aligned} \tag{2}$$

Strode's value, and counting from **Figure 1** for a cast of 8 with 3D6, gives 21 different ways of achieving this total. This can also be found by inspecting Eq. (2) for the coefficient A in the series where m=8 i.e. 21.�<sup>8</sup> , which is in agreement. Further mathematical methods to derive the coefficients for 3D6, such as combinatorial or recursive techniques, are explored more fully by McShane and Ratliff [2], and these give the same results above. For brevity, they are not reproduced here.

The counting method given in [1], from **Figure 1**, and from the probability generating function method [2] above all agree. The number of throws for each cast from 3 to 18 for 3D6 is given in **Table 1**, together with the probability for each throw expressed as both a fraction A/216 from the definition above in Eq. (2), and as a percentage to 1 dp. Finally, in the last column, the probability of a throw being greater than a given cast is indicated. This is the sum of all possible outcomes higher than the given value, and it is expressed both as a reduced fraction and as a percentage to 1 significant figure, calculated in **Table 1**. As an example, a cast of 8 has 21 possible throws, and it has a probability of 21/216 (9.7%). The chance of getting a cast greater than 8 in a subsequent throw is 20/27 (74.1%).

**Figure 2** visually resembles a Gaussian distribution, an observation explored more fully later by statistical analysis. **Figure 3** shows the probability of throws exceeding a cast against a given 3D6 cast.

Knowledge of the data in **Table 2** and **Figures 2** and **3** clearly allows a player to make more informed choices on whether to stop or to continue to 'Chance all' each *'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

#### **Figure 1.**

*The 216 different chances from 3D6. The number in bold shows the individual 1D6 rolls, with the resulting 3D6 cast in normal text.*


#### **Table 1**.

*3D6 casts, the total number of throws that yield this value, the fraction and probability of the throw (% to 1dp). Finally the fraction and probability of the cast being exceeded (% to 1dp).*

**Figure 2.**

*Histogram of 3D6 casts vs throws, by plotting the data from Table 1.*

round, based on their most recent cast. 3D6 casts are discrete whole numbers ranging from 3 to 18, rather than being a continuous function. Exploring the distribution seen in **Figure 2** with statistical methods is instructive. The Gaussian distribution is a continuous function given by

*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*


#### **Table 2.**

*3D6 casts from run 8 in the tournament showing each cast. Those shown in bold have a cast equal to or less than the preceding cast and consequently, score zero for that round.*

#### **Figure 3.**

*Histogram of 3D6 casts vs probability of throws exceeding the indicated cast value, by plotting column 1 against column 4 from Table 1.*

$$f(\mathbf{x}) = \frac{1}{\sigma\sqrt{2\pi}} \exp^{-\frac{1}{2}\left(\frac{x-\mu}{\sigma}\right)^2} \tag{3}$$

where *μ* is the mean of the distribution and *σ* is the standard deviation. One way to test whether a dataset conforms to the Gaussian distribution is to perform an Anderson-Darling statistical test [3]. The data are plotted against a theoretical normal distribution in such a way that the points should form an approximately straight line when plotted using a normal probability plot. The data in **Table 1** were tested using the Anderson-Darling function using the statistical program Minitab v19 [4], and the results are plotted in **Figure 4**.

The red line indicates the probability expected from the data if it conformed to the Gaussian distribution derived from the data shown as dots, both on a normal probability plot. As can be seen in **Figure 4** the Gaussian distribution is a good approximation to the data between casts 5 to 16, with the low and high tails lying off the predicted normal probability. The P value for the Anderson-Darling test (0.009) confirms the data is not Gaussian; nonetheless, apart from the low (<5) and high casts (>16),

**Figure 4.** *Anderson-Darling test performed on throws corresponding to casts from 3D6.*

it conforms well. The mean value is 10.50, the standard deviation is 2.96, the skewness is 0.00 and the kurtosis is 0.40, all to 2dp. The skewness value confirms the data is equally distributed about the mean. The kurtosis value [5] confirms the data is platykurtic, meaning it has 'thinner' tails than expected from a Gaussian distribution, given that 3D6 casts are discrete and cannot physically be less than 3 or greater than 18. The Gaussian distribution is continuous and given *σ* = 3.0, the 3*σ* levels at a probability of 0.3% on either side of the mean would require dice rolls of 1.5 and 19.5, which is not possible with 3D6. Nonetheless, 3D6 serves as a readily available means of generating 'Gaussian like' data in a classroom setting, which should serve as introductory teaching and provide a good basis for the game, assuming the dice are 'fair' inasmuch as the result of each dice is random in nature, with the Chi-squared statistical test as a means of detecting bias in the distribution in repeated dice rolls. In addition to physical dice, electronic dice rollers are readily available, such as Google Dice [6], which the authors have checked against the Chi-squared test, with no bias detected. Electronic dice rollers use a pseudorandom number generator (prng), such as xorshift128+ [7] or the Mersenne Twister [8], to generate the dice results. References based on the Diehard Tests are presented in Appendix 2 to check the randomness of prng's. Alternatively, the decimal number sequence of *π* provides a ready source of random numbers and has passed numerous statistical checks [9–13] to this effect. It is readily available [14], and converting it to a suitable form for dice casts used in the game is discussed in Appendix 2.

### **3. Probability and psychology or risk vs reward**

**'Chance all'** can be considered to be a stopping problem in a gambling sequence to gain a benefit each round that leads to winning the overall game. Thus, knowledge of the probabilities in the game as outlined in Section 2 is helpful for a smart player, whereas a naive player will play the game intuitively. Set against the random process in the game, which is 'Gaussian-like,' and the inherent risks this causes is the psychology of an individuals sense of risk vs reward.

Stopping games have their own literature [15–20] and are used in gambling, economics and control theory. The solutions to each game or system tend to be unique to the game being played and concentrate on defining an algorithm that seeks to balance

#### *'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

the reward vs the risk or probability of continuing to gamble. Being mathematical solutions, these tend to remain constant throughout the game.

Games are played by people rather than algorithms, and as a counterpoint, there are papers that examine the game from a psychological perspective, as perception of risk changes depending on how far away or close you are to winning, or where you appear in the pack of players. Notably, Liu et al. [21] described an interesting concept. Repurposing their lemma 1 to 'Chance all', for each round of the game R, there is a unique benefit threshold, Bt, such that the player will stop if Bt is matched or exceeded, or roll the dice if the cast is less than Bt. In addition, they note the benefit threshold may decrease as the current winning player gets closer to the winning level, as the player seeks to consolidate gains and their position. Likewise, a player who is losing may well accept more risk and increase Bt as the game progresses in order to overtake the player in the lead. Consequently, a player may change Bt throughout the game depending on their position in the pack, and the process of the game may dominate their sense of risk vs reward. This may well also be altered by age and experience. Younger students may be affected by playing with dice themselves, their sense of dice 'fairness', and their belief in non-physical parameters. Watson and Mortiz [22] quote earlier studies suggesting that some students place agency on God, fate or mental powers to determine dice outcomes, rather than accepting dice casts as a random process. Adults are known to be prone to the gambler's fallacy [23, 24] a well-understood phenomenon that can be described as apophenia. Some players in a game believe that if a particular event occurred more frequently than normal during the past it is less likely to happen in the future. This is not true in a game where the outcome is random and is perhaps due to cognitive bias and a failure to appreciate the logic of random behaviour. Silverman et al. [25] noted that in 200 consecutive coin tosses runs of at least 6 heads or 6 tails are to be expected. In *π*,the string of digits 12345 occurs after the decimal place 49,702. Thus low-odds events are to be anticipated in a random long sequence. There is also the propensity to hot hand [26], where people who have correctly guessed a short sequence of random draws in a game believe they can continue to do so. Hot hand is thought to be caused by the illusion of control and that individuals can influence or have pre-knowledge over random events. Clearly, people of all ages are complex in their beliefs and decision-making. Perhaps simple algorithmic approaches that are consistently applied against people as players might fare well in 'Chance all'. Strategies that could be employed every round but which are independent of personal judgement and involve a benefit threshold Bt might include:

#### **3.1 Zero risk**

3D6 is thrown and the cast is accepted regardless of the outcome, and no further throw is made that round. In this sense, Bt is 3 for every round and the cast is accepted. Such an approach is likely to be suboptimal if a very low cast is made given the high probability of exceeding it. It is however a zero-risk approach.

#### **3.2 Single risk**

3D6 is thrown with a given cast. Regardless of this value, another throw is made. If the second cast is equal to or less than the first cast the score for that round is zero. If not, the player stops, adds the two casts together and no further throw is made this

round. One could say that Bt = 19 using this method. Clearly, such an approach is sub-optimal if 18 is cast in the first round, guaranteeing failure in the second.

#### **3.3 Double risk**

3D6 is thrown with a given cast. Regardless of this value, another throw is made. If this second cast is equal to or less than the first cast, the score for that round is zero. If not, the player makes another throw. If this third cast is equal to or less than the second cast the score for that round is zero. If not, add the three casts together and no further throw will be made this round. Again, one could say that Bt = 19 using this method. This approach is sub-optimal if 18 is cast in either the first or second round, guaranteeing failure in subsequent throws.

#### **3.4 Fixed risk**

A unique critical benefit level, Bt is defined before the game starts such that 3 ≤ Bt ≤ 17, and is held constant throughout the game. 3D6 is thrown with a given cast and is compared to the defined Bt. If the cast matches or exceeds Bt the player stops. If the cast is less than Bt, another throw is made with a given cast. If the second cast is equal to or less than the first cast the score for that round is zero. If not, the player stops, adds the two casts together and no further throw will be made this round. Bt can be gauged from a careful appreciation of Section 2. If Bt were set to 10, then 50% of casts would be expected to exceed the value, making it equally likely to succeed or fail.

#### **3.5 Tapering-down risk**

A unique critical benefit level, Bt is defined before the game starts such that 3 ≤ Bt ≤ 17, and is steadily reduced throughout the game by using Bt - R, where R is the round in the game, starting at 1 and increasing by 1 each round. 3D6 is thrown with a given cast and is compared to the defined Bt - R for that round. If the cast matches or exceeds Bt - R, the player stops. If the cast is less than Bt - R, another throw is made with a given cast. If the second cast is equal to or less than the first cast the score for that round is zero. If not, the player adds the two casts together. Further casts can be made this round in a similar manner until the threshold for stopping is reached or the cast is equal to or less than the previous cast in the process when the score for that round is zero. If Bt were set to 13, then the threshold for round 1 would be 13-1 = 12 and 26% of casts would be expected to exceed the value, making it likely that another cast is made at the beginning. By the time round 5 was reached, the threshold would be 13-5 = 8, and 74% of casts would be expected to exceed the value, making it less likely that more casts are made at this stage. This mimics being eager for reward and accepting the risks initially, but reducing the chances of failure as the game goes on at the expense of likely gains. This matches Liu et al.'s [21] observations on human behaviour for a winning player.

#### **3.6 Ramping-up risk**

A unique critical benefit level, Bt is defined before the game starts such that 3 ≤ Bt ≤ 17, and is steadily increased throughout the game by using Bt + R, where R is the round in the game, starting at 1 and increasing by 1 each round. 3D6 is thrown with a

*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

given cast and is compared to the defined Bt + R for that round. If the cast matches or exceeds Bt + R, the player stops. If the cast is less than Bt + R, another throw is made with a given cast. If the second cast is equal to or less than the first cast, the score for that round is zero. If not, the player adds the two casts together. Further casts can be made this round in a similar manner until the threshold for stopping is reached or the cast is equal to or less than the previous cast when the score for that round is zero. If Bt were set to 7, then the threshold in round 1 would be 7+1 = 8 and 74% of casts would be expected to exceed the value, making it less likely that another cast is made at the beginning. By the time round 5 was reached, the threshold would be 7+5 = 12, making it more likely that more casts are made at this stage. This mimics being risk averse initially, then increasing the chances of increasing gain at the expense of failure as the game goes on. This matches Liu et al.'s [21] observations on human behaviour for a losing player eager to win.

To test these strategies, a tournament was made for strategies A-F using the suggested Bt levels for the fixed, tapering and ramping risk approaches. The confidence interval (CI) for a value depends upon the number of measurements made

$$CI = \underline{\mathbf{x}} \pm \mathbf{z} \,\, \sigma / \sqrt{n} \tag{4}$$

where *x* is the mean, z the confidence interval level, *σ* the standard deviation and n is the number of measurements. Beyond a certain number of measurements, there is reduced benefit in repeated sampling, so the number of trials was fixed at 20, and the confidence interval was set at the 95% level, giving z = 1.96.

The value for all the 3D6 dice rolls in the game and the final scores for each strategy were recorded. An example game is shown below, using Google roll dice [6] as the means of generating casts. For each game, the strategies were run together, and the game stopped when a winning strategy was found.

**Table 3** is plotted below in **Figure 5** and shows the game sequence for this run.

As can be seen, ramping risk won this game, with fixed risk second, tapered risk third, zero risk fourth and single and double risk in second to last and last place respectively. This run demonstrates the strengths and weaknesses of each of the defined strategies. Zero risk steadily gains, but at a slower rate than riskier strategies and fails to win. Single risk failed to score in rounds 1, 4, 5 & 7. We leave it to the reader to decide whether they would have continued after the first cast, but clearly


#### **Table 3.**

*Cumulative sum of 3D6 casts from run 8 in the tournament for each round, by adding the results from each round shown in Table 2 above. Ramping risk won this run by exceeding the target of 100.*

**Figure 5.**

*Cumulative scores from run 8 in the tournament for zero risk, zr (green); single risk, sr (orange); double risk, dr (red); fixed risk, fr (blue); tapering risk, tr (purple) and ramping risk, rr (black). Data plotted from Table 3.*

automatically rolling again can fail. Double risk failed to score in rounds 13, and 47, and scored the lowest overall of all the strategies. Fixed risk, with Bt = 10 always scored and outperformed the three strategies above. Setting Bt = 10 meant on only one occasion a second cast was required in round 6, which paid off. Tapering risk failed to score in the first round, but scored in all subsequent ones, with round 2 being especially successful. The final cast in this sequence exceeded the Bt for that round (13-2 = 11) thus stopping the sequence. It finished just above fixed risk in this sequence. Ramping risk failed to score in rounds 4 & 6 but won the game. In round 6, three strategies were close in cumulative score (73 to 76) and yet the ramping risk won because the Bt threshold had risen (8+6) = 14, and the final cast exceeded the stopping value. This run is illustrative of the various methods, but the true test for each strategy comes from repeated runs where the odds even out. **Table 4** shows the final scores when the game ended after 20 runs, together with the mean and standard deviations, and the number of times each strategy won.

The mean and standard deviations from **Table 4** allow the calculation of the confidence interval for the mean from Eq. (4) showing the range at 95% confidence levels. Also shown is the number of times the strategy was winning in the tournament. The most successful strategies in terms of wins and average score per round across all the tournaments were ramping risk (35% wins & 12.3), tapering risk (30% wins & 12.7) and fixed risk (10% wins & 12.8), followed by zero risk (5% wins & 10.4), then single (20% wins & 9.6) and double risk (0% wins & 4.5). Ramping risk won the runs most times, just ahead of tapering risk. The confidence intervals show there is no significant difference for the top three strategies (ramping, tapering and fixed risks) in terms of mean final score and standard deviation, and this is confirmed by t-testing (P = 0.52) [27]. There is a significant difference between these three highest scoring strategies to the next highest strategies (zero risk and single risk) as determined by a ttest. Finally, these strategies are significantly different to the poorest strategy (double risk) as determined by a t-test (P = 0.0004). All the top winning strategies are willing to roll the dice twice or more based on the odds from the initial dice roll, which distinguishes them from double risk, which throws regardless of the odds. Ramping risk has a rising Bt throughout the game, which pushes the number of double or triple rolls on as the game is played ('Who Dares Wins') and this was clearly successful a number of times with the strategy overtaking others at the end. Conversely, tapering risk takes its chances early then swings to a conservative strategy as the round


*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

#### **Table 4.**

*Final scores for strategies A*�*F after 20 runs in the trial. Scores in bold indicate the winning total for that trial. x (σ*Þ *are the mean and standard deviation in brackets.*

progresses, tending to almost a zero-risk approach at the end. If there are enough early gains to consolidate a lead in some games it may win, although early failures condemn this strategy to lose that run. Fixed risk does well in terms of average score, but wins less often against the other two riskier strategies. It outcompetes zero risk, which fails to accept the risk of rolling twice, and only succeeded once (5% of runs). Single risk had a highly variable track record, winning 20% of the games but sometimes failing to score well at all. This contrasts strongly with fixed risk, which has a similar strategy but is based on a careful appreciation of the odds. Nonetheless, single risk won 20% of games and fixed risk 10% of games. To examine this further, Appendix 3 presents a probability analysis for the expected average score per round for zero risk (Bt = 3) and fixed risk (4 ≤*Bt* ≤18). This explains why fixed risk, if Bt is chosen carefully, is a superior strategy to zero risk, which must yield on average a cast per turn of 10.5. The analysis suggests that Bt = 11 is optimal, yielding an average score per round of 13.3 to 1dp. It also suggests why ramping- and tapering-risk strategies work well since their

**Figure 6.**

*Probability for 1433 3D6 casts using Roll Dice Google app [6] in the game, compared to the underlying counted distribution for the 216 combinations of 3D6 given in Table 1. This passes the Chi-squared test.*

Bt values straddle the maximum central portion on average score per cast. From this, it is possible to select algorithmic strategies to compete in tournaments with people, with zero risk and fixed risk at Bt = 11 suggested. These observations are only valid if the process of rolling 3D6 to obtain casts is random and is thus unbiased (**Figure 6**). To confirm this, every 3D6 cast in the tournament (1433 in total) was counted for the number of times 318 occurred, allowing their probability distribution to be calculated and compared to the underlying distribution shown in **Table 1**.

Owing to the nature of randomness, one should never expect a random number sequence to exactly match a theoretical calculation. These data, though, suggest that Roll Dice [6] by Google is an acceptable means of generating random dice rolls and suitable for the game. It also validates that the repeated tests of the 20 runs of the game are unlikely to be biased and so the conclusions regarding the game strategies are sound.

#### **4. Adaptation to an educational setting and trials by players**

In terms of education, the game can be used in support of the mathematics curricula on elementary probability and statistics. One simple way to do this in a class of 30 students is to divide into 6 groups of 5 students and play the game without teaching any of the underlying mathematical structures. Each group records all the individual 3D6 casts and tracks the cumulative scores in the game. Once the final round has occurred and a winner is found, the group tabulates a histogram of their 3D6 casts and compares it to the underlying distribution shown in **Table 1** and **Figure 2**. It typically takes 8 rounds or more to complete the game, so this is likely to be at least 40 casts, with more likely using double casts. This is some way short of the 216 possible casts expected from 3D6 to give the full distribution. For example, histogramming the data in **Table 2** gives the graphs shown in **Figure 7**.

Each group is asked how the histogram compares to the expected 3D6 pattern and whether the 3D6 casts are a fair representation, given that the chance of a 3 or 18 cast is low. Each of the six groups in the class then pools their casts, resulting in a deeper data pool of some 240 to 300 casts. This histogram is then compared to the underlying distribution. After this stage, teaching about the expected probabilities in the game can help alter perceptions, and the students repeat playing the game. After each group plays again, they histogram their new 3D6 casts and add these to the first set for comparison

*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

**Figure 7.**

*Probability for 71 3D6 casts from Table 2 using Roll Dice Google app [6] in the game, compared to the underlying counted distribution for the 216 combinations of 3D6 given in Table 1. A t-test reveals no significant difference between the mean (std dev) of 9.90 (2.50) to the underlying mean (std dev) of 10.50 (2.96). This passes the Chisquared test.*

with the fundamental distribution, with about 120 casts available. Pooling all the groups' data pools together and histogramming should result in an experimental set of data closer to the expected shape, more akin to **Figure 6**. It is also instructive to question students whether they changed their perception of the game having been taught about the underlying probability and the nature of risk vs reward.

The game can also be used to explore inheritance, variation and evolution in the biology curriculum using genetic algorithms [28], and in the computing curriculum as an example of a search algorithm. Suppose we define a single Bt value for each of ten rounds to complete the game, with each unique Bt created by rolling a 3D6 and using the cast as the value for that round such that 3 ≤*Bt*≤ 18. Having done this 10 times, the string of Bt values represents a genetic algorithm, with the value for each Bt in the round representing the 'allele' for the gene, and its position is the location within the 10-step 'chromosome'. The whole sequence gives the 'genotype', with the sequence result in the game representing its fitness i.e. its 'phenotype' against a 'natural selection' process (i.e. the 'Chance all' game). By randomly creating say 4 such genotypes, the game is played, and the top two winning genotypes are selected to go through, creating new 'offspring' by the processes of recombination and mutation, before entering competition again with the previous top two genotypes. The process is repeated and the students can see the process of evolution occur over a number of different rounds. To illustrate this the following example is given.

First, four genotypes each with unique chromosomes were created via 3D6 casts giving the Bt value for each round in the 1st generation. Note there is nothing unique to these sequences.


#### *Game Theory - From Idea to Practice*


One might expect 'genotype 4' to struggle in the game given the very high Bt thresholds in the early rounds, created by random chance given the expected average scores associated with Bt levels discussed in Appendix 3. The game was played using each of these Bt values each round to determine whether to continue to roll if the cast was beneath Bt or to stop if the cast matched or exceeded Bt. The individual scores in each round were:


Scores that failed the test of 'Chance all' are shown in **bold**. This led to final cumulative scores of genotype 1 = 100, genotype 2 = 82, genotype 3 = 95 and genotype 4 = 47. Since the selection test criteria of 'Chance all' were met after 8 rounds (or trials of the genotype), the last two 'chromosomes' of all genotypes were untested and could be described as redundant in this game, and latent in the process until a game that lasts 10 rounds is played. The first (genotype 1) and second (genotype 3) placed genetic algorithms in the game are judged to have passed the fitness for survival of the 'phenotypes' from their 'genotypes'. As expected, genotype 4 failed to win against the natural selection test of 'Chance all', due to the failure of the first three 'genes' to score: It went extinct, along with genotype 2. Genotypes 1 and 3 were selected to continue to 'evolve'. Rolling a 1d6 and using 1–3 by selecting the top 5 'genes', or 4–6 the bottom five 'genes' in the phenotype for recombination allows the 'children' to be created from their parents. In this example, a 3 was thrown, which resulted in the top five chromosomes being exchanged. Each of these five was then tested for mutation, with a 1D6 roll of 1 decreasing the Bt level by 1, 2–5 keeping them the same, and a roll of 6 increasing the Bt level by 1. The new genotypes or children, 5 & 6 are shown alongside the survivors from the first round, their parents, 1 & 3 in the second generation of the process. The children 5 & 6 have swapped the top five chromosomes shown in blue over with the other parent but kept the last 5 the same. The top five alleles underwent mutation by the process described above, with some increasing or decreasing in value by 1. These are shown in the following tabular runs by **bold** numbers, and unchanged values in normal font.


*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

These 4 genotypes were then entered into the game as the 2nd generation, and the top two were selected by the test of the game mimicking natural selection as before. Cumulative scores for the 2nd generation after 7 rounds were genotype 1 = 110, genotype 3 = 72, genotype 5 = 100 and genotype 6 = 89, and so 'genotypes' 1 & 5 were selected as parents to the 3rd generation in the game. Recombination this time resulted in the bottom 5 'chromosomes' being exchanged, and after the mutation stage the next generation were


Note that the last five 'genes' for genotypes 1 & 5 are identical, but the process of mutation has altered them in their 'children', genotypes 7 & 8. Again, the test continues with the cumulative scores for the 3rd generation after 7 rounds being genotype 1 = 45, genotype 5 = 75, genotype 7 = 96 and genotype 8 = 103, and so 'genotypes' 7 & 8 were selected as parents to the 4th generation in the game. Note that no original genotype has now survived, and the 4th generation has evolved away from the 1st generation, but traces of the same gene sequences persist. The process of the game can continue for as long as required to teach the process of inheritance, variation, and evolution. One way of examining the effect of a change in climate on evolution in biology using this method would be to split a teaching class into groups to explore 'Chance all' by genetic algorithms as explained, but allow one of the groups to add +1 to each 3D6 roll mimicking a 'hotter climate' and another group to subtract 1 to each 3D6 roll mimicking a 'colder climate', and see the results each group come up with over a suitable number of generations. This would demonstrate the effect of local adaptation to conditions, with the 'hotter climate' 3D6+1 expected to evolve increased values of Bt in the genotype, and the 'colder climate' 3D6-1 expected to evolve decreased values of Bt in the genotype by the same processes of recombination and mutation to reflect the additional dice rolls. Roll dice [6] supports adding a modifier via a toggle to the basic cast on the right hand side of the dice option.

In terms of teaching computing, the genetic algorithm approach allows for 16 separate values for Bt for each 'allele' or position in the sequence, giving a search space in the order of 1016 possible combinations with 10 run positions. The genetic algorithm approach explores the possible optimal solutions relatively cheaply with no understanding of the underlying complexity of the mathematics in the game, but yet delivers viable solutions, and so is quick and cheap to implement.

Our tests of playing the game as individuals playing naively without an underpinning strategy tend to support the observations of Liu et al. [21] in that the desire to keep pushing your luck decreases for a current winning player as they get closer to the winning level of 100. Likewise losing players accept more risks as the game progresses in an attempt to try to overtake the leading player. This occurs in a game with open and symmetric information where all players can see the scores as the game progresses. Our experience of playing suggests the psychological aspect could be explored in further studies, including a measure of an individual's sense of risk vs reward. Contrasting play under open and symmetric information (all players see each other's casts), to asymmetric information (one player sees all casts, but the others know only their own) and closed and symmetric information (players only know only their own) would be interesting as the following method suggests. There are 4 players in each team, Red 1 to 4 and Blue 1 to 4, with Red 4 and Blue 4 following a zero risk methodical approach by rolling 3D6 once per round and no more (in effect dummy hands). All other players are free to pursue their own strategy.

The game proceeds in stages with the following matrix of information access and sharing.

*'Chance all' – A Simple 3D6 Dice Stopping Game to Explore Probability and Risk vs Reward DOI: http://dx.doi.org/10.5772/intechopen.105703*

In stage 1, the game is played open (all dice rolls are declared by all players in public) and symmetric so the information is equal. The target score is set for 100. In stage 2, the game is played both open (all dice rolls by the Blue players are declared in public) and closed (all dice rolls by the Red players are hidden), leading to asymmetry in information. The target score is reduced to 90. In stage 3, the game is played both open (all dice rolls by the Red players are declared in public) and closed (all dice rolls by the Blue players are hidden), leading to asymmetry in information. The target score is reduced to 80. In stage 4, the game is played closed (all dice rolls are hidden by all players) and symmetric so the lack of information is equal to all parties. The target score is set to 70. The game ends after 4 stages. After each stage, one player is eliminated from the game by following these additional rules.


Everyone will want to win, and no one wants to be last in their group for fear of the group losing and being eliminated, and this threat on the weakest player in the losing group each stage keeps the pressure on to succeed. The information access and sharing and the reduction in target scores stage by stage create additional pressures for the players to explore. In the latter two modes of play, players declare if they have met the victory conditions at the end of each round. These alternatives to open play have the effect of making players uncertain of their ranking in the game as it progresses, and our experience is it tends to make players more risk-tolerant, for fear of losing. Controlled competitions with careful selection of the players using a 2 level factorial designed experiment for the variables of age and gender might be used to see if there is a bias in the game.

#### **5. Conclusions**

'Chance all' is a simple game to play with a surprising degree of mathematical structure. In addition, the game lends itself well to supporting teaching the curriculum in mathematics directly, and in biology and computing through the adoption of a genetic algorithm approach to playing the game. As such, it tests players'sense of risk vs reward and has a psychology to it that matches well with previous observations in similar games and settings. We have explored the game in an algorithmic manner and suggested optimal strategies based on the underlying probability described in Appendix 3. These can be tested against real players as optimised strategies, with Bt = 11 being suggested.

Chess computer programs work because the game is played by logic. 'Chance all' is a game based on random chance with known probabilities. Can an algorithm be created to beat people's intuition in an uncertain game? Further studies may give clearer answers to this question.

Different forms of the game are of course possible, based on the dice used. nDS dice have n = number of dice, and S = sides to each dice. 3D6 is the minimum that gives a

Gaussian-like distribution, for the smallest number of casts making the game as simple as possible, which is especially useful when considering its applicability to education.

'Chance all' takes moments to learn, yet its mathematical complexity and subtlety pose problems that provide fruitful avenues for further research, rather like other well-known mathematically rich games, such as Go, backgammon, and chess.
