-1

I want random numbers so that I can advertise my app as, "Not giving anyone a disadvantage, fundamentally", I am making game about Quantum Uncertainty which is random, not just pseudo random, so I could do:

import random
rnd = random.randint(a, b)

But that is pseudo random, not random, it uses the time to generate these numbers, so it's a disadvantage according to time.

I know of secrets module, but that does it through keystrokes, searches, etc, so it will be an advantage for someone who did the right number of key strokes to get a favouring value.

I want numbers that are not based on previous events such as keystrokes but real-time random numbers. And by time Independent I don't only mean based on "2:30" but also things like heat over a certain period of time or sound disturbances over a period of time.

Is there any way to achieve that?

I know I don't have to worry about these minor details but I don't want to lie when I am advertising but I am making an app about Quantum Uncertainty so I need to be very precise with these stuff. Answer for Python or C++ is okay. This might seem similar to this but isn't. I want numbers that don't depend on on anything as not to give anyone disadvantage but the other question wanted to get random numbers which were really secure and random. That won't work for me because I want numbers which won't be depending on any kind of data but just produced out of thin air but secure random numbers can be predicted although really hard to because my game is about Quantum Uncertainty I don't just need "Practically True Random" but actual true random.

And I just realized that if there is some crazy website which gives live atom decay information, I can use that.

Shambhav
  • 813
  • 7
  • 20
  • Sure, don't seed based on the current time, then you are not time-dependent. In C++ there is a default seed for the default random number generators, which is independent of time (its just a large integer). Also, you can pass your random number generator into a normalising or uniform distribution function to avoid any `disadvantage`. – Mansoor Jan 20 '21 at 12:51
  • 2
    Please explain how any of those methods would provide anyone with an advantage. – molbdnilo Jan 20 '21 at 12:51
  • The won't give anyone a disadvantage in a normal game, but this one is about Quantum Uncertainty, so even if it is just totally random for the player, it doesn't work. Because Quantum Randomness due to particles being a particle and wave at the same time is pure random, – Shambhav Jan 20 '21 at 13:05
  • 1
    @ShambhavGautam There may be some confusion about the use of key-stroke or time as a seed. A seed is just that, an initial value used by a pseudo-random number generation algorithm to produce a list of pseudo-random numbers. There is no `disadvantage` to having a high or low key-stroke count. – Mansoor Jan 20 '21 at 13:17
  • I know how it works, it was just an example, let's say the algorithm produced 100 for 5 strokes, then if the player had stroked 5 times then he would have got 100, that's a problem. The player doesn't know that but he just got an advantage there. That is not a problem but I want to be exact, the game is about science, so it needs to be scientifically true. – Shambhav Jan 20 '21 at 13:24
  • 2
    Does this answer your question? [How to get truly random data, not random data fed into a PRNG seed like CSRNG's do?](https://stackoverflow.com/questions/62375129/how-to-get-truly-random-data-not-random-data-fed-into-a-prng-seed-like-csrngs) – Peter O. Jan 20 '21 at 17:10
  • just use /dev/random on Linux or [cryptoAPI](https://learn.microsoft.com/en-us/windows/win32/seccng/cng-portal) on Windows where the output is taken from truly random sources including RDRAND instruction including in most modern CPUs which uses thermal noise as an entropy source – phuclv Jan 21 '21 at 03:06
  • @phuclv That will work in normal circumstances but, you can do absolute crazy math to predict the output which doesn't happen in Quantum Mechanics. It needs to be true random. – Shambhav Jan 21 '21 at 03:09
  • 2
    @ShambhavGautam no, [thermal noise uncertainty can't be predicted](https://en.wikipedia.org/wiki/Hardware_random_number_generator) and is a true random source – phuclv Jan 21 '21 at 03:15
  • @phuclv How can it be random? It depends on the amount of electric flow, the outside temperature, etc. Those are predictable, this has gone more than computer programming, now it's about science. True random is seen only in Quantum Level from what I know. Others are "Chaotic", prove that thermal noise is random. – Shambhav Jan 21 '21 at 04:44
  • @ShambhavGautam no. you can't know whether a specific electron will move in which direction regardless of the electric field. Did you even read the above link? – phuclv Jan 21 '21 at 04:47
  • @phuclv "(some of which is quantum mechanical in origin)", well, "some" is not enough, some of it is predictable, I know the predictable number, a constant + the true random, a variable, eg. 6 + X, is entirely a variable, but still I am not completely comfortable using these as I don't think it is sure as "Not giving anyone an advantage", if let's say the RNG was 4, then the predictable number was 6, then 6 + 4 is 10 and if 10 gives a favourable number, it's an advantage. – Shambhav Jan 21 '21 at 05:10

1 Answers1

2

Try using this module https://github.com/lmacken/quantumrandom
It gives you tools for interacting with The ANU Quantum Random Number Generator (qrng.anu.edu.au). So it makes your random absolutely random.

amshinski
  • 174
  • 11