Since rolling my first dice in tabletop role-playing games, I've created charts, tools and methods for creating characters, cities and more. This was the start of my interest in Random() functions and generators.
Here I look at 5 areas making heavy use of randomisation, starting a longer look into the ecosystem, tools and coding.
Random and Pseudo-random
Most randomness used in software is pseudo-random, which passes the statistical tests for randomness but is created by a maths function. True randomness is claimed by some generators, the most prominent being random.org
Most applications of random generation won't care how numbers are created, but it may matter for those in the security sector or processing requiring huge quantities of such numbers.
So lets take a look at a few places where random generation is used.
1) Machine Learning
Incredibly popular in conferences, meetups and student projects, Machine Learning is a field in Data Science many developers want to know more about.
It uses randomisation everywhere, from creating models and driving algorithms to picking data items for sampling and resampling. Much of this is tied to complex statistics which uses R and Python, the main languages of data science.
2) Games and Simulations
In recent years there has also been a growing popularity for online versions of board games such as Carcasonne or Settlers of Catan, which have the same need for random numbers.
3) Random Generators for new ideas
Generators have been used as writing prompts and inspiration for creative types in recent years. They can provide unlikely combinations, a place to start from or list to narrow down.
Springhole.net has generators to create names, characters and plots for novel writers
4 Content Creation / Fake Data
From random sentences on unfinished web pages to the population of test data in databases, randomisation is used in the creation of content and fake data.
There are data generators for all sorts of things but the main one I know of currently is Bogus, a .NET project for fake data generation which I follow on github. It is a port of the more well known faker.js.
5) Generators for Role-playing Games
The last is included for selfish reasons as random tables have been a staple of roleplaying games since before the internet.
There are generators at donjon.bin.sh that will create elements for a game such as characters, to play random encounters on the road, random maps to explore and things for specific rules systems.
I've been looking at random generation on my gaming blog in the last couple of months.
Randomisation is also used to make decisions (like lottery numbers) for people, in security and cryptography, to simulate coin flips and systems with moving parts.
I'll stop at 5 and in the future will take a longer look at terminology, tools and considerations for some of this list.
Leave a comment if you've used random generation in any interesting projects!