Probabilities of Opposed Checks in Dungeons & Dragons

In my last post on D&D, I wrote about differences in the probabilities of the success of ability checks using modifiers (an old system) compared to advantage/disadvantage (a newer system). That was a pretty innocuous topic, since it was just applying math to different ways of interpreting dice rolls. In this post, I wanted to explore a potentially more controversial topic: the probabilities of opposed checks. This is potentially controversial because it gets a bit into the question of whether certain aspects of D&D are “realistic enough”, which some people might argue is an important question, since the universe of D&D is governed by many of the same physics as our own universe, while other people might argue the opposite because D&D is fundamentally a fantasy game. In any case, I’m still interested in the math, so hopefully my results don’t make any D&D players with strong opinions upset.

With a normal ability check, you roll a 20 sided die (“d20” for short) add modifiers, and compare the result to a fixed number. (If you have advantage or disadvantage on the check, you roll 2 d20s instead and take the higher or lower number, respectively.) For example, an easy task might require that your roll plus modifiers be 10 or higher, while a very difficult task might require that your roll plus modifiers be greater than 25.

In an opposed check, two characters are pitted against each other, so instead of needing your roll to beat a fixed number, the winner of an opposed check is whoever rolls highest after modifiers have been applied. A common example of an opposed check is when one character attempts to grapple another character: the two players involved make an opposed athletics check, and if the instigator rolls higher, they have successfully grappled the other character.

We can represent the probability of different outcomes visually. Each player rolls a d20, which means that there are 20*20 = 400 possible outcomes, which we can lay out in a grid. In the simple case where both players have the same modifier for the check, if they roll the same number the result is a tie (grey squares in the chart below), if player 1 rolls higher they win (blue squares in the chart below), and if player 2 rolls higher they win (red squares in the chart below).

The relative area of each color tells us the probability of that outcome. For simplicity, we’ll treat the grey squares as being half red and half blue (depending on the exact situation/house rules being used, a tie could lead to either player “winning” the opposed check). For the situation above, the area is then half red and half blue, matching our expectations that evenly matched characters should have a 50% chance of winning.

However, for mismatched characters, the probabilities might not be quite what you’d expect. A warrior with a high starting strength score (i.e., not boosted by magical spells or special items) who is proficient at grappling might have a modifier of +6 on their check. They could attempt to grapple a wizard with unremarkable strength who is not trained at grappling, corresponding to a +0 modifier on their check. In this case, (with player 1 being the warrior) the line dividing the areas will move down by 6 places, since the warrior’s modifier is +6 compared to the wizard.

The total area of the chart is 20*20 = 400, while the area of the wizard’s triangle is now 1/2*14*14 = 98. That means that even though the warrior is built entirely around being strong (and good at grappling), and the wizard has no specialization in grappling, the wizard will still be successful 98/400 times – a roughly 25% chance of winning the opposed check.

We can remedy this a bit if the warrior has advantage, but the wizard still might have a better chance than you expect. In this case, the warrior gets to roll twice and choose the higher roll, so there are three d20s being rolled in total, for 20*20*20 = 8000 possible outcomes. We can represent the new chart as a cube, with each edge corresponding to one of the d20 rolls. For the wizard to succeed, they’ll need to roll higher than both of the warriors rolls (after accounting for the modifier), so there’s just one corner of the cube of possibilities that corresponds to their success:

The volume of the wizard’s corner of the cube is 1/3*14*(1/2*14*14) = 457, so the ratio of that corner to the total cube volume corresponds to 457/8000, or a roughly 6% chance of success. This probably matches our expectations of reality much better, but it’s still a decent chance for the wizard to succeed – better than some lopsided boxing odds, for example, even though in that case both fighters will still be professionals.

For many D&D players, this analysis is completely worthless, because a lot of the entertainment of D&D comes from the high variance and wacky, unexpected situations. But it does tell us something useful for players who enjoy a game that’s more grounded in reality. For situations that shouldn’t depend much on variance, you might not want to call for a die roll at all (e.g., in an arm wrestling match, a character with 2+ strength more than the other character could win automatically, unless the weaker character cheats). And even in situations that do have some variance, you may want to grant the character with the higher modifier advantage more readily than normal, so that the associated probabilities match something closer to what we’d expect.

Wealth is More Powerful than Income

In the last post, I discussed how wealth and income are mostly interchangeable, as debt allows one to convert income into wealth, and investing allows one to convert wealth into income. I noted one primary advantage of wealth (at least in the United States): income from invested wealth is taxed at about half the rate of income from labor. For answering hypotheticals like “would you rather have a guaranteed job that earns $250k/year or a lump sum of $3 million?” the difference in tax rates might be one of the most important factors to consider. But from a more pragmatic “how should I make financial decisions in my day to day life?” perspective, there is another, more important reason why wealth is more powerful than income.

The main reason that wealth is more powerful than income is that it is more robust. It’s relatively easy to lose your source of income: for many people the majority of their income comes from one job, and losing that job means you’ve suddenly lost all your income. There are many reasons you might lose your job, and they’re often out of your control. You may be able to find another job quickly and recover your income, but it could also take months or years to find a new job, and/or you might need to take a pay cut. So income is far from guaranteed over the course of your working career.

Wealth, assuming it is invested in a well diversified portfolio, is much more stable since it doesn’t depend on a single industry or company like income does. There are times when your wealth will decrease, but the worst recessions in recent history have at most cut wealth (or more precisely: stock index values) in half, and in all of these cases the markets recovered within the next decade. This doesn’t mean there will never be a market destroying apocalyptic depression, but if that happened, it would wipe out all sources of income as well.

Wealth is also more robust than income because converting it to income through investing results in a positive feedback loop of building more wealth. If any of the income that you generate is disposable, you can invest that excess, and your wealth will grow through the power of compound interest. Converting income to temporary wealth through the use of debt doesn’t have a comparable positive feedback loop. Your debt being paid off has no influence on your underlying income, so after you’re able to pay off debt you’re typically back where you started. And in the unfortunate case where you lose your income before your debts have been paid, compound interest will be working against you. Your debts will keep growing while you can’t make payments on them, without providing you any additional value.

So, from a personal finance perspective, it is important to accumulate wealth. But you should do this by accumulating true wealth, slowly saving money from your disposable income over time. Leveraging income to borrow large sums of money won’t truly make you wealthy – it may feel like it while you get to spend money you don’t have, but if you ever want to retire you can’t depend on income alone.

Internet Fandom and (Self) Gatekeeping

There are very few media franchises that I identify as a fan of. This isn’t because there aren’t plenty of things I enjoy, but because in the age of the internet, my perceived barrier to fandom has become incredibly high.

I was reminded of this recently while watching a recent episode of Um, Actually, a YouTube game show (I guess technically it’s a dropout.tv game show) that tests participants’ knowledge of minutia in various nerdy lore. I was surprised that none of the contestants were able to answer a question about Game of Thrones correctly, when I knew the answer before the host had even finished reading it. The subject of the question is directly referenced in the TV show, and possibly in the books as well (but I don’t remember for sure), so the question was not about some tiny detail hidden in the depths of Game of Thrones mythopoeia, it was about a prominent part of the series’ world building.

I’ve read the books, and I watched the first few seasons of the Game of Thrones TV series, but I lost interest and stopped following it somewhere in the 3rd or 4th season. Hence, I would not consider myself a Game of Thrones fan. It’s possible I’d maintain this distinction even without the internet, since I know plenty of people who participate in watch parties every Sunday night when new episodes are airing, but with the internet, I definitely couldn’t consider myself a “real fan”. Being aware of communities full of people devoting seemingly endless hours to dissecting the series’ content and creating content of their own makes my having read the books and knowing the answer to a trivia question seem inconsequential in comparison.

The internet also reminds me of the knowledge (/obsession) that I lack about things I do consider myself a fan of. For example, it would be hard to deny that I’m a fan of Rocket League, but I don’t think I’d be able to make it through the end of this Rocket League specific game show, and I know very little about the eSports (that is, professional competitive play) side of Rocket League.

Maybe others would gatekeep me from Rocket League fandom, but there’s no doubt in my mind that I’m a real fan.

I don’t really have a point to make about this phenomenon or a statement to make about whether I think it’s good or bad. It’s just something I’ve observed about myself and how I relate to media and the communities that are out there on the internet. All the more power to those who consider themselves fans of all sorts of games, movies, books, and shows, but the depths of all the fandoms out there make it hard for me to count myself as part of more than just a few.

My Resolutions for 2019

In my last post I referred to my current approach to many of my endeavors as “vague discipline” (perhaps as opposed to “focused discipline”). I’m not sure this is a real phrase, so I figured I would start this post by elaborating on what exactly I mean. If I employ vague discipline in an area of my life, it means that I consistently carve out time/effort/energy for that part of my life and/or stick to a loose set of rules, but I’m not making a focused effort to always improve, and I don’t self-reflect and change my rules and approach if something isn’t going quite the way I’d like. Some examples where I have applied vague discipline and it has been successful are personal finance and my PhD. The extent of my personal finance strategy pretty much boils down to two guidelines: don’t spend money on things that aren’t worth the cost and use savings for diverse and productive investments. Following those guidelines, I’ve been able to maintain a 20-30% savings rate since I started my PhD, which isn’t as productive as the focused discipline of people who follow the FIRE movement, but puts me in much better shape than most Americans. While I worked on my PhD, my whole approach was pretty much just to show up every day and try to learn something. I didn’t finish as quickly or with as many publications as people I know who took a more focused approach, but in the end I still successfully completed my PhD.

The best example of an area I have been applying vague discipline with results I am not happy with is rock climbing. Rock climbing has been my main sport for over five years now, and for most of that time I didn’t strive for anything specific beyond going to the gym 2-4 times per week. In my first 6 months climbing I saw clear improvements, but after that any progress became much slower and there have been periods of regression as well. In the past ~6 months in particular, I haven’t felt that strong on the wall. There are many potential reasons, but after some reflection I think that it’s because my changing work schedule has led to me cutting climbing sessions shorter, oftentimes before I’ve really even started to push myself.

This leads into my first resolution for 2019. I’ve always known that I could climb stronger if I started climbing specific training or actually got organized about hangboarding, but I’ve never pursued either. I think this is because climbing is one of my sources of “play” so I’m hesitant to apply any strict structures over it. So for 2019, my first resolution will simply be to have at least two climbing sessions per week that are at least two hours long. With work and commuting, it will require some better planning on my part, but it won’t require busting out spreadsheets or anything like that. If, by the end of March I’m still not happy with how strong I’m climbing, I will re-assess and potentially revise the resolution. (To make this resolution more specifically measurable, I’ll say it warrants revision if I’m not able to climb half the V6s in my gym at the end of March.)

My other resolution for 2019 has to do with an area where I haven’t really been applying discipline, vague or otherwise. Since I started my third part time job in August, I’ve returned back to basically a full time work schedule, which means that all my personal projects have fallen by the wayside. It may have actually started before the job, judging by my post history on the blog. While the blog is not equivalent to my personal projects, they are definitely connected, and so my second resolution for 2019 is to publish at least one blog post per month. My hope is that taking time to write (and think about whatever I’m writing about) will reignite progress on a project or two. But even if that doesn’t happen, the reflection involved in writing should help me be more intentional about other areas of my life – namely my work and career. So here’s to 2019 – I doubt it will have as much self-reflection as the middle years of my PhD, but it should at least have more than 2018.

New Year’s Resolutions

I’ve never really made New Year’s resolutions in the past. I’m all for self improvement, and while I’ve made many resolutions over the years related to diet, exercise, personal finance, dental hygiene, etc. that match typical New Year’s resolutions, I never waited until the start of the new year to make them. My attitude has always been that if a change is important enough for me to make, I’ll make it as soon as I realize the change is necessary/beneficial. While the start of the year can be a good time to reflect on potential changes to make in your life, it’s not inherently better than any other times. For this reason, I’ve often bought into the stereotype that most New Year’s resolutions only last through January – if you need an arbitrary date to make a change, is the change really important enough for you to stick with it?

However this year it looks likely that I’ll be using the arbitrary date of January 1st (or maybe just the month of January, I’m not sure I’ll have my resolutions sorted out in SMART fashion in the next two days) to launch some resolutions. Luckily for me, it seems the stereotype is wrong and most resolutioners are at least partially successful.

There are two main factors motivating this for me. The first is that while in some ways 2018 was a big year for me (I got married!), in other ways it felt stagnant. I think this is mostly due to the fact that 2018 was the first year I wasn’t a student. And while I’ve picked jobs so far that lead to my day to day life being similar to when I was a student, I don’t have the overarching structure where my small, everyday progress is leading to a graduation/degree. Even though I have chances to learn every day, I don’t think I’ve done enough thinking about where I want that learning to take me – and if I don’t particularly care, I haven’t justified that to myself. The second factor is that my wife is in the middle of some fitness goals where she’s made inspiring progress. Seeing her progress is a good reminder that taking a structured approach to tackling goals is way more productive than the vague discipline I’ve been employing recently.

So while I am perhaps resolved to have a resolution or two for 2019, I have yet to figure out the specifics. The short term resolution I will make for now is that within the next two weeks I’ll determine what resolution(s) I want to make for 2019 and write about it in a follow up blog post.

Edit: I forgot a big part of why I don’t like new year’s resolutions, but now that we’re a week into January I’ve been reminded. Around the new year, resolutioners make the gym and produce section of the grocery store crowded and unpleasant. If they spread out the times that they decided to start their resolutions, this wouldn’t happen. Some anecdotal evidence against the article I linked above is that by the end of January, everything is always back to normal.

Making digital art: IM T-shirt design

For my entire college career, I’ve been heavily involved in intramural sports, both in my undergrad studies at Cal and in my graduate studies at MIT. At Cal, I was only involved as an athlete, but at MIT I’ve been more involved on the leadership side (MIT IMs are almost entirely organized by students). Currently we’re running a competition to design the new IM champion T-shirt, and I decided to submit an entry. While I’m no expert on design (just a sometimes artist), I thought it might be useful to document my process here in case other similarly non-expert designers would find it useful for their own work. Here’s the final product, if you’re interested in seeing how I got to this point, read on:

IM-shirt-LWBefore one can start with the design, you need to come up with the concept. For this design, I wanted to riff off the MIT mascot (the beaver, “nature’s engineer”) in a way that’s relevant to intramurals. I wanted a design that addressed that the T-shirt was the prize for winning a championship and that IMs are the most informal manifestation of organized sports in the college environment. The concept I came up with was a beaver holding a championship cup hewn from a log. After coming up with the concept itself, the first step in my design process was to sketch out a few different versions of it:

logo-sketches

Ideally the sketches in this part of the process would have more variation than the ones here. I guess it worked out that they were so similar in this case because I was happy enough with my concept that I didn’t need to iterate much. I did use the sketches to block out the design, and hone down exactly how I would try to draw the beaver (which is a lot harder to draw than a cup). It also helped me nail down a few details, like the cup handles being made from twigs and the neck of the cup having a beaver-chewed pattern. After the sketches, the next step was to draw a cleaner version in ink rather than pencil:

logo-drawing

If I was more handy with vector based image processing programs (programs like Adobe Illustrator or Inkscape), I think I could skip this step: I’d be able to make an iconic, high-contrast image entirely digitally. Since I don’t have a ton of experience with these programs, it’s much easier for me to draw an image the old school way. From the photo of the drawing, I do some post-processing (increasing the brightness and contrast so it looks as close to two tone as possible) and then feed it into autotracer.org a cool, free, online tool that “vectorizes” bitmap images. The output is something like this:

high_contrast_-_darkened

With the output from autotracer, I have a high contrast image more amenable to digital editing. For the T-shirt design, I wanted a white image and text on a black background, so some minimal editing gives the final T-shirt design:

IM-shirt-LW

I hope you like the design and enjoyed reading about the process, and if this inspires you to make some digital art of your own, I’d love to see it!

Why I made a personal website

One of the requirements of the course I’m enrolled in this semester, MIT Massive, is to create and maintain a blog. We were provided with a turnkey blog framework, but I decided to create a custom personal website instead and added this blog to it. Making a custom site was a lot more work than the default option (and I’ve barely added anything to it yet!), but I felt it was an important step in acting congruently with some beliefs I’ve developed about the current state of education related to assessment and GPAs.

The problems with GPAs

Anyone who has been through the U.S. education system is familiar with the grade point average, or GPA. Ostensibly, the GPA is a quantitative measure of students’ knowledge and competency in all of their academic pursuits. It is a convenient way to quickly compare different students, since it boils down their achievement to a single number. GPA is weighed heavily in university admissions decisions (for both undergraduate and post-graduate programs) as well as in hiring decisions at many companies, and I think this is the case primarily because using GPA is convenient.

I think the continued use of GPAs is a mistake and I’ve become increasingly convinced that 1. GPA doesn’t measure overall academic knowledge and that 2. using a single number to report academic achievement is hopelessly flawed.

What GPAs actually measure

First, if GPA doesn’t measure academic knowledge, what does it measure? Tautologically, a high GPA indicates that the student earned high grades, and this could have resulted from a number of reasons: they are smart, they are hardworking, they care deeply about their grades, they have deep academic content knowledge, they cheat on exams or their family has the resources to provide academic support such as tutoring, to name a few. While some of these reasons are aligned with the intended purpose of GPA, some are definitely not. Research suggests that GPA is most strongly correlated to self-discipline, which is undoubtedly a useful characteristic to measure and is important to success. That being said, because most academic environments are “artificial,” in the sense that there is a single correct answer a student is asked to find (a situation not often encountered in real, innovative work), some companies are finding that GPA has little to no correlation to job performance. I would also argue that even if GPA is a good measure of self-discipline, a metric which measured knowledge and competency more directly would be more valuable. In the current system, a lot of time, effort and money (on both the student’s side and the educator’s side) are spent awarding high GPAs and providing evidence of good work ethic without the student actually internalizing the material they are supposed to be learning. Anecdotally, I know this to be true because I took college freshman chemistry alongside classmates who passed AP chemistry (and therefore could have skipped the class had they wanted to), but still struggled with concepts that were covered in my intro high school chemistry class.

The fallacy of distilling student achievement into a single number

Second, why is trying to measure academic achievement with one number flawed? For a very long answer, you could refer to The End of Average by Todd Rose (a book which I thoroughly enjoyed and highly recommend), but even if we take “average” academic achievement as being an acceptable idea, the GPA still has problems. There are two main arguments one could make for the value of using GPA to judge students: that it is a useful tool for comparing the relative achievement of students or that it is a useful tool for comparing the absolute achievement of students.

If we consider GPA as a tool to measure the relative quality of students, it would only work within the same system (e.g., within the same school). This is fine for globally famous institutions, but high school GPAs are purportedly important even though there are very few high schools that a majority of college admissions officers would know by name. I earned a perfect, non-weighted 4.0 from Sir Francis Drake High School, but I think very few people would argue that holds the same weight as a 4.0 from Phillips Exeter Academy, even though Drake is a “California Distinguished School.” My 4.0 would also mean something different than a 4.0 from a rough inner-city high school (their’s would be a better indicator of resilience to adversity, for example). Context is important to communicating student performance and academic achievement, and GPA doesn’t provide any context.

In theory, GPA could be reasonable as a measure of a student’s absolute level of academic achievement, but it doesn’t appear that GPA fulfills this role in practice. If GPA should reflect absolute academic achievement, then we would expect that schools which perform poorly (e.g., on standardized tests, although those have their own slew of issues) would tend to give lower GPAs. In reality, you can find students with perfect or near perfect GPAs at any school, regardless of how well the school is preparing its students for employment or their next step in education. This can also be seen in “grade inflation,” which is the practice of better grades being given with each passing year. The data show that despite college grades improving significantly over the past few decades, students are more disengaged from learning, spend less time studying, and are less literate than in previous decades. I don’t think GPAs could be treated as an absolute measure unless some outside governing body was given control of assigning student grades, a prospect about as unlikely as scrapping the concept of the GPA altogether.

An alternative to GPAs: portfolios

While GPAs have their issues, we still need a way to assess students’ academic achievement, so what’s a better option? I think a reasonably implementable answer is student portfolios. A student portfolio is a collection of the student’s most exemplary work, selected and organized to emphasize the student’s strengths. Since the portfolio includes actual content they’ve generated, it allows the student to provide direct evidence of their mastery of subject matter. Ideally, project content included in a portfolio would be more closely aligned to work that would be performed in “the real world,” and would thus be much more useful than the result of an artificial test. The portfolio would therefore provide a much richer way for admissions officers or potential employers to evaluate the student than a transcript. Having students focus on building a portfolio rather than a GPA could also be pedagogically advantageous, because instead of “teaching to the test,” instructors would be incentivized to design assignments that would result in strong portfolio items, which would map more closely to genuine learning.  The single number provided by a GPA provides very little information, but part of a project included in a portfolio provides direct evidence of that student’s achievement.

Motivation for my personal website

What does this have to do with my making a personal website? So far in my academic career, I’ve benefited heavily from having a high GPA, but if I want to show potential future employers (among other people) that I have real content knowledge and experience, I need a portfolio of my own. As I add more content to the website, I hope it will play that role, and I’ll be able to share work I’ve done which has had outcomes more significant than a grade on a test. And at the very least, the website itself is inherently demonstrative of what I’ve learned about web development.