# What Are Random Number Generators Used For?

A Random Numbers Generator (singular Random Number Generator, or RNG) is a system that delivers a random number upon request. While it seems simple, the path to truly random is a challenge of math, science, and philosophy. Can anything be truly random? Is there something in the code that causes specific results, or is there some kind of bias that the user can’t see?

Designing random numbers generator is a challenge for mathematical programmers and math-based thinkers all around because it creates many different questions, but what are they used for? Short answer: almost everything in tech. Here are a few ways that RNG systems are used in security, gaming, and the art world with a touch of the tech industry.

## Random Numbers for Security

The concept of a password goes beyond logging into your email, bank, favorite websites, or apps. A challenge and response system like a password is the backbone of security between two or more entities.

What is the best password? There is a lot of debate about what makes a good password for different purposes, but for automated systems or systems that have little to know human interaction, making up words on your own probably isn’t the best way.

Random number generators are used to create random strings of numbers for passwords. It can get fairly complex, especially if you think about spy or military movies. To get a secret code, you don’t just memorize a passcode or make one up before a mission. There is a system used–a cypher of some sort–that creates a code for you. In old movies, code rings or code books are used to figure out the code.

Random number generators can be used to scramble information to be decoded later with a specific pattern. Random numbers can be pushed through a specific formula or code system to create another set of numbers that seem random as well.

The formula itself can be created with a random number generator. Rather than allowing an enemy to figure out the specific formula used by a group, the formula can be generated and a number generated, then scrambled for later use. It may look like a random mess, but since humans usually aren’t interacting with the numbers in critical situations, it’s a great way to prevent infiltration. Of course,a good thief will look for another way in, but security is a deep world.

## Random Numbers for Gaming

Kingdoms of Amalur. Terraria. World of Warcraft. Rift: The Planes of Telara. Divinity: Original Sin. Each of these games have major differences in the gaming world, but they all share one trait: they’re role-playing games (RPGs) that use RNG systems. Whether RNG is used as a dice-roller or to create unique items for players, RNG is a big part of RPGs.

For most RPGs, random number generators are used to decide success. Did the attack hit? If it’s over a certain number, yes. How much? A specific amount based on how high a virtual set of dice rolled. This is how the fluidity of combat, motion not related to modern understandings of physics, and many other systems are decided. A sword’s cut in real life isn’t a single, static block of damage that can be measured evenly, and dice rolls add simulate complexity.

It’s not just about how hard something hits or whether it misses. A big part of most RPGs are the items or loot that can be obtained or dropped.

Random number generators affect loot in many ways depending on the game. In most games, RNG dice rolls decide whether you receive an item from a database table of loot called a loot table. In some games, dice and loot tables can change what can dropped. Not only do you roll for a chance at a sword, but the sword’s statistics such as slashing damage, piercing damage, and different types of magical effects can be added and varied.

The concept of a loot table is a highly successful, highly controversial part of gaming beyond standard RPGs. If you’ve ever played a game where you pay for a chance to receive an item or a list of items, it’s a loot box system using a loot table. The loot box concept is an extension of the microtransaction world, and allows great financial gains. It may be considered gambling in many formats, but can be changed in multiple ways.

For a longer study on random number generators and loot boxes, look into the older gashapon/gachapon or “gacha” system. The term comes from the capsule toy dispenser, and gachapon is a Japanese onomatopoeia for the sound of cranking the dispenser.

Gacha video game systems were popularized in Japanese card-based video games, which were the earliest games to include in-game purchases years before the advent of mobile games. Fate/Grand Order is a popular example. In Fate/Grand Order (Fate/GO), players take the role of Summoners who call upon fictional rendition of historical figures called Heroic Spirits–or sometimes unknown heroes of the future. These heroes are represented by cards that have different values.

Different cards have different summoning rates. It is possible to obtain the cards through earning points in the game without playing, but it’s faster to pay for more chances–leading to a situation called Pay to Win (P2W).

In Fate/GO specifically, players can either earn an in-game currency called Saint Quartz, buy Saint Quartz in the app’s shop, participate in events with specific chances, or participate in paid events with specific chances.

The use of random number generators, limits to those generators, and the science behind risk versus reward are used in several games that apply gacha/loot box systems.

In World of Warcraft and similar Massively Multiplayer Online Games (MMORPGs), random number generators take on a less complex, but still important role. Gaining more powerful equipment is based on random chance. Progress in MMORPGs is often through defeating enemies, gathering resources, or participating in built-in events similar to modern mobile gacha games. In modern World of Warcraft (WoW), players mostly equip themselves through dungeons and raids.

Dungeons and raids are challenges where 5 players (dungeons) or 10-40 players (raids) challenges powerful enemies (bosses) for specific pieces of equipment. These bosses have loot tables with an RNG system, and in modern WoW, there is an RNG system to boost the power of the loot.

Loot has had a cultural impact on MMORPGs since special items are often coveted. Either group leadership decides where the loot should go, mature players divide items randomly or with their own system, or emotional fights break out over rewards.

There is no shortage of psychology and sociology discussions to have involving rules around loot. While drama and excitement aren’t caused by random number generators exclusively, it’s difficult to separate RNG and its role in video games.

## Summary

The concept of creating random numbers is an example of something innocuous on its own can lead to massive changes. Every example mentioned previously has some flavor of mathematics and engineering.

There is a market for random numbers generators–or rather, different approaches to RNG–as people look for the concept of a truly random number. Continue the discussion or find an RNG concept you need by contacting a developer skilled in probability and statistics.