This commit is contained in:
Miloslav Ciz 2024-09-18 20:37:15 +02:00
parent d2cc338141
commit 8604bfc7c0
33 changed files with 1866 additions and 1824 deletions

View file

@ -4,6 +4,8 @@ Pseudorandom data is [data](data.md) that appears (for example by its statistica
A saying about psedorandom numbers states that "randomness is a task too important to be left to chance".
Pseudorandom numbers are not to be confused with [quasirandom](quasirandomness.md) numbers (AKA *low discrepancy sequences*) which are imitating randomness yet in a weaker way (just attempting to be spaced far apart).
## How It Works
Firstly let's mention that we can use [look up tables](lut.md), i.e. embed some high quality random data right into our program and then use that as our random numbers, taking one after another and getting back to start once we run out of them. This is for example how [Doom](doom.md)'s pseudorandom generator worked. This is easy to do and extremely fast, but will take up some memory and will offer only a quite limited sized sequence (your generator will have a short period), so ponder on the pros and cons for your specific needs. From now on we'll leave this behind and will focus on really GENERATING the pseudorandom values with some [algorithm](algorithm.md), but look up tables may still be kept in mind (they might even perhaps be somehow combined with the true generators).