Randomness is CS is a really cool topic. I had to read a lot about it, when i worked with some physicists on oil particle simulations. They really needed it to be statistically random, for the simulation to be accurate, since the method used a lot of heuristics. I remember in the end we settled for some variation of a xorshift.
Nobody says, that you can't generate a unique number. What we're saying is, that you can't generate a random number from nothing. You need a seed in computers. But it doesn't matter, because if you need actual security, you can always point a camera at a tree and use the pixeldata. It's just as effective as the wall of entropy (cloudflare). For games (Singleplayer & Multiplayer) currentTime is completely sufficient. Or even CPU usage spikes, what ever comes into your mind Still a good video, i enjoyed it
Hm yes but many peoople actually don't understand this properly or just dont know. I usually hear people saying just that computers can't generate random numbers and no one tells you that they can so that's why I made the video
@@lowlevelgamedev9330 The title is misleading though, I understand it the way Sekki explained and was expecting you'd somehow argue against that. Was kinda waiting for you to "get to it" the whole video until I realized you're not going to lol
@@lowlevelgamedev9330 You're speaking of a pseudo random number, right? I don't remember that you spoke about actually generating real random numbers with a computer
I remember i once made a random number generator which used an intentional race condition between a thread which sets a variable to time%2 and a thread which sets a variable to time%2==0 I think i remember getting a pretty good distribution when constructing bytes out of random bits generated this way
Other idea a Kernel Level Programm that exposes an API that just hashes the RAM, Each computer is diferent, computers are as diferent or more diferent then humans and no human being or quantum computer could ever predict the state of RAM Programms, Virtual Addresses, Boot Order, Drivers, Ethernet Buffers, and 1000000000... more Each boot is guaranteed to be diferent RAM even if something in the internet changes like a IP a programm reaches for and the rest is asumed to be 100% the same RAM would be diferent
Actually, no. Just start two virtual machines with the same image, same inputs, same time, same CPU cycle count, etc. And you get two identical RAM data. Of course, this is only theoretical, but it is not *random*. Still deterministic, but very, very obfuscated.
Is it not true that with a small number of iterations random number generators can appear random, but given enough iterations patterns start to appear?
Even if there a truley random component in our decision that still doesn't allow for free will, randomness is by definition random, so you making a decition based on a quantum random coin flip in your brain doesn't really make it free will.
yes but that won't have a good distribution, usually most junk ram has either 0 or paterns, you can try to read junk memory at random and you will see the word microsoft leftover there very often
can you just... use multiple less-effective random number generators with the mathematically perfect version to get a RNG that is unpredictable yet extremely perceptually versatile? Like have a switch statement with a bunch of values, and have the first X bits of the initial mathematically perfect version hook up to switch cases that then return their own RNG function's value :o ...it'd certainly be slower, but if you REALLY REEEEALLY need a random value it could work
yes, tho it will be probably biased. And that is not good for cryptographic stuff. It will also probably take a lot of MS to compute a 64 bit number in this way
well I don't really understand the question so I do my best to explain, so there are pseudo random number generators that work by shifting and flipping bits, you have to keep in mind that just flipping a bit will have a bad distribution. And if you start from a true random number and you change it it's still true random, but if you just flip bits every number the sequence won't necessarily be very well distributed
This video's not all bad, but the premise is incorrect. Effective randomness is achievable, but effective randomness is not true randomness. True randomness DOES NOT exist in computers. Do some people misinterpret this fact and give up too soon on achieving effective randomness? Perhaps. But you are making the conversation muddier and worse, rather than clearer and better. Also, I know this video is more likely to be cIickbait than truly made in error, and if so I'm giving you exactly what you want by responding. But teaching these things accurately is important, so I'm willing to take that risk.
@@lowlevelgamedev9330 It's like you either didn't read, or didn't comprehend my comment. If you haven't yet, try using Google Translate to read it in your native language.
This video is exactly what I thought it would be before clicking. Surface knowledge and misunderstanding. 1. Rng is fair if it has uniform distribution, funny how this basic theory part is not even mentioned, and that alone renders useless all your real data approaches(imagine all die rolls being rigged) 2. Determinism is an important feature, because it allows you to reproduce simulation, and this 'debuggable' feature should be exploited by engeniers. (that's why they use prng in scientific simulations) 3. prng's only disadvantage is that it can be cracked(cause you have repeating pattern), so it cannot be used in fields like cryptography. But in every other application, determinism, speed and simplicity always outweigh and for games prng is more than adequate solution
Regardless of this video, there are only random numbers as far as your definition of "random" is. There is no truly random events in a reality governed by physics. So all you're doing is going another level of obscurity up. Thats all, but its "good enough" for most applications.
Randomness is CS is a really cool topic.
I had to read a lot about it, when i worked with some physicists on oil particle simulations.
They really needed it to be statistically random, for the simulation to be accurate, since the method used a lot of heuristics.
I remember in the end we settled for some variation of a xorshift.
They say video games arnt random, but im about to name my next steam account after the ammount of time it takes for a ceisum atom to decay. Checkmate
Nobody says, that you can't generate a unique number. What we're saying is, that you can't generate a random number from nothing. You need a seed in computers. But it doesn't matter, because if you need actual security, you can always point a camera at a tree and use the pixeldata. It's just as effective as the wall of entropy (cloudflare). For games (Singleplayer & Multiplayer) currentTime is completely sufficient. Or even CPU usage spikes, what ever comes into your mind
Still a good video, i enjoyed it
Hm yes but many peoople actually don't understand this properly or just dont know. I usually hear people saying just that computers can't generate random numbers and no one tells you that they can so that's why I made the video
@@lowlevelgamedev9330 The title is misleading though, I understand it the way Sekki explained and was expecting you'd somehow argue against that. Was kinda waiting for you to "get to it" the whole video until I realized you're not going to lol
It was fun to watch though, I should say xD
@@lowlevelgamedev9330 You're speaking of a pseudo random number, right? I don't remember that you spoke about actually generating real random numbers with a computer
@@lowlevelgamedev9330 Not most people I know. Even the non-technical types.
if (rand() == notRandom) {
randomIt();
}
rand() != Random
I remember i once made a random number generator which used an intentional race condition between a thread which sets a variable to time%2 and a thread which sets a variable to time%2==0
I think i remember getting a pretty good distribution when constructing bytes out of random bits generated this way
Other idea a Kernel Level Programm that exposes an API that just hashes the RAM,
Each computer is diferent, computers are as diferent or more diferent then humans
and no human being or quantum computer could ever predict the state of RAM
Programms, Virtual Addresses, Boot Order, Drivers, Ethernet Buffers, and 1000000000... more Each boot is guaranteed to be diferent RAM
even if something in the internet changes like a IP a programm reaches for and the rest is asumed to be 100% the same RAM would be diferent
Actually, no.
Just start two virtual machines with the same image, same inputs, same time, same CPU cycle count, etc. And you get two identical RAM data. Of course, this is only theoretical, but it is not *random*. Still deterministic, but very, very obfuscated.
Is it not true that with a small number of iterations random number generators can appear random, but given enough iterations patterns start to appear?
yes totally true, I show that in the vid later
Random = rand() * time(0) *pointer_sum_of_digit()#no im not putting a semicolon.....;
Even if there a truley random component in our decision that still doesn't allow for free will, randomness is by definition random, so you making a decition based on a quantum random coin flip in your brain doesn't really make it free will.
hm, interesting point, than I guess by this definition we can say that there can't be free will?
I think we can (at kernel mode) read memory at random(based on seed or something) address * random number % another random number
yes but that won't have a good distribution, usually most junk ram has either 0 or paterns, you can try to read junk memory at random and you will see the word microsoft leftover there very often
can you just... use multiple less-effective random number generators with the mathematically perfect version to get a RNG that is unpredictable yet extremely perceptually versatile?
Like have a switch statement with a bunch of values, and have the first X bits of the initial mathematically perfect version hook up to switch cases that then return their own RNG function's value :o
...it'd certainly be slower, but if you REALLY REEEEALLY need a random value it could work
nope, not for cryptographical reasons. Combining multiple PRNGs can actually get a worse result mathematically. So its a little more difficult
@@lowlevelgamedev9330 damn, I never would've expected that. Thanks for the fast reply!
2:01 how accurate you described my regex-snake game)
bro you made snake in regex? 💀
@@lowlevelgamedev9330 yes, do you want to see it?)
@@lowlevelgamedev9330 Have I replied before?
@@lowlevelgamedev9330 Have I replied before?
I give up
this comment is not random
or, is it?
Vesause theme starts:
Couldn't you use a race condition to generate truly random numbers?
yes, tho it will be probably biased. And that is not good for cryptographic stuff. It will also probably take a lot of MS to compute a 64 bit number in this way
@@lowlevelgamedev9330 True...
i did a leaf tree to see how random a computer is and i can definitely say it is random. there was no trend.
Would it be possible to get a random number by flipping a psudo randomly picked bit that is inside of a random number's bytes?
well I don't really understand the question so I do my best to explain, so there are pseudo random number generators that work by shifting and flipping bits, you have to keep in mind that just flipping a bit will have a bad distribution. And if you start from a true random number and you change it it's still true random, but if you just flip bits every number the sequence won't necessarily be very well distributed
Why not use framerate for the seed for randomness?
I'm not sure if it's a good idea to have your random seed tied to something like framerate...
You would let your game run arbitrarily at whatever frame rate the users hardware can handle? 💀
@@SoDamnMetalThat's actually a very interesting concept. A game that goes easy on people who use older devices.
Btw what i meant is using fps instead of time(NULL)
genius idea 😂
🎉🎉🎉
hey! could you please make a quick tutorial for your 3d graphics engine, gl3d?
I should do that, but it will take some time so if you want to use it tag me on my discord and I'll explain you how it works 💪💪
This video's not all bad, but the premise is incorrect. Effective randomness is achievable, but effective randomness is not true randomness. True randomness DOES NOT exist in computers. Do some people misinterpret this fact and give up too soon on achieving effective randomness? Perhaps. But you are making the conversation muddier and worse, rather than clearer and better. Also, I know this video is more likely to be cIickbait than truly made in error, and if so I'm giving you exactly what you want by responding. But teaching these things accurately is important, so I'm willing to take that risk.
and that's why I made the video to show that true randomness exists in computers, I think that movement from electrons is true random
@@lowlevelgamedev9330 It's like you either didn't read, or didn't comprehend my comment. If you haven't yet, try using Google Translate to read it in your native language.
x86 RDRAND instruction produces true randomness.
This video is exactly what I thought it would be before clicking. Surface knowledge and misunderstanding.
1. Rng is fair if it has uniform distribution, funny how this basic theory part is not even mentioned, and that alone renders useless all your real data approaches(imagine all die rolls being rigged)
2. Determinism is an important feature, because it allows you to reproduce simulation, and this 'debuggable' feature should be exploited by engeniers. (that's why they use prng in scientific simulations)
3. prng's only disadvantage is that it can be cracked(cause you have repeating pattern), so it cannot be used in fields like cryptography. But in every other application, determinism, speed and simplicity always outweigh and for games prng is more than adequate solution
what? I literally talk about 2 and 3 and where is your misundertanding at?
Hello there the tittle is very accurate🤝🏿
Regardless of this video, there are only random numbers as far as your definition of "random" is. There is no truly random events in a reality governed by physics. So all you're doing is going another level of obscurity up. Thats all, but its "good enough" for most applications.
as I said in the video, quantum mechanics is believed to be trully random because experimens and data show that.
nice
Yes
Randomness doesn't exist at all, not only in computers but irl too. Or does it?
No, the Universe is deterministic. Nothing is random, everything is calculable.
@@SoDamnMetal
*Quantum physics entered the chat*
@@MercurySteel Just because we lack understanding and data about quantum physics, doesn't mean randomness is happening.
@@SoDamnMetalcan be either way
@@SoDamnMetal no, it's proven to be fundamentally random. There are no hidden variables.
First 😆
нет ты плохой
почему