Flavour: ass hand probabilities.

May 31, 2012 04:53

For my crude records, this is the crude script I wrote to finally calculate the probabilities of hands of the asses in the Ass Hall (in case I need to do this another time to confirm):



from itertools import product, combinations
cards = list(product(['10', 'J', 'Q', 'K', 'A'], ['C', 'M', 'S', 'L']))
hands = list(combinations(cards, 5))
pair = twopair = three = straight = house = four = flush = 0
for hand in hands:
ranks = [r for r, s in hand]
suits = [s for r, s in hand]
if ranks[0] != ranks[1] != ranks[2] != ranks[3] != ranks[4]:
if suits[0] == suits[1] == suits[2] == suits[3] == suits[4]:
flush += 1
else:
straight += 1
else:
for r in ranks:
if ranks.count(r) == 4:
four += 1
break
elif ranks.count(r) == 3:
c = ranks
while r in c:
c.remove(r)
for left in c:
if c.count(left) == 2:
house += 1
break
else:
three += 1
break
break
elif ranks.count(r) == 2:
c = ranks
while r in c:
c.remove(r)
for left in c:
if c.count(left) == 3:
house += 1
break
elif c.count(left) == 2:
twopair += 1
break
else:
pair += 1
break
break

To reiterate, there are five ranks (10, J, Q, K, A) and four suits (Clubs, Mattocks, Sequins, Lungs).
So the analysis yields this:
Total possible hands: 15,504
By hand:
pair: 10,560
three of a kind: 1,950
two pair: 1,440
royal straight: 1,020
full house: 480
four of a kind: 80
royal flush: 4

The surprising tidbit here is that three of a kind in this subset of cards is more common than two pair. Because of that, I had to swap their consequences in the Ass Hall. But also of interest is confirming the high probability of a pair, the occurrence resulting in no consequences that I now see is quite justified and makes me feel very comfortable with the balance of this feature; after all, you have better than a two-thirds chance of escaping the Ass Hall with no trouble at all, and only 0.026% chance of drawing the (99 times out of 100) deadly royal flush.

Getting four of a kind is actually a good thing; the first time you get it per game, you even get an artifact. Given the low probability, though, I might have to tweak the artifact a touch, although I like it as it is.

So damn late.

the flavour of eternity

Previous post Next post
Up