What is a reroll worth?

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

What is a reroll worth?

Post by nobody »

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
Karjus
Posts: 282
Joined: Thu Sep 07, 2017 9:28 am

Re: What is a reroll worth?

Post by Karjus »

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."
User avatar
nobody
Posts: 501
Joined: Wed Jun 17, 2020 7:43 am
Contact:

Re: What is a reroll worth?

Post by nobody »

Karjus wrote: Wed Mar 10, 2021 12:05 amAwesome 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.
Heron
Posts: 29
Joined: Tue May 18, 2021 12:00 pm

Re: What is a reroll worth?

Post by Heron »

Pre-post edit and amendment: The majority of this was written before I knew about Nobody's post, and as I wrote I found progressively simpler ways of explaining the subject. The post is already written, and I'm not committed enough to rewrite it, but if you like, you can skip it and go to https://anydice.com/, punch in the code 'output [lowest 1 of 2d10]' without the apostrophes, and play with the numbers. Lowest 1 of 8d10 would represent an average stagger in broad percentages, IE a roll of 1 on a d10 is a roll between 0-10% with Cogg dice. Your skill doesn't matter since it scales proportionally. Just change the 2 in the code to an 8. You can change lowest to highest to see what positive rerolls look like. It's basically the same thing. Highest 1 of 4d10 would represent your attack odds on a warhorse with high riding, or a ground duelist with morale and max combat precision. Highest 1 of 2d10 represents your odds of attacking and defending with one morale reroll. Lowest 1 of 3d10 represents your odds when you catch an enemy on max roundtime. It should be fairly intuitive.

Looking at d100s instead of d10s will just force you to do addition to sum the odds and massively lag the calculator. Their numbers will be slightly different from mine because mine are zero-inclusive (Sum of 11 percentages instead of 10). In retrospect, their way is cleaner and better but I'm not rewriting everything. My post covers the topic decently in broad strokes, which was the aim, but isn't really satisfying to me in terms of mathematical precision.

Stagger could probably stand to be toned down quite a bit, and I'd recommend negrolls cap at like -4 or something instead of starting at -8 and going to infinity and beyond. -4 is already fatally devastating and with -8 rerolls you have a less than 1% chance of rolling above 50%. Punch it in and take a look. The calculator is great.



The mathematical relationship between rerolls is probably unclear for a majority of players. Let's take a look. We'll use a d100 for all examples, since everything scales proportionally.

A d100 with 0 rerolls has a 1% chance of being any number from 1-100.
It has a 10% chance of landing above (or directly on) the 90th percentile (90), and a 10% chance of landing below (or on) the tenth percentile (10).

You might think this is obvious because we're using a d100, but keep in mind the scale. Let's look at one positive and one negative reroll.
https://anydice.com/program/6dcd, enter the code 'output [highest 1 of 2d100]' without quotes if you want to see the relation. It should be there automatically, but it might not be.

We get a very interesting graph: https://i.imgur.com/DBNFOgG.png

What this means is that we have a 1.99% chance to maxroll a 100, and a .01 chance to roll a 1. If we look at the table, we can add the percent chance of rolling 90-10 for the odds of landing in our 90th percentile: 1.99+1.97+1.95+1.93+1.91+1.89+1.87+1.85+1.83+1.81+1.79 = 20.79. This is 11 numbers long because it includes 90, so it's not exactly a 90th percentile, but you know, whatever. We're going for the big picture here.

If we perform the same operation, there's a 7.75% chance of landing in the bottom 10%. This relationship is the inverse of the negative reroll relationship, IE you have a 20.79% chance of rolling in your bottom 10% with one neg reroll, and a 7.75% chance of rolling in your top.

What happens if we add more dice? At roll 3, keep highest we have a 2.97% (~3%) chance of rolling 100. This translates to:
29.5% (Or 30% for shorthand) chance to roll at or above 90 (2.97+2.91+2.85+2.79+2.74+2.68+2.62+2.57+2.51+2.46+2.40)
.1% chance to roll below 10, and .7% chance of rolling below 20.

At roll 4, keep highest, we have 3.94% chance of rolling 100. This translates to:
37.25% chance of rolling above 90%.
.15% chance of rolling below 20. The odds of rolling below 10 are below .01%.

You can see some diminishing returns kicking in now.

Every reroll, keep highest (positive reroll) adds an approximately 10% (diminishing) chance you'll roll between 90 to 100, double inclusive. At max combat analysis and with morale, a duelist will roll at or above 90% between 1/3 and 2/5ths of the time. This is similar for someone on a warhorse with morale and high riding. They have pretty good odds of rolling above 80% too.

Conversely, this means that when a crow catches your new warrior off-balance and you take -2 rerolls, you have a roughly 30% chance (29.5) of rolling at or under 10, and a one in one thousand chance of rolling over 90.

The numbers are much prettier to look at with less addition involved if we use d10s. The calculator also gets mad at more than 4 d100s, so we're downscaling. If you input 'output [lowest 1 of 8d10]' into the calculator, you'll see what a typical stagger is like:

Someone staggered with -8 rerolls has a 56.95% chance of rolling 1 (scales up to 0-10), 26.27% chance of rolling 2 (0-20), and an 11.01% chance of rolling 3 (0-30).

You have an approximately 6% chance of rolling higher than 30%, and it's not going to be much higher.
Post Reply