A pseudo-random number is like a pretend random number that follows a secret rule, it looks random, but it's not really magic.
Imagine you have a toy box full of marbles, each with a number on it. You shake the box and pick one marble without looking, that’s like a real random number. But if you had a special marble picker that always picked marbles in the same order every time you shook the box, even though it looked like it was picking randomly, that would be pseudo-random.
How It Works
A pseudo-random number generator is like your special marble picker. You start with a seed, maybe the number 5, and then each time you shake the box, it follows a hidden rule to pick the next number. Even though the numbers look random, they’re actually following that secret rule.
Why It Matters
People use pseudo-randomness all the time in games, computers, and even phones! It’s not truly random like rolling dice or flipping coins, but it's good enough for most things, and it doesn’t need any magic.
Examples
- A coin flip that seems random but is actually based on a hidden rule.
- A dice game where the outcome appears random, but it's just following a pattern.
Ask a question
See also
- Can you predict a number that is "randomly" chosen by a person better?
- How algorithms shape what you see on social media?
- How Does I Cracked The Social Media Algorithm Work?
- How Does The Science of Online Dating | Bella Glanville | TEDxPCL Work?
- How Does Intro to Algorithms: Crash Course Computer Science #13 Work?