Zed's Monte Carlo Simulation

The unique One Ring rules set invites tinkering and secondary creation. Whilst The One Ring works brilliantly as written, we provide this forum for those who want to make their own home-brewed versions of the rules. Note that none of these should be taken as 'official'.
User avatar
zedturtle
Posts: 3289
Joined: Sat Mar 22, 2014 12:03 am

Zed's Monte Carlo Simulation

Post by zedturtle » Sun Nov 13, 2016 7:56 pm

So the questions of success chances comes up quite often. Here's a breakdown of your chances to get a basic success:

Code: Select all

DICE       TN 10    TN 12    TN 14    TN 16    TN 18    TN 20    TN 22    TN 24
0          16.66     8.33     8.33     8.33     8.33     8.33     8.33     8.33% 
1          45.84    29.16    16.66     9.71     8.33     8.33     8.33     8.33%
2          74.06    58.34    41.91    27.30    16.44    10.65     8.57     8.33% 
3          92.01    82.64    69.46    54.15    38.85    25.70    16.32    11.03% 
4          98.36    95.05    88.56    78.38    65.19    50.43    36.22    24.38% 
5          99.77    99.01    96.93    92.54    85.03    74.35    61.19    47.15% 
6          99.97    99.85    99.39    98.08    95.16    89.80    81.54    70.49% 
And here's the same range if you're Weary:

Code: Select all

DICE       TN 10    TN 12    TN 14    TN 16    TN 18    TN 20    TN 22    TN 24
0          16.66     8.33     8.33     8.33     8.33     8.33     8.33     8.33% 
1          37.50    25.01    16.66     9.71     8.33     8.33     8.33     8.33%
2          57.39    43.75    31.26    20.12    14.57    10.65     8.57     8.33% 
3          72.58    60.44    47.72    35.22    26.05    18.06    12.83    10.45% 
4          82.99    73.45    62.62    50.84    40.06    29.71    21.65    16.21% 
5          89.73    82.80    74.51    64.56    54.06    43.21    33.51    25.54% 
6          93.91    89.18    83.25    75.43    66.41    56.38    46.41    37.08% 
How the numbers were generated:

Due to the nature of how the Feat die works, doing the math directly gets to be a little tricky. Instead, I wrote a program that would test a number of rolls for each TN level and each dice level. Each iteration (each percentage in the charts above) is the result of the computer making a million rolls and then averaging the results. It isn't mathematically perfect, but it's really, really close and hopefully will help folks out when they're trying to tweak things.
Jacob Rodgers, occasional nitwit.

This space intentionally blank.

Glorelendil
Posts: 5160
Joined: Mon Jan 13, 2014 5:20 pm

Re: Zed's Monte Carlo Simulation

Post by Glorelendil » Sun Nov 13, 2016 9:12 pm

Thanks, Zed!

Hmmm...opportunity to create something visual here, for a gestalt feel of the whole thing. Mostly because I really like building things with d3.js.

What are all the variables we might want here? You've got the big three: skill, TN, and Weary.
What about...
1) Probability of great/extraordinary success
2) Impact of Advantage/Disadvantage (D&D term for "Roll 2 Feat Dice and take highest/lowest)
3) Success rate if Hope is spent? (Needs an input of what the attribute level is.)
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

User avatar
zedturtle
Posts: 3289
Joined: Sat Mar 22, 2014 12:03 am

Re: Zed's Monte Carlo Simulation

Post by zedturtle » Mon Nov 14, 2016 2:36 am

Man this is blowing my mind... I think my code is good, but when I decided to start calculating Great Successes, I'm getting a weird result.

For example, my program is finding that it has a 7.65% chance to achieve a Great Success against TN 10 with one die. That sounds like it's in the right range... you've got to roll a 10 or a Gandalf and then roll a 6 on the Success die.

But when I process the same set of rolls that generated that number for Weariness, the chance goes up to 11.12%. Again, I'm counting the same number of rolls, and I'm not re-rolling anything. In theory, turning the 1s, 2s, and 3s on the Success die into 0 should not affect anything. So either I'm having a stupid moment when it comes to the math, or I'm having a stupid moment when it comes to the program.
Jacob Rodgers, occasional nitwit.

This space intentionally blank.

User avatar
zedturtle
Posts: 3289
Joined: Sat Mar 22, 2014 12:03 am

Re: Zed's Monte Carlo Simulation

Post by zedturtle » Mon Nov 14, 2016 2:38 am

Nevermind, found it. I was actually using two different random numbers for each Success die, which means that I wasn't accurately testing for Tengwars on one of the rolls. Wouldn't affect the rolls above, since all we cared about there was the total.
Jacob Rodgers, occasional nitwit.

This space intentionally blank.

Glorelendil
Posts: 5160
Joined: Mon Jan 13, 2014 5:20 pm

Re: Zed's Monte Carlo Simulation

Post by Glorelendil » Thu Nov 17, 2016 3:58 pm

Ok, my first pass at visualizing this: Tor Dice Visualization.

I still am planning to add a draggable "threshold bar" so that you can set the TN and see what all the percentages are.

I wasn't sure where to plot the Gandalfs so just chose the maximum possible roll + 1.

Oh, and if you mouse over a point it will tell you what the actual roll was. The diameter of the point correlates to the number of tengwars.

Make sure to hit the "Weary" checkbox. That's the best part. 8-)

EDIT: And now with glyphs!
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Glorelendil
Posts: 5160
Joined: Mon Jan 13, 2014 5:20 pm

Re: Zed's Monte Carlo Simulation

Post by Glorelendil » Fri Nov 18, 2016 1:56 pm

Ok, now check it out: draggable TN selector computes percentages.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

User avatar
cuthalion
Posts: 223
Joined: Sun Aug 17, 2014 3:36 am

Re: Zed's Monte Carlo Simulation

Post by cuthalion » Sun Dec 04, 2016 2:47 am

This is pretty awesome.

Stupid question: why don't the gandalfs (blue right?) all appear as high as they possibly can (TN46)? Not sure why they stagger depending on how many success dice are rolled.

Actually, something odd going on for sure--success rates for TN46 at 4, 5 and 6 dice are 7, 10, and 7, respectively. Think you need to look at the code for the Gandalfs maybe?

Love that you can actually hover over and see individual dice rolls!

Glorelendil
Posts: 5160
Joined: Mon Jan 13, 2014 5:20 pm

Re: Zed's Monte Carlo Simulation

Post by Glorelendil » Sun Dec 04, 2016 4:03 am

cuthalion wrote:This is pretty awesome.

Stupid question: why don't the gandalfs (blue right?) all appear as high as they possibly can (TN46)? Not sure why they stagger depending on how many success dice are rolled.
I picked that location purely for aesthetics. There isn't really any logical place for the gandalfs since they produce in a non-numeric result. At first I had them all in the 47 slot, but I thought this looked better.
Actually, something odd going on for sure--success rates for TN46 at 4, 5 and 6 dice are 7, 10, and 7, respectively. Think you need to look at the code for the Gandalfs maybe?
Just stochastics. Let it run long enough and the numbers will stabilize.
Love that you can actually hover over and see individual dice rolls!
:-)
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

User avatar
zedturtle
Posts: 3289
Joined: Sat Mar 22, 2014 12:03 am

Re: Zed's Monte Carlo Simulation

Post by zedturtle » Sun Dec 04, 2016 3:02 pm

Glorelendil wrote:I picked that location purely for aesthetics. There isn't really any logical place for the gandalfs since they produce in a non-numeric result. At first I had them all in the 47 slot, but I thought this looked better.
Aesthetically, outside of the bounded numeric set (i.e. to the far right) is the correct answer. I know that, because it's my opinion. :D :)
Jacob Rodgers, occasional nitwit.

This space intentionally blank.

Glorelendil
Posts: 5160
Joined: Mon Jan 13, 2014 5:20 pm

Re: Zed's Monte Carlo Simulation

Post by Glorelendil » Sun Dec 04, 2016 10:46 pm

Ok I'll try it and see how it looks.
The Munchkin Formerly Known as Elfcrusher
Journey Computer | Combat Simulator | Bestiary | Weapon Calculator

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest