This Is How We Roll: Decision-Making While Rolling


#1

[I blame @Unicorn. OB]

(As always, feel free to skip all the math and jump straight to the analysis.)

 

This Is How We Roll
OtherBill, Ph.D.
15 Jan 2019

Abstract

“Rolling” is the act of creating a new Level 1 character, levelling it up to Level 20, then checking its stats (mainly its HP roll) to ensure the new character is acceptable. This thread discusses why rolling matters (or maybe why it doesn’t), then provides a mathematical analysis of the HP rolling process to determine thresholds when a player should throw out a partially-rolled character and start over.

Key Assumptions

Only HP analysis is discussed here.
Life pots are by far the most expensive, so maximizing a new character's HP roll is usually the most important criteria. MP rolls can matter as well (a +5HP/-20MP roll is still considered lousy), but to keep things simple, only HP rolls are discussed here. This is partially justified since Mana values seem to be particularly low at this point (2 def/att now, compared to 4 def last year) — at one point, a 10-point difference in MP was "worth" a 5-point difference in HP, but now that has crept up to a 15- or even 20-point difference in MP. This lessens the importance of the MP roll, but ultimately this is a compromise that every player will have to make for themselves.
How you earn that XP is not discussed here.
It takes 18,050 XP to level a new character up to Level 20 (so if you have to roll multiple characters to generate one with an acceptable roll, you'll have to earn that 18k XP multiple times). Different players will earn this XP through different methods. New players with substandard gear might chase their Quest Monsters, eventually working themselves into the godlands. Established players with old tops might find a "Sandman Convention" or other mob that will take them to Level 5 or so, then teleport to the godlands. Fancy-schmancy endgame playas who roll with UTs might simply join a fame train and leech. It's all good.

This thread is not meant to address the best way to earn this XP; instead, it will discuss decision-making methods that might minimize the XP required to generate a fresh-20 character with an acceptable roll. As long as you consistently roll all your characters using the same approach, minimizing XP required will also minimize time.

Time spent in the nexus/vault/pet yard/etc. isn't accounted for here
Effectively, the key assumption here is that you're always earning XP. If you spent a ton of time in the nexus equipping your new character, getting a pet, etc., that wasted time will skew things a bit.
If you roll characters "quickly enough", most of this probably won't matter at all.
If you hop in the ptrain and hit Level 20 in five minutes, you generally won't bother to stop and check your roll midway through. Again, this boils down to personal preference.

End Goal

The "end goal" here is: given the goal HP roll for a fresh-20 character, determine methods to minimize total XP required to generate a character with that roll. (i.e., minimize the XP—and thereby time—invested into characters that are statistically unlikely to result in the desired roll.)

Now available for everyone: Roll Calculator Software
+50 Roll
Now available for everyone: Roll Calculator Software
Realm Rewind 2019
#2

Justification: Why Rolling Matters

There are a few reasons that a good HP roll matters, but there are a few conditions where they won’t. Let’s review!

If you do not plan on 8/8'ing this character and you play conservatively, then your HP roll generally doesn't matter.
Most fresh-20 characters will generally have around the same amount of HP—in fact, just over half of all fresh-20 rolls will fall between -10HP (top 76th percentile) and +10HP (top 24th percentile).. If you pay careful attention to your HP and don't put your character in potentially-fatal situations, then that 20 HP difference won't matter at all. If you don't plan on 8/8'ing this character, then there is no life pot expenditure to minimize, so congratulations! Your roll doesn't matter!
If you do not plan on 8/8'ing this character but tend to live on the edge, then your HP roll is a bit more important.
When I was a newer player, I 6/8'ed a character with a +40HP roll (top 0.1th percentile). I put them into a dangerous situation, and eventually nexused with only 7HP remaining (!!!). That roll was the only thing that kept me alive! If I didn't have at least a +34HP roll (top 0.6th percentile) on that character, then all those pots I poured into that character would've been gone.

(If I put 500 otherwise-identical characters into that situation, 497 of them would have been killed. Not very smart of me, I know.)

If you play more aggressively and you don’t instinctively nexus when you’re flashing red, then a high HP roll will be more important to you.

If you plan on 8/8'ing this character, then a high HP roll will minimize the number of Life pots you have to invest in this character
+13HP? Yay, you just saved yourself two Life pots. +35HP? Double yay, you just saved yourself seven life pots. -14HP? You'll need three extra Life pots. You get the point: a character with a high HP roll will require fewer life pots to 8/8 than one that doesn't.

Still…having said that, how important this is to you depends on how flush you are and how quickly you can generate Life pots. A mid-game player who farms rainbows and merches them for Life at 8:1 will take more time than an endgame player who chains Lost Halls, Shatters, and other Life-giving dungeons.

How Likely Are Good Rolls?

Let's review some probabilities from the "Statistical Analysis..." thread. The probability of rolling a fresh-20 character with a roll at least as good as a certain +HP value is:

HP Roll
Probability
(0.0 ... 1.0)
-10 0.775454885
-5 0.653965098
+0 0.514354595
+5 0.372971213
+10 0.246781498
+15 0.147606454
+20 0.079106778
+25 0.037654634
+30 0.01577246
+40 0.001806874

What Is A Good Roll, Then? What Should I Aim For?

Again, this boils down to personal preference, and is largely a decision based on how quickly you roll characters versus how quickly you farm Life pots.

For a given roll (with probability p), you will on average have to roll 1/p characters before you get a suitable character. So, we can update the above table as follows:


HP Roll
Probability
p (0.0 ... 1.0)
Rough odds of
occurrence (1/p)
-10 0.775454885 3 in 4
-5 0.653965098 2 in 3
+0 0.514354595 1 in 2
+5 0.372971213 1 in 3
+10 0.246781498 1 in 4
+15 0.147606454 1 in 7
+20 0.079106778 1 in 12
+25 0.037654634 1 in 26
+30 0.01577246 1 in 63
+40 0.001806874 1 in 553

So…if you want a character with a +10HP roll, would it be faster to roll a +10HP roll (on average, four tries), or would it be faster to roll a ±0HP roll (on average, two tries) and farm two Life pots? If you roll a character with a -5HP roll, would it be faster to roll a new character, or faster to farm some Life pots? There is no right answer to this question, as everyone is different. People who farm Life slowly would generally want to aim for higher rolls than “all day erry day” endgame playas, because a good roll will save them a lot more time in comparison.

So, Exactly Where Are We Going With This?

Once you decide what roll you want to aim for, the rest of this analysis will address the questions of “If I want a fresh-20 character with at least a specific roll, and I check its roll midway through, how can I decide whether I or not I should keep going with this character, or would I save XP (and thereby time) by throwing this character out early and starting over? When is the best time to check, and what thresholds should I look for?”


#3

Number Crunching: Getting Some Boring Stuff Out Of The Way

Before we can begin addressing the key questions, we need to answer some more basic questions first. The "Statistical Analysis..." thread already discussed the theory behind these, so we can be a bit more practical here.

How much XP does it take to get to Level n?

This is pretty straightforward. The Experience and Fame page on the wiki gives a table of XP values, and it was easy to put them into Excel and generate a curve that solves this precisely:

For example, newly-created Level 1 characters have XP(1)=0 XP, while fresh-20 characters have at least XP(20)=18,050 XP.

Just How Good Is A Roll Of h At Level n?

Again, the “Statistical Analysis…” thread discusses this. Instead of dealing with really friggin’ big numbers here, I just generated a spreadsheet that calculated probabilities of having exactly a roll of h at Level n, then used that to generate a page of cumulative percentile ranks of each roll at each level:

We can interpret this table as follows: at Level 9, a +5HP roll is in the top 29.1577% of all rolls at that point. At level 20, a -2HP roll is in the top 55.72% of all rolls (values greater than 50% mean it’s below average, which is what we’d expect for a negative roll).

At any level, a roll of ±0HP is in the top 50% of all rolls—average.

We generally only care about percentile ranks at Level 20. It’s enticing to think “Oh, I have a top 10% roll at Level 10, surely it’ll turn into a top 10% roll at Level 20!”, but probability doesn’t work that way. In fact, if you have a roll of h at any midway point, there’s a very good chance that your roll at Level 20 won’t be too far from that. That’s just how the random numbers work here.

So, given a desired final roll of h, we can define p as the percentile rank of that roll at Level 20. This sheet serves as a lookup table for those values.

Okay...so if My Character Is Level n, What Is The Probability That His Roll Will Increase By At Least ΔHP At Level 20?

I am so glad you asked.

At Level 19, we only have one level-up remaining (so your character’s roll can’t change by more than 5HP in either direction). At Level 9, we have eleven level-ups remaining. At any Level n, we have 20-n level-ups remaining. So, we can flip the above tables around, and calculate the probability of gaining at least h HP between now and Level 20:

We can interpret this table as follows: if my character is Level 9, there is a 33.5938% chance that his roll will improve by at least +5HP by the time he hits Level 20. If my character is Level 19, there is a 9.0909% chance that his HP will improve by +5HP when he hits Level 20 (a 1/11 chance). At Level 11, there is a 71.6051% chance that he won’t lose more than -5HP off his roll (again, an over-50% chance means below average—in this case, your roll got worse).

At Level 20, there is a 100% chance that his HP won’t improve any more. (Duh.)

Given where your character is at Level n, we normally look at this table in terms of “desired change in HP”. If we want +15HP and we’re currently at +3HP, that’s a change of 15-3=12HP. If we want +5 HP and we’re currently at -2HP, that’s a change of 5-(-2)=7HP. Let’s define this “desired change in HP” as ΔHP.

From this, we can define P(ΔHP,n) as the probability that our character’s HP roll will increase by at least ΔHP between Level n and Level 20. This sheet serves as a lookup table for those values.


#4

Let's Make Some Decisons: Mathematical Modeling

So, let’s go back to the first question we hope to answer:

Recall that we can’t really minimize time here. We can minimize XP investment, which is effectively the same thing. So, let’s break this down:

How Much XP Will It Cost To Give Up Early?

Given h, let’s define p as the percentile rank of a final roll of h. We can look that up in the first lookup table we created in the last post.

If you give up early and start over from square one … well, recall that if you want a roll in the pth percentile, then you’ll need to roll and roll and roll an average of 1/p times. Each of those will cost 18,050 XP. (If you recall the XP(n) function defined in the previous post, this is XP(20) XP. Thus, the total expected XP cost of giving up early will be:

How Much XP Will It Cost To Keep Going?

At Level n, you’ve already invested XP(n) XP in this character. If you decide to keep going, one of two things will happen:

  • You'll get the roll you want (yay!), or
  • You won't get the roll you want, and you'll have to start over anyway.

You’re already Level n, so you’ll have to invest an additional XP(20) - XP(n) XP to finish rolling this character. If you succeed, you’re done … but if you don’t succeed, you have to start over from square one (and again, might have to reroll multiple times). So let’s introduce a variable q that represents your probability of success here.

From this, we can model the amount of XP required to keep going as:

In both the q (success) case and the (1-q) (failure) case, you have to invest XP(20)-XP(n) XP to finish rolling the character. If you fail, you also have to invest an additional XP(20)/p XP to continue rolling.

Comparison

So, which is less?

A little algebraic manipulation (left as an easy exercise for the reader) quickly leads to the following:

What is q, again? q was defined as “the probability of success”. The probability of success of what? The probability of successfully gaining (h-h’) HP between Level n and Level 20.

In other words, q = P(ΔHP,n)!

We can look up p and P(ΔHP,n) in the lookup tables from the post above, then perform the calculation here.

If the < in this equation holds true, it will take less XP to give up now and reroll early. If the < in this equation does not hold true, then it will take less XP to keep going with this character—it’s a calculated risk, because you might fail and have to start over anyway, but for now the odds are still in your favor.

This Is Hard. Can You Just Put This In A Spreadsheet Or Something?

I’m already one step ahead of you:

status%202

status%201

I’ll post this somewhere as soon as I find a good place for it (DropBox, etc.).


#5

Analysis: @Unicorn's Question and Break-Even Lines

So, if you want a final roll of h, what are the thresholds where if your intermediate roll ever drops below a given point, it will save time to give up and reroll early? Again, let it never be said that OB doesn’t deliver.

Level 0 HP +5 HP +10 HP +15 HP +20 HP
1 0 0 0 0 0
2 0 0 0 0 1
3 0 0 0 1 1
4 0 0 1 1 1
5 -1 0 1 1 2
6 -1 0 1 2 2
7 -1 0 1 2 3
8 -2 0 1 2 3
9 -2 -1 1 2 4
10 -3 -1 1 3 4
11 -3 -1 1 3 5
12 -4 -1 1 3 5
13 -4 -2 1 3 6
14 -5 -2 1 4 6
15 -5 -2 1 4 7
16 -6 -2 1 5 8
17 -6 -2 2 5 9
18 -6 -2 2 7 11
19 -5 0 5 10 15
20 0 5 10 15 20

For your desired roll (column), if your intermediate roll at any given level (row) drops below the threshold listed here, you will be better served by stopping early and trying again. It’s that simple.

Here’s the same table in a graphical form:

Let’s think about this for a moment:

  • At the early levels, the lines stay fairly flat. If you go too negative early, you might as well start over, since you've hardly invested any XP into this character to begin with!

    <edit>
    Caveat:
    This is perhaps the only place where the “negligible time spent in nexus” assumption might skew things. If you keep throwing characters out early over an HP point or two, you’re spending a disproportionate amount of time creating/equipping new characters compared to the time spent actually rolling them—if you do this, you’re gonna have a hard time. The next post in this thread will show that the “best” time to check your roll is Level 10; I would suggest that unless your roll is really crappy, there’s hardly any upside in restarting before, say, Level 5. Still, your mileage may vary.)
    </edit>

  • At later levels, though, the tables will suggest you keep going even though you might only have a small chance of success. This makes sense if you think about it, though—since you've already invested so much XP into this particular character, you might as well see him through to the end.

    (For example, once you hit level 19, even if you’re still 5HP away from your goal, you might as well keep going, since you have a 9.09% chance of success and only have to invest another XP(20)-XP(19)=1850 XP to find out!)


#6

Analysis: When Is The Best Time To Check My Roll?

Referring back to the “Statistical Analyais…” thread, at Level 1 your future roll has a variance of 190 HP. As you invest XP in this character and level up, this variance slowly shrinks. Eventually, you hit Level 20 and the variance goes to 0 — and that’s the roll you get.

So when is the best time to check that roll? Check it early, when you’ve barely invested any XP and the variance is still huge? Check it late, when you’ve already invested a ton of XP and the variance has already dropped?

If your knee-jerk response is “somewhere in between”, you’re absolutely right!

Modeling

At Level n, we’ve invested XP(n) XP and levelled up n-1 times. So let’s find the point where we maximize n while minimizing XP(n).

Since we know we start at Level 1 with 0 XP and we finish at Level 20 with 18,050 XP, let’s just plot that as a line:

Line

And compare that to the original XP(n) parabola:

Parabola

We want to find the place where the difference between the two is maximized:

Difference

We can use calculus here to find that point:

At level 10, you’ve received 9/19=47% of your level-ups while only investing 4,050 XP (only 4050/18050=22% of the total XP required) to get there, and the remaining variance at that point (100) still allows the potential for large improvements in HP. That’s pretty compelling!

So, if you’re only going to check your roll at one point, Level 10 is the place to do it.!


#7

References

cut-the-knot, “Number of Trials to First Success”, https://www.cut-the-knot.org/Probability/LengthToFirstSuccess.shtml

RealmEye Forum, “Statistical Analysis of RotMG Character Stat Distributions”, https://www.realmeye.com/forum/t/statistical-analysis-of-rotmg-character-stat-distributions/144

RealmEye Wiki, “Experience and Fame”, https://www.realmeye.com/wiki/experience-and-fame

Wikipedia, “Binomial Distribution”, https://en.wikipedia.org/wiki/Binomial_distribution

Wolfram Alpha, www.wolframalpha.com


#8

I like to shoot stuff and get cool items.


#9

@Unicorn you did this


#10

I thought forum spAM WAS AGAINST THE RULES


#11

This is an excellent thread and analysis. I admire the work you’ve put into this.


#12

This is beautiful. Thank you so much for putting this together, you madman!

I gave a quick read but gotta sleep now, tomorrow I’m going through this and making sense of it all. You have a distinct voice that makes me wish you wrote all my textbooks…it’s very engaging and clear.

OB never disappoints!

Edit: oh also this deserves to be on as many places as possible, if you Reddit I’d love if you posted there, if not I’ll link it.


#13

Obligatory “never tell me the odds” comment.

It’s still a bit frustrating that our stats aren’t presented better to us in-game apropos rolling.

They have recently made one good change, which highlights the stat gain upon each level-up, …but it’s not really presented in a way that’s particularly transparent when it comes to analysing +/- rolls unfortunately:
image

A player still needs to ‘somehow’ osmosis that +25 is the key to knowing if your HP gain is good or bad upon level-up (& +10 for MP), for a wizard.

Perhaps if they introduced a /stats or otherwise named command that told you:
Compared to an average level 6 wizard, you have -10 HP, +3 MP, ...

Anyway! That’s all side comments. Good job Dr OB.


#14

Two problems with the analysis:

  1. Rather than “XP(20)-XP(n)” it should be the effort to go from level n to level n, which is related but not identical to the XP needed, because of 10% XP cap.

For most people the best way to level after level 10 would be in gland (reaching the 10% cap until level 17 or 18) the effort needed is closer to linear than quadratic (in terms of 20-n).

  1. I need to think more but I believe you missed an important consideration here. This formula assumes that you either level from n to 20, or start over entirely. But you can also e.g. level from n to n+1 and restart if the roll at level n+1 is too bad.

To do it correctly I think you have to set up a recurrence for all possible percentiles at different levels. Assuming the effort needed is modeled as a linear or quadratic function, I suspect there is still a “simple” formula because it’s just a linear or quadratic combination of binomial coefficients. But I’m not too sure off the top of my head.


#15

This seems to be a rather bad assumption since this is the exp cost of the “normal” rolling process and you should be able to safe yourself a bit of exp for the new rolling attempts by using your method.


#16

A few bits of feedback so far (thanks!):

True, it is. A +10HP roll might still be garbage if it’s -35MP.

I’m thinking of ways of extending this work to account for a fixed mana:life ratio and then reformulating the tables to account for an “effective roll” of HP+(MP/ratio). However, I’d need to treat spellcasters and non-spellcasters differently since their MP gain rates are different.

Always more to think about.

 

XP(n+1)-XP(n) (i.e., how much XP you must earn before your next level-up) is easily measurable. “Effort” is not, and would vary from player to player. And again, I’m not addressing the easiest ways to earn 18,050 XP quickly, I’m just addressing some decisions you might wish to make along the way.

 

You’re welcome to stop and check your roll at every point. It might get tedious, but that can be useful at times.

 

Ahh, you caught that. You have no idea how much that kept me up at night.

My first attempt at approaching this problem lumped everything together into a single formula (“how much XP does it take to roll an acceptable character?”) and attempted to use minimization techniques. However, that was a self-referential function and simplification efforts didn’t help much and eventually I just had to focus on decision-making for this one paticular roll in a vacuum, which led to what I presented above.

I might try to go back and address that, simply to see how big a difference it would actually make.

 

-facepalm-

I broke it up so people could easily refer to particular sections. In retrospect, I wish I did a better job of that in my other math posts.

 

I appreciate the feedback so far, feel free to keep it coming!

 

Edit: Oh, and:

Heh. I’m actually a mod on r/RotMG, but the site is blocked by my workplace firewall so I’m hardly ever there. Feel free to link to it if you’d like (and give credit to u/otherbill, of course).


#17

Totally forgot you were a mod there. Linked and credited.


#18

Reading this took me back to the days of the old forums where your pet ability analysis was pinned for all eternity. Very well done.

Don’t worry, you’re still more active than Walorus.


#19

And that zxcv_rotmg guy…

Great post OB!


#20

does this mean I was hecca lucky with my +40 first samurai roll?
also cool
This has so many other variables depending on the player reeeeeeee
sounds fun
I only care about hp