YouTube: https://youtube.com/watch?v=gLDHs3195u4
Previous: The Priest Who Stole China's Biggest Secret
Next: Mongols Attacked And The Earth Fought Back

Categories

Statistics

View count:244,386
Likes:8,423
Comments:692
Duration:12:47
Uploaded:2025-11-24
Last sync:2026-08-02 23:00

Citation

Citation formatting is not guaranteed to be accurate.
MLA Full: "The Quantum Quest for a Perfectly Random d20." YouTube, uploaded by SciShow, 24 November 2025, www.youtube.com/watch?v=gLDHs3195u4.
MLA Inline: (SciShow, 2025)
APA Full: SciShow. (2025, November 24). The Quantum Quest for a Perfectly Random d20 [Video]. YouTube. https://youtube.com/watch?v=gLDHs3195u4
APA Inline: (SciShow, 2025)
Chicago Full: SciShow, "The Quantum Quest for a Perfectly Random d20.", November 24, 2025, YouTube, 12:47,
https://youtube.com/watch?v=gLDHs3195u4.
Start, restart, or continue your college journey with Study Hall! Take a college course that starts on YouTube and earn credit before you even apply to college. Go to https://link.gostudyhall.com/scistats to learn more.



















Have you ever wanted to put your virtual d20 in "dice jail" after an unlikely series of truly terrible rolls? Does Spotify's latest shuffle algorithm not seem random enough to you? This episode is all about RNGs and random number generation — why we don't always want true randomness, and how we can get truly random numbers when we do.



















Hosted by: Hank Green (he/him)









----------









Support us for $8/month on Patreon and keep SciShow going!









https://www.patreon.com/scishow









Or support us directly: https://complexly.com/support









Join our SciShow email list to get the latest news and highlights:









https://mailchi.mp/scishow/email









----------









Huge thanks go to the following Patreon supporters for helping us keep SciShow free for everyone forever: Jaap Westera, Alex Hackman, Blood Doctor Kelly, Toyas Dhake, Matt Curls, Piya Shedden, Jason A Saslow, Kevin Knupp, J.V. Rosenbalm, Garrett Galloway, Steve Gums, David Johnston, Bethany Matthews, Chris Curry, Chris Peters, Chris Mackey, Jeremy Mattern, Adam Brainard, Kevin Bealer, Alan Wong, Joseph Ruf, Lyndsay Brown, Cye Stoner, Jp Lynch, Eric Jensen, Friso









----------









Looking for SciShow elsewhere on the internet?









SciShow Tangents Podcast: https://scishow-tangents.simplecast.com/









TikTok: https://www.tiktok.com/@scishow









Instagram: http://instagram.com/thescishow









Facebook: http://www.facebook.com/scishow









Bluesky: https://bsky.app/profile/scishow.bsky.social



















#SciShow #science #education #learning #complexly









----------









Sources:









https://docs.google.com/document/d/e/2PACX-1vSPXEcbWUpET7irLcmwgdtVrIejWvmAqTYB5BOPP_Qgoa8xdUKckpHoIRKd-vdTKPX1SYtriooU-R5R/pub
Behold, the d20!

With 20 sides, there’s  a 5% chance you’ll roll any given number, from the coveted Nat 20, to the dreaded Nat 1. But if you’re a fan of DnD, or any other  dice-based Table Top Role Playing Game, you probably know one person who is infamous for rolling terribly despite the odds.

Like, out of three separate rolls,  they get a 2, a 4, and then a 2 again… even when they’re using, like, a virtual die. And those things rely on a random number generator to pick which “side” comes out on top. So it’s not even a skill issue!

But if such a program is truly random,  how can their luck still be so bad? Whoever wrote the code to generate those numbers must not know how the laws  of probability work…Right? Well, no.

They do. But maybe, if we all take a  moment to learn how random numbers are generated on computers, and  how one online platform has gone quantum for their dice rolls,  we can set the record straight. [♪ INTRO] There are loads of reasons why you’d want a computer to give you a random number. In fields like cryptography  and weather forecasting, it’s vital that the numbers be truly random.

But then there are things like  video games and Spotify Shuffle, where people often say they want something  random, when that’s not really true. In physical and virtual casinos,  randomness is strictly controlled by law. Like, the house can’t cheat  shuffle cards in blackjack.

Same goes for pulls in mobile gacha games. If you don’t know what that is,  that’s probably for the best. But for shuffling songs on Spotify,  it’s been known for years that the company tweaks their algorithm  to make it less truly random, and more in line with what their human  listeners think random looks like.

That’s because people tend to think of  ‘random’ as meaning ‘well-spaced-out’. So the exact same song appearing  twice in a row feels less random, even when it really is chosen randomly. The same goes for random chances in video games.

Famously, in the series XCOM, there are hidden modifiers that prevent long streaks of bad luck. And in Baldur’s Gate 3, the developers  added an optional “Karmic Dice” setting to avoid too many failed  rolls in a row…for both the player, and all of the enemies they’re batting against. Meanwhile, veteran game designer Sid  Meier once said that showing players the odds made them more likely to complain about being let down by random number generators.

Human psychology just does not  do well with true randomness. Like, I can show you the math and explain,  “If you roll three d20s, 8000 times, you would expect Nat 1s to show up on  all three of the dice about one time”. And you can buy it, in theory.

But then, if you ever did  get three 1s on your rolls, you’d swear that something fishy was going on. And sometimes, if the dice really  are putting a dampener on the DnD storytelling experience, a  good DM will fudge things for the sake of having fun with their friends. But let’s say you really do want to  produce truly random numbers on a computer, for something that’s a bit  more business than pleasure.

Say you’re looking to calculate how  risky a certain investment would be. Or you need to model something  super complicated like the weather. One very popular tool you could use is  something called a Monte Carlo simulation.

It’s named after the famous casino in Monaco, because it uses random numbers like a casino, and its inventor knew someone  who was a big gambler. The idea behind a Monte  Carlo simulation of any kind, whether you’re an entrepreneur or a physicist, is that there’s some distribution  of numbers you want to learn about. For whatever reason, it’s hard  to access the full distribution.

But if individual samples are a lot easier to get, you can pick those at random  using a random number generator, or let’s just say RNG. And if you do that sampling enough  times, you can learn about the full distribution without having to  literally test every possible scenario. But how do you get your computer  to choose those samples?

It turns out, the vast majority  of digitally random things… from Spotify shuffle to Monte Carlo simulations… don't actually rely on truly random numbers. Instead, they’re only pseudo-random,  generated by pseudo-RNGs. We could easily spend an entire  episode talking just about pseudo-RNGs, but the gist is that each one does a bit of math to create a number sequence that  looks random.

Key word: looks. For example, there are formulas you can use to calculate the digits  of pi. 3.1415926 and so on. As you write those digits out, it sure  looks like someone just picked a number between 0 and 9 over and over.

So for a DnD player who needs to  roll a virtual d10 all the time… say, a warlock spamming Eldritch Blast… you could create an RNG where every  subsequent roll is just the next digit of pi. However, if that player catches onto  your using that specific formula, all they need to do is figure out where  in pi’s digits your RNG started to know the results of every future  roll they’ll ever make. Their rolls aren’t really random.

How would they manage to  figure that out? I don’t know. Maybe their patron told them.

Now if you want some fancy  jargon, computers need to use pseudo-RNGs because they’re deterministic. That means they can only do pre-programmed, specific instructions with predictable outcomes. But that’s not automatically a bad thing.

There are lots of fancy math functions  out there that can create number sequences that are almost indistinguishable  from those you’d get from a true RNG. They’re good enough to use  in fields like cryptography, where not being able to predict the next  number in a sequence really matters. Pseudo-RNGs work just fine, so long as you choose the starting point of the sequence unpredictably.

In the case of our warlock friend, your program might pick the starting  point within pi’s digits based on the computer’s internal clock, and the  exact time they made their first roll. For most purposes, like rolling  virtual dice, this is good enough. But if you want true randomness,  you have to use something other than a regular computer.

And for that you also have lots of options. But before we get into it, here is a  non-randomly selected advertisement. If you want to learn more  about randomness and chance, check out Study Hall’s new Statistics course.

Statistics pulls back the curtain on  the numbers that explain everything — from medicine to public policy  to your roll in Baldur’s Gate. And with Study Hall, you can earn  college credit right here on YouTube. Here’s how it works: Watch the statistics course videos  on the Study Hall channel for free, then sign up for an online  college course led by ASU faculty for just $25 and apply what you’ve learned.

If at the end of the course you’re  happy with your grade pay $400 (about a third of the cost of a college course!) to get 3 transferable college  credits on your transcript! Whether you’re looking to brush up  your math skills, earn college credit, or just prove to yourself that you can do it, Study Hall can help you reach your  goals without the financial risk! Check out the link in the description  or go to GoStudyHall.com to learn more.

If you’re looking for a physical  system that’s a true RNG, dice rolls are a good place to start. People have been using them to  generate randomness for millennia. And no human or computer can reliably  predict how your dice are going to land.

Now, technically, if you knew the exact  speed and direction those dice are thrown, you could simulate the roll and  calculate the actual result. Much like knowing the starting  point for a pseudo-RNG. Dice rolls are governed by the laws  of classical, Newtonian physics.

And we know that these laws are deterministic. However, you’d need impossible levels  of precision in your calculation, because even the slightest deviation can totally change which side the dice will land on. To use even more jargon, dice rolls are chaotic.

Which means in practice, dice  rolls are as good as random. So problem solved. If we want a Monte Carlo simulation  to accurately predict the weather, all we need to do is…work out how  to roll a billion dice a second.

Or, y’know, we could find a different  physical system that’s just as reliable, just as random, but also much faster. Thankfully, we have several  options at our disposal. But before we get into them,  we need to distinguish between classical randomness, and quantum randomness.

Classical randomness comes from us  not knowing certain information. A coin toss wouldn’t be  random if you could calculate its exact path through the air in advance. It would be either heads with 100%  certainty, or tails with 100% certainty.

But for a practical Real World example: the website random.org has been  churning out classical random numbers since 1997, using analog radios  tuned to unused frequencies. The static noise on those channels  is random signals in the atmosphere, from stray radio transmissions,  particle collisions in the air, and even from the big bang itself. That means that despite  being classical randomness, the website’s numbers are good  enough for basically any application… including your friend who needs to roll  ten d6s for their level 5 Fireball.

But it turns out there’s another  kind of randomness in nature. One that is actually fundamental…not  just due to a lack of information. This is where the quantum comes in.

If you had a quantum mechanical coin  toss…say, an atom that can either be spinning in one direction or the other… then it truly, genuinely  cannot be predicted in advance. Knowing all possible information  about this quantum coin pre-toss would not be enough to resolve the ambiguity. The chance really is 50/50 up until it “lands”.

Or at least, that’s what the  leading theories tell us. Quantum mechanics has been  around for about a century, yet experts are still debating whether any  kind of randomness is truly fundamental. But something people don’t  talk about too often is this: in the real world, quantum systems  also have classical randomness.

If you’ve created a quantum  coin, you can’t guarantee you’ve prepared it in that exact 50-50 state. Regular old lab problems can change  the odds of your quantum coin toss. Like, if the lasers that prepare  the atom aren’t aligned perfectly, you may end up with, say, 55-45.

In other words, you can have  classical uncertainty from not knowing what state the coin is in, and quantum  uncertainty that’s intrinsic to the coin. And these two sources tend to just  blend together in any given experiment. So while a variety of quantum RNGs  have been available for over a decade, it can be hard to actually prove that  they’re using true quantum randomness.

In 2025, a new paper proved that a  specific quantum RNG was truly quantum by using its outputs for a task that  only a quantum computer could do. But yes, it was both tricky  and time-consuming to test. In fact, all the RNGs we’ve mentioned  still don’t produce reliable random numbers fast enough for all  the applications people need them for.

Like, random.org actually places quotas on how many numbers you can take from them. They can only generate so many at once. So in 2021, a team of researchers  made a new RNG that they claimed could produce hundreds of trillions of fully  quantum random numbers per second.

Like many other quantum RNGs, this  one uses the quantum nature of light. That’s because in modern labs, it’s easy  to quickly and reliably produce light in controlled quantum states, like  our quantum coin toss from earlier. And fundamentally, lasers emit individual particles of light using quantum processes.

So it’s impossible to predict exactly  when a single particle will be emitted. Now, usually when making a laser, the point is to make the beam as  focused and tight as possible. But the team had the innovative idea  to make their laser highly diffuse.

By spreading the beam way out,  they could randomize not just when, but where particles of light hit  a screen at any given moment. So the random number came from seeing whether a point on the screen lit up or not. As for how fast the RNG  could produce those numbers, it helped that the team had advanced  light detectors that could record random flashes all over the screen at  basically a trillion frames a second.

All of this might be overkill,  but quantum RNGs have found their way to DnD players. Or whichever TTRPG floats your boat. In 2022, the virtual tabletop platform  Roll20 announced a new feature called Quantum

Roll: a quantum guarantee that the dice rolls they produce  are as random as possible. They claimed to get those results  from a physical, quantum source. Now, Roll20 are kinda vague on  exactly what kind of quantum system is behind their dice rolls, chalking it  up to, quote, “quantum fluctuations”, which could mean a few different things. But something to note is that these  sorts of quantum RNGs can often be hard to tell apart from classical  effects, for reasons we discussed earlier.

Whether or not those sources are truly quantum, I’m sure DnD players are still going  to accuse it of cheating the next time they have a 90% chance to hit that  Albert, and whiff it three times in a row. [♪ OUTRO]