2
So I ran into this progressive/idle game cleverly called Idle Dice. Has a variety of random effects applied to a pretty typical progression formula game. Warning, time sink! Play at your own risk.
However after you have 5 dice (summed the usual way) along with some bonuses for various matches (pair, two pair, three of a kind, etc), but after that you eventually get multiplier dice. These five dice are all multiplied against the total rolled by the first five dice and multiplicatively combine with each other.
Even later on you get access to a roulette wheel which can (if it lands on the right wedges) "skip 10 minutes." Sometimes longer, but all intervals are some multiple of 10 minutes.
Your task:
Given the multiplier dice I have, how much will I make when I land on the "skip 10 minutes" wedge of the roulette wheel (figuring I can calculate the 20 minute and 1 hour wedges from there)? We'll ignore any upgraded multipliers and focus solely on the flat base values of each die (incremental games, being what they are, get to obscenely large values in a hurry).
Input
- Five values in any reasonable format. Each value represents the number of faces of each of the five multiplier dice.
- Missing dice can either be explicitly specified (as 0) or left absent, your choice as long as it is made clear how your program accepts it.
- You can assume input values of 0, 2, 4, 6, 8, 10, 12, 20, and 100 will be used.
- For example an input of
[6,6,4,2]
would indicate that there are 2 six-sided multiplier dice, 1 four sided, and 1 two sided, while6 6 4 2 0
would also be acceptable.
How the dice roll
- All ten dice are rolled once a second
- The five base dice are summed
- The sum is multiplied by each of the five multiplier's dice's face value
- That total is multiplied by the score bonus (if any)
The dice
- The five basic (six sided) dice will be assumed all present.
Score bonus values:
We'll assume the following score multipliers (which apply to the face results of the base 5 dice, not the multiplier dice):
- Pair: 2
- Triplet: 7
- Two-Pair: 5
- Four of a Kind: 60
- Straight: 20
- Full House (pair + triplet): 30
- Five of a Kind: 1500
This page has the odds listed out for the likelyhood of any given result, except a straight for some reason, which is 240/7776
(what's called a Large Straight, rather than a Short Straight).
Note: My original test cases were computed using an incorrect value of 2600/7776 odds for a Pair (correct value should be 3600). Given the existing answers, I am not fixing this.
Output:
Compute the expected average total over a 10 minute period (600 rolls) based on the inputs provided, assuming all dice are uniformly distributed. Output need only be accurate to the nearest whole value, but more precision is allowed.
Test cases
Two extra decimal-fractions of precision included for convenience.
[2] -> 111643.52
[4] -> 186072.53
[6] -> 260501.54
[8] -> 334930.56
[10] -> 409359.57
[12] -> 483788.58
[20] -> 781504.63
[100] -> 3758665.12
[2,2,2] -> 251197.92
[4,2,2] -> 418663.19
[6,6,6] -> 3191143.90
[2,2,2,2,2] -> 565195.31
[6,6,6,6,6] -> 39091512.83
[10,8,6,4,2] -> 24177799.48
[100,20,2,2,2] -> 133197695.3
[100,20,12,2,2] -> 577190013.02
[100,20,12,10,8] -> 6349090143.23
[100,100,100,100,100] -> 24445512498226.80
1Note: Before you port the R answer note that it is not meeting requirements (for example the result for
20,20,20,20,20
is off by 1). – Jonathan Allan – 2019-03-02T19:08:04.3972Could you check the results for
100,20,12,10,8
and100,100,100,100,100
? – Jonathan Allan – 2019-03-02T19:37:44.497@JonathanAllan I may have miscalculated when I was writing up the post, double checking... – Draco18s no longer trusts SE – 2019-03-02T20:20:13.093
1@JonathanAllan Corrected. I also noticed a discrepancy in recalculating that I'd mis-typed the odds for a Pair as 2600 (instead of 3600), but given the existing answers I will not be fixing that.
[100,100,100,100,100]
was off only in the last 3 digits,[100,20,12,10,8]
was horrifically wrong. Thanks for the spot-check; those two I'd calculated differently, as the values were so large, and likely made a mistake somewhere. – Draco18s no longer trusts SE – 2019-03-02T20:39:05.083Looks like there may be more miscalculations - see this Python 3 @ TIO (tinyurl used as link too long for comment) - this limits pairs to
– Jonathan Allan – 2019-03-02T21:21:46.0902600
, and finds a "multiplier" of75319.29012345678
(I believe the correct one, with all3600
pairs, to be76805.5555555555 = 600*995400/6^5
)@JonathanAllan Ah, I know what it is. And its my own stupid fault too (sigh (I graduated college and forgot how to Math)). Straights are counted again in the no match count of 720. Option (a) leave the challenge alone or option (b) update all the test cases and invalidate answers. – Draco18s no longer trusts SE – 2019-03-02T21:48:15.483
@Draco18s I believe you should be OK to invalidate answers so long as you comment and notify each answerer. – Giuseppe – 2019-03-04T15:37:55.503