4
Roll 3 dice, count the two highest two values and add them to the result. Every 1 must be rolled once again.
Now show the average throw after 1000000 tries and the probabilities for each result occurring:
Desired Result:
avg(9.095855)
2: 0.0023
3: 0.0448
4: 1.1075
5: 2.8983
6: 6.116
7: 10.1234
8: 15.4687
9: 18.9496
10: 19.3575
11: 16.0886
12: 9.8433
Still unclear to me: what if I get a 1 and reroll it once again and get a 1 again? – edc65 – 2015-07-05T09:40:56.540
2Are we required to throw random dice, or may we calculate the probabilities directly? – primo – 2012-12-15T06:22:14.683
In the second sentence, do you mean "Every 1 must be rolled once again"? Yeah, I mean, I know you do, but it can be read literally as "or you can leave it if you can't be bothered" and that would result in a shorter algorithm! – Mr Lister – 2012-12-15T17:09:58.700
Random of course, and you're right, must is more fun ;) – Sven – 2012-12-15T18:25:22.940
So, that is roll 3 dice, re-roll the 1s, take away to lowest die, sum the two, and repeat 1mil times? – TwiNight – 2013-01-03T05:34:38.300