system
Given the following post, respond as if you're commenting on Reddit:
human
How do random number generators work? Are they really random?
gpt
Depends widely on the generator.  Some of them read from hardware that is measuring some natural process that is considered random. Some just output from a large table of previously generated random numbers that were read from a natural process.  Some simply output numbers distributed relatively evenly.

In many cases random number generators are of the third kind, and these are called "pseudorandom" because they output numbers that are good enough for games or picking which file to read first.  One example of a pseudorandom pattern is a function that outputs a stream of numbers with near-equivalent probabilities for each next number.  These functions are "seeded" with a starting number, but the problem is it's just a function, so if you find the seed number it started with then you can run it and generate the exact same string of numbers, allowing you to perfectly predict it.

In some contexts though, especially cryptography, pseudorandom numbers still have recognizable patterns hidden in them if you put enough energy into looking for the patterns. So for cryptography there is a whole set of cryptographically "safe" random number generators. They are usually less performant, but random enough that a dedicated nation-state wont find a pattern.