Why Random Numbers Aren't Random

  Рет қаралды 78,395

Tech With Tim

Tech With Tim

Күн бұрын

Пікірлер: 197
@laurinneff4304
@laurinneff4304 3 жыл бұрын
Another example for real random numbers: Cloudflare (a company which handles a very large part of internet traffic) has a room full of lava lamps with cameras pointed at them, and they use the current state of the lava lamps for their random numbers
@eduardo.chaves
@eduardo.chaves 2 жыл бұрын
That's really cool LOL
@shourya9998
@shourya9998 3 жыл бұрын
I died when he said "I need to talk to you about something that's not random......Our sponsor algoexpert'
@8koi139
@8koi139 3 жыл бұрын
Smooth
@renderize69
@renderize69 3 жыл бұрын
Oh, I see you're dead now. Meet you in heaven.
@MrTaken-tl4bw
@MrTaken-tl4bw 3 жыл бұрын
Tim is genually the embodiment of a nice guy. Also his videos are so amazingly well done and easy to follow. Learnt flask from him and today I'm almost finishing my raspberry pi home server
@JLSXMK8
@JLSXMK8 3 жыл бұрын
Learnt Flask from his channel? Was it easy to use? What is it?
@electricimpulsetoprogramming
@electricimpulsetoprogramming 3 жыл бұрын
@@JLSXMK8 I prefer django.
@JLSXMK8
@JLSXMK8 3 жыл бұрын
@@electricimpulsetoprogramming Open-source Web framework; NICE!!! You a Linux geek?
@electricimpulsetoprogramming
@electricimpulsetoprogramming 3 жыл бұрын
@@JLSXMK8 Actually in just a normal person who prefers django because I'm already comfortable using it and the django's documentation is well done. And about my operational system I use ubuntu since I don't like windows but I don't want to lost the comfort of a easy to use operational system
@JLSXMK8
@JLSXMK8 3 жыл бұрын
@@electricimpulsetoprogramming You use Ubuntu? Well, perfect! Yeah, those Linux terminals and servers are a freaking godsend for programmers!
@timhowitz9405
@timhowitz9405 3 жыл бұрын
In one of cloudflare's offices, they use a camera pointed at a wall of lava lamps for randomness
@Aradiv
@Aradiv 3 жыл бұрын
And you can go there and view them in person if you want to.
@TheDuerden
@TheDuerden 3 жыл бұрын
I just posted that too - was it a Tom Scott video? I feel like it probably was..
@timhowitz9405
@timhowitz9405 3 жыл бұрын
@@TheDuerden Yeah, it was, that's where I got it from
@shravanasati9631
@shravanasati9631 3 жыл бұрын
Damn
@protondev3428
@protondev3428 3 жыл бұрын
@Phoenix 𝙾𝚙𝚎𝚗 𝙼𝚢 PROFILE uuid is usally just an incremented number hashed
@addisumengistu4784
@addisumengistu4784 3 жыл бұрын
Random module in Python was a total mystery for me Thanks tim
@neijrr
@neijrr 3 жыл бұрын
"Why Random Numbers Aren't Random" RNGs based on quantium physics: ok
@tech-learner4555
@tech-learner4555 Жыл бұрын
6:39 idhuku paruthi moota godown layae irukalaamae, You can simple ignore random.seed() know why you have to use it, pass time.time() and then performing the actual functionality again, Thalaiya suthi mooka thodringa broo Edit: yeah actually you said the same just after illustrating this..
@jhonsuper7065
@jhonsuper7065 3 жыл бұрын
Tim your a great youtuber man, you literally just calmly explain everyone how something works. Your videos ALWAYS teach something new. Man lots of respect to you. ♥
@TechWithTim
@TechWithTim 3 жыл бұрын
I appreciate that!
@apren9569
@apren9569 3 жыл бұрын
This video is 100% what i was looking for!
@calitts4708
@calitts4708 3 жыл бұрын
Some channels read our minds and post the exact video we were looking for
@parsanasiri1712
@parsanasiri1712 3 жыл бұрын
Same
@apren9569
@apren9569 3 жыл бұрын
@@calitts4708 exactly, but when it comes from Tim its definitely good info.
@SuadoCowboy
@SuadoCowboy 3 жыл бұрын
twt and codecamp always read my mind
@SatisfyingWhirlpools
@SatisfyingWhirlpools Жыл бұрын
I feel like unless you can predict random numbers you haven’t seen yet from the program, it’s doing it’s job perfectly.
@MinerKingX
@MinerKingX 3 жыл бұрын
that date he is talking about at around 6:20 is called the unix timestamp
@xrafter
@xrafter 3 жыл бұрын
UNIX EPOCH
@lakshyachopra_
@lakshyachopra_ 3 жыл бұрын
Next video suggestion: 1. Why python variables aren't containers but pointers? Or 2. How does for in loop works behind the scenes in python? Edit: what does range function produce (iterator or iterable) might also be a nice video idea.
@ncb4_69
@ncb4_69 3 жыл бұрын
Maybe iterable
@aryankathawale9269
@aryankathawale9269 3 жыл бұрын
try this code and you will get ur ans : a = list(range(0,100) print(a)
@aim2986
@aim2986 3 жыл бұрын
@@aryankathawale9269 that doesnt answer anything
@aryankathawale9269
@aryankathawale9269 3 жыл бұрын
@@aim2986 ok , teach a man to fish , I want him to try doing this himself and not just tell him how it actually works , i could just tell him but that will not help him in long run you see
@aim2986
@aim2986 3 жыл бұрын
​@@aryankathawale9269 your code simply converts a range object to a list then prints it. It doesnt directly show whether the range object is an iterable or an iterator. In order to tell this, he should have known the interface of the builtin list type constructor. Yeah, it is an easy guess even if you dont know, but this is not the only thing to guess. He asks "what does range function produce" so it's obvious that he isn't aware of the fact that range isn't a function. And when the number of guesses increase, it becomes a complicated problem which can't be solved by looking at a code printing a list. If you want to help him in the long run, you could at least put a few links from the official docs explaining these things.
@OpenSaned
@OpenSaned 3 жыл бұрын
When you get a algoexpert ad before a algoexpert sponsored video
@rishilkadakia4779
@rishilkadakia4779 3 жыл бұрын
Wow, that's actually really cool. Great video as always! 👍
@dollarbill8959
@dollarbill8959 3 жыл бұрын
They're called pseudo random generators. In Data science as long as you get the correct distribution it doesn't matter. Plus, setting seeds is helpful as it allows others to reproduce results.
@mightye6669
@mightye6669 3 жыл бұрын
My go to programming KZbinr
@nanajnananajna3124
@nanajnananajna3124 3 жыл бұрын
Question are uuid's generated by the "UUID" module in python also not really random or unique or they are?
@LordKing13
@LordKing13 3 жыл бұрын
thank you bro! I allways wonder why we use time to get random numbers and this video help me a lot!
@tgpsonic
@tgpsonic 2 жыл бұрын
Really amazing video, this is gonna help me alot for an oral test I'm working on. Thank you for all that knowledge, there is alot I will talk about
@TheIndian123
@TheIndian123 3 жыл бұрын
We have been tricked, we have been backstabbed and most probably... Bamboozled
@PBalint817
@PBalint817 3 жыл бұрын
When tech youtubers are out of ideas: "Let's talk about randomness! That should do it!"
@AhmadKhalidNasrat
@AhmadKhalidNasrat 3 жыл бұрын
Randomness in FPGA and other embedded devices which use cryptography is generated from various source, e.g noise, heat and other parameters as I remember in hardware security course I had.
@MrLottoLife
@MrLottoLife 2 жыл бұрын
Your insights are GOLD.
@PvblivsAelivs
@PvblivsAelivs 3 жыл бұрын
Traditionally, in most programming languages, it is measured from midnight 1 Jan 1970 GMT.
@netharuM
@netharuM 3 жыл бұрын
1:09 you wanna be a software engineer at google
@ashwinshetgaonkar6329
@ashwinshetgaonkar6329 3 жыл бұрын
very informative ,it cleared my doubt that randomness can't be programmed.
@johnnyfrankenstein0123
@johnnyfrankenstein0123 3 жыл бұрын
Thank you! Always heard that random numbers aren't random but never bothered finding out until this popped up, very interesting video 👍
@igydkygs00kwhi
@igydkygs00kwhi 8 ай бұрын
Randomness is a philosophy. Nothing is truly random. 💯
@tuhinbhowmick8424
@tuhinbhowmick8424 3 жыл бұрын
The last example was grt..❤️❤️❤️
@JK-cs3sq
@JK-cs3sq 3 жыл бұрын
Great video, Tim. Any chance you could discuss the sys module next time?
@ACodingWoof
@ACodingWoof 3 жыл бұрын
6:10 It's the Unix timestamp by the way.
@jatingera924
@jatingera924 3 жыл бұрын
I am glad my mentor has already told me while learning python. Hat's off to you tim also 😄 and that time was chosen(if I remember properly) cauz unix system was introduced for the first time then. But some platforms use different timeline for doing this.
@yazidziregue7912
@yazidziregue7912 3 жыл бұрын
truly facinating, thanks for the content
@saqibshafin
@saqibshafin 3 жыл бұрын
Thank you very much for the Radioactive Decay portion!!!
@mr-pr0cesss
@mr-pr0cesss 3 жыл бұрын
Thanks, i always had this question that how true random numbers are generated.
@alokkumarsingh4641
@alokkumarsingh4641 Жыл бұрын
very informative thanks buddy
@fadamitanolatomiwas.miguel6626
@fadamitanolatomiwas.miguel6626 3 жыл бұрын
Thanks for the knowledge Tim
@akshatrastogi9063
@akshatrastogi9063 2 жыл бұрын
Wow man! I always thought the same that if the computer program is generating the same random numbers for a given seed, then if we can figure out the underlying dynamics of the code, the random number is no longer random. Glad you clarified my intuition in this video. On that note, I feel that there is nothing in the world which is truly random in nature..we as a human being are governed by some chemistry in each cell in our body...I mean, if I sneeze here and the pressure generated from it may have 1e-100 % of influence in affecting the air flow in some other part of the world. If we can connect them through some mathematical model and have the capability of solving that model with some clestially powerful supercomputers, we can still predict the influence of my sneeze in influencing the air flow at some other place in the world.... :)
@TheDuerden
@TheDuerden 3 жыл бұрын
I saw a video awhile back about a company that used Lava Lamps to achieve 'random' by watching a wall of lava lamps and using a camera to pinpoint where the lava was across them all at any given point. Tom Scott probably made it, I am not sure about that, but seems like the kind of video he would make.
@soulninjadev
@soulninjadev 3 жыл бұрын
that company is called cloudflare
@erfan_ops
@erfan_ops 2 жыл бұрын
Thank you that was a really good explanation
@ShivekMaharaj
@ShivekMaharaj 3 жыл бұрын
Nice Video, Tim. 👌
@danbrown6698
@danbrown6698 3 жыл бұрын
This video is useful and interesting!
@streetboss2371
@streetboss2371 3 жыл бұрын
that is amazing topic bro thankz for share with us in very simple method to understand ❤️❤️❤️
@Gameplayer55055
@Gameplayer55055 3 жыл бұрын
Actually random is something that is predictable, but it is super ultra hard to predict
@kvelez
@kvelez Жыл бұрын
Great explanation.
@fipium
@fipium 3 жыл бұрын
video idea: tutorial on how to generate TRULY random numbers in python
@farzadmoradkhani
@farzadmoradkhani 3 жыл бұрын
It was awesome bro 😎
@mustafatechsolutions
@mustafatechsolutions 3 жыл бұрын
What You Learned WIll In This Video: - seed function of the random module - time function of the time module - how random module works
@abdullahmohammed6115
@abdullahmohammed6115 3 жыл бұрын
very cool vid like always.
@ano3000nymous
@ano3000nymous 3 жыл бұрын
Great knowledge 👍
@OllsKershaw
@OllsKershaw 10 ай бұрын
Is it possible to come up with a new set of numbers that are based on several numbers?
@4_real_bruh
@4_real_bruh 3 жыл бұрын
Problem with randomness is that it doesn't really exist. The entire universe with all of its complex systems might seem to have a whole lot of randomness, but when you pop the hood you find patterns and algorithms. So the best we can do to create seemingly "random" values for secure algorithms is rely on other chaotic factors like interference and radioactive decay of certain atoms or use techniques such as continuous seeding. Keyword "entropy".
@raivisrasnacs1088
@raivisrasnacs1088 3 жыл бұрын
What keyboard are you using? it sounds quiet nice.
@TheRexona1986
@TheRexona1986 3 жыл бұрын
Ty.. very nice explanation.
@flleaf
@flleaf 3 жыл бұрын
6:13 i believe unix was made in the end of 1969 so it starts with that date
@realmodpotato
@realmodpotato 3 жыл бұрын
very interesting but im more curious what ide this is where itll let you launch it on demand from the ide
@jreallyrean8208
@jreallyrean8208 2 жыл бұрын
So, does this imply why some accounts in any gacha or gambling games are lucky/unlucky?
@venkyman4985
@venkyman4985 3 жыл бұрын
According to Schrodinger, all the numbers exist simultaneously until you measure it.
@dimibyk6666
@dimibyk6666 3 жыл бұрын
Now I just have to know the starting point of the numbers of the Powerball
@RAIOXBOX
@RAIOXBOX 3 жыл бұрын
What if theres an engine that also does run the random seed as random aswell? Will it be truly random?
@Pawlo370
@Pawlo370 Жыл бұрын
when i making print(randint(1, 6)) and if computer is loud the 1 is very common
@davidjohnston4240
@davidjohnston4240 3 жыл бұрын
The term "truly random" is a bad term. It doesn't have a proper definition. The properties you want to claim or not claim are uniformity, deterministic, nondeterministic, cryptographically secure and entropic at some level. Python has the RdRand module that works the same way as the random library but provides nondeterministic cryptographically secure random numbers on X86 platforms that support the RdRand and RdSeed instructions.
@ameermuthumama9258
@ameermuthumama9258 3 жыл бұрын
What a perfect time today only I learned about random ()
@Plasmacore_V
@Plasmacore_V 3 жыл бұрын
Shouldn't you use the Secrets module if you want as close to random numbers as possible?
@markdillon9588
@markdillon9588 3 жыл бұрын
Very interesting 👍
@alxt111
@alxt111 3 жыл бұрын
I have a question: You use a for loop to create a random number 10 times. But if you use the same seed, shouldn't you get the same number as a result for every loop iteration? or is the seed altered after one use?
@abdullahmohammed6115
@abdullahmohammed6115 3 жыл бұрын
Basically, every time you use random.randint(), it stores what postion on the sequence you are on. For example, if you call randint() 3 times, it knows that the next time you call it, you want the FOURTH number in the sequence. The seed doesn't just create one number. It creates a infinite sequence.
@nocodenoblunder6672
@nocodenoblunder6672 3 жыл бұрын
@@abdullahmohammed6115 the seed is not creating the sequence. The sequence is the same for all seeds only their starting points differ.
@nocodenoblunder6672
@nocodenoblunder6672 3 жыл бұрын
@@abdullahmohammed6115 I think you would get the same number every time if you called random.seed(1) inside the loop resetting the current position on the sequence.
@alxt111
@alxt111 3 жыл бұрын
@@nocodenoblunder6672 Nice, thank you very much
@abdullahmohammed6115
@abdullahmohammed6115 3 жыл бұрын
@@nocodenoblunder6672 Yes you are right. I just tested it
@TheMahavatarBabaji
@TheMahavatarBabaji 2 жыл бұрын
'radioactive decay' - this only seems 'random' because nobody is aware of the 'seed'.
@zerotwoisreal
@zerotwoisreal 3 жыл бұрын
how does it generate the numbers it chooses for each seed? there must be some way
@gaby8706
@gaby8706 3 жыл бұрын
maybe time
@monsieuralexandergulbu3678
@monsieuralexandergulbu3678 3 жыл бұрын
Random numbers are random But pseudo-random numbers that you can get in all of the programming languages are in fact pseudo-random
@dovos8572
@dovos8572 3 жыл бұрын
you can use a quanten module to make random seeds too. the one and only true random thing in the universe
@rafasantos23
@rafasantos23 3 жыл бұрын
*Python has been lying to me 😞*
@abdullahbinjahed6900
@abdullahbinjahed6900 3 жыл бұрын
it's this way for everything ... there's no true randomness in nature
@Keventor
@Keventor 3 жыл бұрын
Why does the captions say seat when it is seed?
@harshas8399
@harshas8399 3 жыл бұрын
I don't why someone is disliking this video...
@manishtanwar989
@manishtanwar989 Жыл бұрын
How to predict the result of card games in online games
@kenet7877
@kenet7877 3 жыл бұрын
I love your shirt!
@dev3560
@dev3560 3 жыл бұрын
when the floor is not made out of floor
@xijinping3716
@xijinping3716 3 жыл бұрын
I am very Happy today
@its_code
@its_code 3 жыл бұрын
WOW 😳😲 amazing 😍. Love 💕 from Pakistan.
@Craigipo
@Craigipo Жыл бұрын
Random number generators produce strings of numbers that are void of sequences or patterns. 1,4,9,16,25,36,49. 2,3,5,7,11,13,17,19 2,4,6,8,10,12,14,16 Sequences like these will NEVER occur in Random number generator. The RNGs have been programmed to avoid these Sequences. Strings of numbers that statistically should occur are omitted.
@pushpajitbiswas3752
@pushpajitbiswas3752 3 жыл бұрын
mystery of the random number is now revealed.
@melissaleigh3013
@melissaleigh3013 3 жыл бұрын
Thanks can u post fresca again pls
@rp7r54
@rp7r54 Жыл бұрын
What is your opinion of a man that has a Mathematical equation or formula to predict winning Mega Millions numbers and Powerball numbers?
@stavros222
@stavros222 3 жыл бұрын
and i was wondering what seed in minecraft exactly does
@williamdinkel2304
@williamdinkel2304 2 жыл бұрын
Haven't watched the video but I assume the answer to the question boild down to explaining causality.
@siddharthasarmah9266
@siddharthasarmah9266 3 жыл бұрын
That was an LTT level segway ngl
@mkaberli
@mkaberli 3 жыл бұрын
Random number generators may not be truly random, but you're still going to use them anyway.
@8koi139
@8koi139 3 жыл бұрын
when Tim said seed I instantly thought of the seed used in ML to get always the same result as te tutorial... totally forgot about minecraft lol
@trinhvannghiep647
@trinhvannghiep647 3 жыл бұрын
I thought he gonna show the random number formula, so I can calculate the rarity of hatching pets in games
@falconsshorts5723
@falconsshorts5723 3 жыл бұрын
I LOVE YOUR VIDEOS
@ebux9885
@ebux9885 3 жыл бұрын
dont use random for security, use secrets!
@amirhossein8329
@amirhossein8329 3 жыл бұрын
Perfect 👌
@ItIsJan
@ItIsJan 3 жыл бұрын
I'ma be honest, i don't know anyone who doesn't know that
@dolby8927
@dolby8927 3 жыл бұрын
So I'm smarter than computer because I do things randomly :))
@jhonsuper7065
@jhonsuper7065 3 жыл бұрын
You have been recognized to have a above average iq!
@dolby8927
@dolby8927 3 жыл бұрын
Lol
@birgirsnr4710
@birgirsnr4710 3 жыл бұрын
My brother said everything 3 sec before you how insane he has never coded in python WHAT ??
@KeinNiemand
@KeinNiemand 3 жыл бұрын
also modern cpus actually have an instruction to generate truly random numbers.
@abdullahbinjahed6900
@abdullahbinjahed6900 3 жыл бұрын
that's simply not possible
@danielegabellini
@danielegabellini 3 жыл бұрын
Cool video
@bran_rx
@bran_rx 3 жыл бұрын
fun fact: nothing's truly random
@olauplarichart4419
@olauplarichart4419 3 жыл бұрын
Please pygame tutorials
@ichoupettev4661
@ichoupettev4661 3 жыл бұрын
Very interesting
@xthesayuri5756
@xthesayuri5756 3 жыл бұрын
By definition there cant be an algorithm for random numbers. Because if you have an algorithm its computable and therefore predictable. To get something thats really random, you have to look into the quantum world. For now the quantum world seems random but that could be a lack of knowledge aswell.
@aim2986
@aim2986 3 жыл бұрын
Are humans predictable? Probably practically no. But what about the theory? Crazy questions requiring the knowledge of computer science, biology, physics and chemistry. And phylosophy could be interested as well. I guess if humanity succeeds uploading the decision making part of the human brain to a computer, the answer will be "yes". However our emotions affect our decisions and it's impossible to directly upload emotions to a computer. On the other hand, we could try to simulate emotions by using a very complex physics engine or some shit like that. Not today, of course.
@begriddled
@begriddled 3 жыл бұрын
If I had to come up with something, my first thought would be to exploit Brownian motion. Maybe a small sealed container with some sort of detector tracking the motions of particles of something or other inside and basing the output on that.
@BenReillySpydr1962
@BenReillySpydr1962 3 жыл бұрын
Actually hidden variables was disproven some time ago regarding quantum mechanics.
@xthesayuri5756
@xthesayuri5756 3 жыл бұрын
@@BenReillySpydr1962 What I said is that some event is either truly random or appears random because we lack the knowledge. Am I wrong? I thought that Bells theorem only makes the prediction of true randomness, if quantum mechanics is correct.
@BenReillySpydr1962
@BenReillySpydr1962 3 жыл бұрын
@@xthesayuri5756 Oh... are you suggesting that QM isn't true? Because if you deny that as an atomic proposition I can understand how you'd also reject any entailments.
NMCS4ALL: Random number generators
20:10
Dave Ackley
Рет қаралды 72 М.
The Magic Of Python
16:42
Tech With Tim
Рет қаралды 101 М.
Almost All Random Numbers Are Actually Fake
19:38
Thoughty2
Рет қаралды 517 М.
Why is this number everywhere?
23:51
Veritasium
Рет қаралды 9 МЛН
The muon-powered, universe-bifurcating, random number machine
14:57
AlphaPhoenix
Рет қаралды 420 М.
What Self-Taught Developers NEVER Learn
13:23
Tech With Tim
Рет қаралды 164 М.
Random Numbers - Numberphile
11:39
Numberphile
Рет қаралды 1,1 МЛН
Python Is Weird...
26:29
Tech With Tim
Рет қаралды 109 М.
How To Predict Random Numbers Generated By A Computer
13:54
PwnFunction
Рет қаралды 565 М.
Mastering Python - Everything You Need To Know To Become a Python Master
16:02