What is a reroll worth?

Discussion of MUD clients, plugins, the website, and other technical stuff.
Post Reply
Posts: 328
Joined: Wed Jun 17, 2020 7:43 am

What is a reroll worth?

Post by nobody » Tue Mar 09, 2021 2:25 pm

What is a reroll worth? As you might have guessed, the answer is complicated. TLDR, data for opposed rolls is here, data for target rolls is here, and poorly translated code for a calculator in python is available here.

First, I'll consider opposed rolls, then rolls against fixed targets. Opposed rolls are of two forms:
1. The result is a pass/fail (think searching for a hidden character, I think)
2. The result depends on margin of success (think attacking something)

For the first kind, we're only interested in the probability of success, while for the second type we're also interested in the margin. I've included both in my calculations for completeness, and I'll be referencing them with a format modified from the form used in combat. An example is below:

d100(1x) vs d150(-2x): 78% (6% 45% 85%)

This means an offense roll between 0 and 100 inclusive, with 1 reroll opposed by a defense roll between 0 to 150 inclusive with -2 rerolls. The probability of success of the aggressor is 78%, with the mean margin of success on a hit at 45%, and 90% of the opposed rolls that hit will be between 6% and 85%. If you are reading this and are not familiar with rerolls, you should probably read 'help rerolls' but the basic idea is positive rerolls increase chance of success (having 2 reroll means rolling three times and taking the best) and negative rerolls decrease chances of success (having -3 rerolls means rolling four times and taking the worst). Having 0 rerolls means rolling once and taking the result. Margins of success will have different results in different settings, but in combat it correlates to damage. If you think of the above results meaning on average your hit will do 45% of your maximum damage, and most hits will be between 6% and 85% of your maximum damage, that's probably a good enough understanding. It isn't completely accurate because the damage calculations have more nuance, but it's plenty good enough for comparing results, which is more or less what this post is about.

We'll start off with a very low-level line up:
d100(0x) vs d100(3x): 20% (2% 17% 45%)
d100(1x) vs d100(3x): 33% (2% 18% 46%)
d110(0x) va d100(3x): 17% (2% 18% 46%)
d120(0x) vs d100(3x): 33% (2% 20% 47%)

From this set, we could gather that an extra reroll is worth 10 to 20 skill points for the aggressor (having the 20 skill points is better if margins matter). What about for the defender though?

d100(0x) vs d100(4x): 16% (1% 15% 39%)
d100(0x) vs d105(3x): 16% (2% 17% 45%)

For the defender, that marginal reroll is only worth about 5 more skill points in terms of success/failure but it is more valuable than 5 skill points in terms of margins of success. You might be wondering how much skill the defender would need for the same kind of margins as that extra reroll, but as you might guess, with or withot the help from the roll below

d100(0x) vs d200(3x): 1% (2% 17% 45%)

it's impossible for the defender to get that kind of result from just adding more skill. This is because for margins we're only looking at when the aggressor is successful, and increasing defender skill here has only changed the range of outcomes from -100 (defender rolls 100 and aggressor rolls 0) through +100 (defender rolls 0 and aggressor rolls 100) to -200 through +100. The margins are based on that +1 through +100 range of outcomes for the aggressor, and skill makes the hit less likely, but doesn't change the range of outcomes here. Now, you could counter by pointing out that the extra roll for the defender didn't change the range of outcomes either, it's still between -100 and +100, but it changes the distribution of those outcomes and that is a key idea for understanding the value of rerolls (I've included a note explaining the change in distribution in more detail at the bottom of the post if you're not familiar with probability).

Looking for patterns
The outcome of the roll is a function of the offense skill, offense rerolls, defense skills, and defense rerolls. There is also a few patterns that merit investigation.

Holding rerolls constant, ratios hold fairly well (note that the outcomes are not exactly the same, but they round to be close enough). So in terms of outcome, think about roll ratios not skill differences (or skill ratios - make sure to focus on the roll numbers rather than skill numbers).

d100(0x) vs d200(0x): 25% (3% 34% 78%)
d200(0x) vs d400(0x): 25% (3% 34% 78%)
d300(0x) vs d600(0x): 25% (3% 34% 78%)
d400(0x) vs d800(0x): 25% (3% 34% 78%)

d100(3x) vs d200(1x): 17% (3% 29% 68%)
d200(3x) vs d400(1x): 17% (2% 29% 68%)
d300(3x) vs d600(1x): 17% (2% 29% 68%)
d400(3x) vs d800(1x): 17% (2% 29% 68%)

When the opposed rolls are equal, there is a symmetry based on the difference in rerolls and also the magnitude of rerolls, as seen below:

d500(2x) vs d500(1x): 60% (2% 28% 67%)
d500(1x) vs d500(0x): 67% (3% 38% 81%)
d500(0x) vs d500(-1x): 67% (3% 38% 81%)
d500(-1x) vs d500(-2x): 60% (2% 28% 67%)

d500(3x) vs d500(1x): 67% (2% 29% 68%)
d500(2x) vs d500(0x): 75% (4% 40% 83%)
d500(1x) vs d500(-1x): 83% (6% 44% 85%)
d500(0x) vs d500(-2x): 75% (4% 40% 83%)
d500(-1x) vs d500(-3x): 67% (2% 29% 68%)

d500(5x) vs d500(2x): 66% (2% 23% 57%)
d500(4x) vs d500(1x): 71% (2% 29% 69%)
d500(3x) vs d500(0x): 80% (4% 42% 85%)
d500(2x) vs d500(-1x): 90% (8% 48% 87%)
d500(1x) vs d500(-2x): 90% (8% 48% 87%)
d500(0x) vs d500(-3x): 80% (4% 42% 85%)
d500(-1x) vs d500(-4x): 71% (2% 29% 69%)
d500(-2x) vs d500(-5x): 66% (2% 23% 57%)

This symmetry dispears though when offense is higher:

d800(5x) vs d500(2x): 98% (13% 40% 68%) *
d800(4x) vs d500(1x): 97% (12% 43% 76%)
d800(3x) vs d500(0x): 97% (13% 51% 87%)
d800(2x) vs d500(-1x): 98% (16% 56% 89%) *
d800(1x) vs d500(-2x): 96% (11% 54% 89%)
d800(0x) vs d500(-3x): 87% (4% 44% 87%)
d800(-1x) vs d500(-4x): 81% (2% 30% 71%)
d800(-2x) vs d500(-5x): 77% (2% 23% 59%) **

d800(2x) vs d500(5x): 84% (4% 28% 51%) *
d800(1x) vs d500(4x): 72% (3% 27% 53%)
d800(0x) vs d500(3x): 50% (2% 26% 55%)
d800(-1x) vs d500(2x): 30% (2% 20% 48%)
d800(-2x) vs d500(1x): 24% (1% 17% 46%) **
d800(-3x) vs d500(0x): 32% (1% 17% 45%)
d800(-4x) vs d500(-1x): 41% (1% 15% 40%)
d800(-5x) vs d500(-2x): 46% (1% 13% 36%)

Or when defense is higher:

d500(5x) vs d800(2x): 16% (2% 23% 57%) **
d500(4x) vs d800(1x): 28% (2% 29% 69%)
d500(3x) vs d800(0x): 50% (4% 42% 85%)
d500(2x) vs d800(-1x): 70% (5% 44% 85%)
d500(1x) vs d800(-2x): 76% (5% 44% 85%) *
d500(0x) vs d800(-3x): 68% (4% 39% 83%)
d500(-1x) vs d800(-4x): 59% (2% 28% 67%)
d500(-2x) vs d800(-5x): 54% (2% 22% 56%)

d500(2x) vs d800(5x): 2% (1% 13% 36%) **
d500(1x) vs d800(4x): 3% (1% 15% 40%)
d500(0x) vs d800(3x): 3% (1% 17% 45%)
d500(-1x) vs d800(2x): 2% (1% 17% 45%) **
d500(-2x) vs d800(1x): 4% (1% 17% 45%)
d500(-3x) vs d800(0x): 12% (1% 17% 45%)
d500(-4x) vs d800(-1x): 19% (1% 15% 40%)
d500(-5x) vs d800(-2x): 23% (1% 13% 35%) *

I've marked the best probable outcomes for offense (*) and defense (**) in each roll set above. The take aways from these patterns aren't exactly shocking though:
- you're in the best situation when you have positive rerolls and your opponent has negative rerolls
- the marginal reroll favors the higher skilled party (if you are offense in this situation d500(1x) vs d800(-1x), it's better to push your opponent down one more than lift yourself one more, as seen above; if you are defense in the same situation, it's better to push yourself up if you can than pushing your opponent down)
- when you have more skill, just adding more rerolls rather than dropping your opponents is a viable strategy (if you can do it)

This is the part where I had intended to post a big, ugly table and tell you to use it to look up the relevant bits, but instead I ended up making a calculator and then translating it from R to python, and dumping a bunch of pre-generated results into csv files, all of which you can find on my cogg site. If you don't know or have R or python, I recommend rummaging through the CSV tables. If you really want to use the calculator and don't know either, I recommend using the R calculator because it is vastly more efficient (I timed a sample for a complex calculation (d800(4x) vs d975(5x)) and python took 3.3 minutes while my much better written R took 4 seconds. I don't know python, use the python at your own risk, or better yet improve upon it). To get the most of the CSV tables, I like to sort them by psuccess (the probability of offense being higher than defense) and noting similar groups (for example, all of the following have about an 11% probability of success for offense: d300(2x) vs d700(1x), d100(-1x) vs d300(0x), d700(5x) vs 900(5x)). You can also filter to see how a range of offense dice values would do against a set defense roll and defense reroll pair and compare the marginal outcomes (mhit is the mean margin of success on a hit (think of that as your average damage), lowhit is the fifth percentile of the margin of success on a hit, and hihit is the 95th percentile of the margin of success on a hit (most of the time your margin and thus damage (ish) will be between lowhit and hihit)). You can also build your own big ugly table using a pivot table if that's your thing. I recommend using offense rerolls and offense dice for the rows and defense rerolls and defense dice for the columns. And then filter, because it's a big ugly table. Also as a side note, thank you Rias for giving me great content to steal titles from.

Now for rolls against fixed targets. Those work very similarly to opposed rolls, with a few notable differences:
- The roll vs fixed scenario d100(0x) vs 200 is impossible while d100(0x) vs d200(0x) is merely unlikely
- The variance is lower. If it isn't clear what that means, just think about a line where one ball is bouncing above the line and another ball is bouncing below it. Opposed rolls are like measuring the distance between the two balls when they're both moving, and rolls against fixed targets are more like measuring the distance when one ball is bouncing but the other has stopped - there's less movement and chaos in the system now
- There isn't an analogue for "defense rerolls" with a fixed target, it just is what it is, so you can only hope to make your own offense rerolls better

How rerolls change the distribution:
I'll illustrate with a hypothetical 4-sided die. If the die is fair, it'll roll 1 25% of the time, 2 25% of the time, 3 25% of the time and 4 25% of the time. Very boring. Now, if you roll twice and take the better outcome we go from 4 paths to 4 outcomes to 16 paths to 4 outcomes.
no rerolls (1 die):
Rolling 1 results in a 1, and so on. I won't write these out, because they're pretty obvious.

1 reroll (2 dice):
Rolling 1 and 1 results in a 1
Rolling 1 and 2 results in a 2
Rolling 1 and 3 results in a 3
Rolling 1 and 4 results in a 4
Rolling 2 and 1 results in a 2
Rolling 2 and 2 results in a 2
Rolling 2 and 3 results in a 3
Rolling 2 and 4 results in a 4
Rolling 3 and 1 results in a 3
Rolling 3 and 2 results in a 3
Rolling 3 and 3 results in a 3
Rolling 3 and 4 results in a 4
Rolling 4 and 1 results in a 4
Rolling 4 and 2 results in a 4
Rolling 4 and 3 results in a 4
Rolling 4 and 4 results in a 4

Counting up the results gives 1 as the outcome one time, 2 as the outcome three times, 3 as the outcome five times, and 4 as the outcome seven times, out of sixteen total. Thus, a reroll changes the distribution from (1:25%, 2:25%, 3:25%, 4:25%) to (1:6%, 2: 19%, 3: 31%, 4: 44%). The changes in the distribution are more severe at the ends (19% lower for 1, 19% higher for 4), and less severe at the middle (6% lower for 2, 6% higher for 3), or in other words it makes rolling very low much less likely, rolling very high much more likely. You could complete the exercise with 2 rerolls (3 dice) and there would be 64 outcomes with the following distribution (1:1/64 ~ 2%, 2:7/64 ~ 11%, 3:25/64 ~ 39%, 4:31/64 ~ 48%).

User avatar
Posts: 106
Joined: Thu Sep 07, 2017 9:28 am

Re: What is a reroll worth?

Post by Karjus » Wed Mar 10, 2021 12:05 am

Awesome post, and now I want Rias to add a % chance of success note to combat rolls based on your rerolls and your opponents.

Why? Just because with a bit of testing and taking notice, it's pretty obvious that stacking one or the other tends to feel like it has diminishing returns and you're often better getting at least 1 offensive reroll then trying to reduce your opponents to -1. Not everyone will get it, and simply assume more always better.

It would also make it more obvious that stuff like Truestrike and Mighty Blow are as ineffective as they seem, or mounted combat, where they're supposed to be all about ensuring a hit with their high rerolls but you're better off using the humble Staggering Blow with a feint, which also doesn't leave you more vulnerable.
- Karjus

Speaking to you, XYZ says, "Never bother to wash it. It gets dirty again anyway."
Speaking to XYZ, you say, "I hope you don't treat your ass the same way."

Posts: 328
Joined: Wed Jun 17, 2020 7:43 am

Re: What is a reroll worth?

Post by nobody » Wed Mar 10, 2021 7:57 am

Karjus wrote:
Wed Mar 10, 2021 12:05 am
Awesome post, and now I want Rias to add a % chance of success note to combat rolls based on your rerolls and your opponents.
I was thinking about requesting incorporating that in some form, but even if Rias could get the python calculator as fast or faster than my R calculator it would add some seconds to calculate on the fly, which is bad. It would be cool to manage it via a much faster look up table (and if the look up table doesn't have that combo, add it to the asynchronous queue to be calculated in the background whenever and added to the look up table so that the result can get crunched later and reported next time someone rolls it). That'll save space on the table compared to just running a bunch of combinations, since most PC rolls are going to move in increments of 10 or 25, and NPC rolls are all locked so it's a much narrower range there. It may still not be worth it though depending on how much time it would add even as a look up. Alternatively, could also make for a very interesting meta ability for warriors - once they've defeated a foe, using `consider` gives hit/defense probabilities instead of vague commentary.

Edit to add: I realized after posting that the `consider` meta ability would not be very useful because it would give static rerolls rather than the more varied situational rerolls. So, probably not that.

Post Reply