There are Random Numbers in Computers!
Вставка
- Опубліковано 4 чер 2024
- In this video, I want to show why random numbers actually do exist in computers.
#programming
Join my Discord:
/ discord
Wishlist Midnight Arrow:
store.steampowered.com/app/23...
Join this channel if you want to support me 😻:
/ @lowlevelgamedev9330
Music:
Frozen Sunrise - Firefly in a Fairytale Backwards
Evan King - Everything is Okay
Evan King - Spicy Boom
/ contextsensitive
contextsensitive.bandcamp.com/
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.
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
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.
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
if (rand() == notRandom) {
randomIt();
}
rand() != Random
Random = rand() * time(0) *pointer_sum_of_digit()#no im not putting a semicolon.....;
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
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 💪💪
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
i did a leaf tree to see how random a computer is and i can definitely say it is random. there was no trend.
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 😂
this comment is not random
or, is it?
Vesause theme starts:
There are rand() and srand() funcționa în cmath library in c++
🎉🎉🎉
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
Hello there the tittle is very accurate🤝🏿
nice
Yes
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
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
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?
First 😆
нет ты плохой
почему