简体   繁体   中英

Is there a way of getting absolute or non time dependent random numbers in Python or C++

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM