log in or register to remove this ad

 

5E Dungeons and Dragons puzzle on 538

jaelis

Oh this is where the title goes?
Edit: note the date, this was from May 15 2020.


Nate Silver's 538 site has a weekly math-based puzzle; today it deals with calculating the odds for advantage and disadvantage. Those who have enjoyed playing with that math should check it out!
 
Last edited:

log in or register to remove this ad



TwoSix

The hero you deserve
Supporter
Yea, it was pretty easy as far as Riddler puzzles go, took like 2 minutes on Anydice.
 

CodeFlayer

Explorer
A computational solution (for the fun of it) - enumerate all outcomes for advantage (2d20)

Code:
from __future__ import print_function

#initialize what will be an array of arrays
a = [0]*20

#populate the array with the largest of i or j
for i in range (0,20):
    a[i] = [0]*20 #init
    #populate
    for j in range (0,20):
        a[i][j] =  max(i + 1, j + 1)

#calc average across all values
sum = 0
for i in range (0,20):
    for j in range (0,20):
        sum += a[i][j]

print (sum / 400.0)
python t1.py
13.825
 

Most Liked Threads

Advertisement2

Advertisement4

Top