Why Random Numbers Aren't Random

Поділитися
Вставка
  • Опубліковано 14 гру 2024

КОМЕНТАРІ • 198

  • @laurinneff4304
    @laurinneff4304 3 роки тому +87

    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

  • @shourya9998
    @shourya9998 3 роки тому +65

    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 роки тому +100

    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 роки тому +63

    In one of cloudflare's offices, they use a camera pointed at a wall of lava lamps for randomness

    • @Aradiv
      @Aradiv 3 роки тому +2

      And you can go there and view them in person if you want to.

    • @TheDuerden
      @TheDuerden 3 роки тому +1

      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 роки тому +25

    Random module in Python was a total mystery for me
    Thanks tim

  • @neijrr
    @neijrr 3 роки тому +6

    "Why Random Numbers Aren't Random"
    RNGs based on quantium physics: ok

  • @apren9569
    @apren9569 3 роки тому +15

    This video is 100% what i was looking for!

    • @calitts4708
      @calitts4708 3 роки тому +3

      Some channels read our minds and post the exact video we were looking for

    • @parsanasiri1712
      @parsanasiri1712 3 роки тому

      Same

    • @apren9569
      @apren9569 3 роки тому +2

      @@calitts4708 exactly, but when it comes from Tim its definitely good info.

    • @SuadoCowboy
      @SuadoCowboy 3 роки тому

      twt and codecamp always read my mind

  • @jhonsuper7065
    @jhonsuper7065 3 роки тому +11

    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. ♥

  • @tech-learner4555
    @tech-learner4555 Рік тому +1

    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..

  • @SatisfyingWhirlpools
    @SatisfyingWhirlpools Рік тому +1

    I feel like unless you can predict random numbers you haven’t seen yet from the program, it’s doing it’s job perfectly.

  • @rishilkadakia4779
    @rishilkadakia4779 3 роки тому +1

    Wow, that's actually really cool. Great video as always! 👍

  • @lakshyachopra_
    @lakshyachopra_ 3 роки тому +78

    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 роки тому +1

      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.

  • @nanajnananajna3124
    @nanajnananajna3124 3 роки тому +9

    Question are uuid's generated by the "UUID" module in python also not really random or unique or they are?

  • @mightye6669
    @mightye6669 2 роки тому +1

    My go to programming UA-camr

  • @dollarbill8959
    @dollarbill8959 3 роки тому +5

    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.

  • @MinerKingX
    @MinerKingX 3 роки тому +3

    that date he is talking about at around 6:20 is called the unix timestamp

    • @xrafter
      @xrafter 3 роки тому +1

      UNIX EPOCH

  • @MrLottoLife
    @MrLottoLife 2 роки тому

    Your insights are GOLD.

  • @igydkygs00kwhi
    @igydkygs00kwhi 7 місяців тому +1

    Randomness is a philosophy. Nothing is truly random. 💯

  • @AhmadKhalidNasrat
    @AhmadKhalidNasrat 3 роки тому +1

    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.

  • @JK-cs3sq
    @JK-cs3sq 3 роки тому +2

    Great video, Tim. Any chance you could discuss the sys module next time?

  • @waliqadri
    @waliqadri Рік тому +1

    I thought, it reads the CPU fan temperature, voltage and date time to generate random numbers

  • @LordKing13
    @LordKing13 3 роки тому +1

    thank you bro! I allways wonder why we use time to get random numbers and this video help me a lot!

  • @tuhinbhowmick8424
    @tuhinbhowmick8424 3 роки тому +2

    The last example was grt..❤️❤️❤️

  • @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

  • @OpenSaned
    @OpenSaned 3 роки тому

    When you get a algoexpert ad before a algoexpert sponsored video

  • @ashwinshetgaonkar6329
    @ashwinshetgaonkar6329 3 роки тому +1

    very informative ,it cleared my doubt that randomness can't be programmed.

  • @PBalint817
    @PBalint817 3 роки тому +2

    When tech youtubers are out of ideas:
    "Let's talk about randomness! That should do it!"

  • @PvblivsAelivs
    @PvblivsAelivs 3 роки тому +2

    Traditionally, in most programming languages, it is measured from midnight 1 Jan 1970 GMT.

  • @fadamitanolatomiwas.miguel6626
    @fadamitanolatomiwas.miguel6626 3 роки тому

    Thanks for the knowledge Tim

  • @jatingera924
    @jatingera924 3 роки тому +1

    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

  • @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 👍

  • @TheIndian123
    @TheIndian123 3 роки тому +1

    We have been tricked, we have been backstabbed and most probably...
    Bamboozled

  • @alokkumarsingh4641
    @alokkumarsingh4641 Рік тому

    very informative thanks buddy

  • @saqibshafin
    @saqibshafin 3 роки тому

    Thank you very much for the Radioactive Decay portion!!!

  • @erfan_ops
    @erfan_ops 2 роки тому

    Thank you that was a really good explanation

  • @mr-pr0cesss
    @mr-pr0cesss 3 роки тому +3

    Thanks, i always had this question that how true random numbers are generated.

  • @ShivekMaharaj
    @ShivekMaharaj 3 роки тому

    Nice Video, Tim. 👌

  • @kvelez
    @kvelez Рік тому

    Great explanation.

  • @raivisrasnacs1088
    @raivisrasnacs1088 3 роки тому

    What keyboard are you using? it sounds quiet nice.

  • @akshatrastogi9063
    @akshatrastogi9063 Рік тому

    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.... :)

  • @netharuM
    @netharuM 3 роки тому +2

    1:09 you wanna be a software engineer at google

  • @ACodingWoof
    @ACodingWoof 3 роки тому +1

    6:10 It's the Unix timestamp by the way.

  • @danbrown6698
    @danbrown6698 3 роки тому

    This video is useful and interesting!

  • @TheRexona1986
    @TheRexona1986 3 роки тому

    Ty.. very nice explanation.

  • @ano3000nymous
    @ano3000nymous 3 роки тому

    Great knowledge 👍

  • @mustafatechsolutions
    @mustafatechsolutions 3 роки тому +1

    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.

  • @streetboss2371
    @streetboss2371 3 роки тому

    that is amazing topic bro thankz for share with us in very simple method to understand ❤️❤️❤️

  • @TheDuerden
    @TheDuerden 3 роки тому +1

    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

  • @fipium
    @fipium 3 роки тому

    video idea: tutorial on how to generate TRULY random numbers in python

  • @farzadmoradkhani
    @farzadmoradkhani 3 роки тому

    It was awesome bro 😎

  • @Gameplayer55055
    @Gameplayer55055 3 роки тому +1

    Actually random is something that is predictable, but it is super ultra hard to predict

  • @markdillon9588
    @markdillon9588 3 роки тому

    Very interesting 👍

  • @realmodpotato
    @realmodpotato 3 роки тому

    very interesting but im more curious what ide this is where itll let you launch it on demand from the ide

  • @OllsKershaw
    @OllsKershaw 9 місяців тому

    Is it possible to come up with a new set of numbers that are based on several numbers?

  • @Pawlo370
    @Pawlo370 Рік тому

    when i making print(randint(1, 6)) and if computer is loud the 1 is very common

  • @falconsshorts5723
    @falconsshorts5723 3 роки тому

    I LOVE YOUR VIDEOS

  • @ameermuthumama9258
    @ameermuthumama9258 3 роки тому +1

    What a perfect time today only I learned about random ()

  • @jreallyrean8208
    @jreallyrean8208 2 роки тому

    So, does this imply why some accounts in any gacha or gambling games are lucky/unlucky?

  • @flleaf
    @flleaf 3 роки тому

    6:13 i believe unix was made in the end of 1969 so it starts with that date

  • @kenet7877
    @kenet7877 3 роки тому

    I love your shirt!

  • @venkyman4985
    @venkyman4985 3 роки тому

    According to Schrodinger, all the numbers exist simultaneously until you measure it.

  • @RAIOXBOX
    @RAIOXBOX 3 роки тому

    What if theres an engine that also does run the random seed as random aswell? Will it be truly random?

  • @amirhossein8329
    @amirhossein8329 3 роки тому

    Perfect 👌

  • @dimibyk6666
    @dimibyk6666 3 роки тому

    Now I just have to know the starting point of the numbers of the Powerball

  • @dovos8572
    @dovos8572 3 роки тому

    you can use a quanten module to make random seeds too. the one and only true random thing in the universe

  • @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.

  • @xijinping3716
    @xijinping3716 3 роки тому +1

    I am very Happy today

  • @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".

  • @melissaleigh3013
    @melissaleigh3013 3 роки тому

    Thanks can u post fresca again pls

  • @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

  • @davidjohnston4240
    @davidjohnston4240 3 роки тому +2

    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.

  • @danielegabellini
    @danielegabellini 3 роки тому

    Cool video

  • @williamdinkel2304
    @williamdinkel2304 2 роки тому

    Haven't watched the video but I assume the answer to the question boild down to explaining causality.

  • @ichoupettev4661
    @ichoupettev4661 3 роки тому

    Very interesting

  • @Keventor
    @Keventor 3 роки тому

    Why does the captions say seat when it is seed?

  • @eyosiyas_js
    @eyosiyas_js 3 роки тому +1

    Insane

  • @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

  • @Plasmacore_V
    @Plasmacore_V 3 роки тому

    Shouldn't you use the Secrets module if you want as close to random numbers as possible?

  • @pushpajitbiswas3752
    @pushpajitbiswas3752 3 роки тому

    mystery of the random number is now revealed.

  • @rafasantos23
    @rafasantos23 3 роки тому +8

    *Python has been lying to me 😞*

    • @abdullahbinjahed6900
      @abdullahbinjahed6900 3 роки тому

      it's this way for everything ... there's no true randomness in nature

  • @zerotwoisreal
    @zerotwoisreal 3 роки тому

    how does it generate the numbers it chooses for each seed? there must be some way

  • @olauplarichart4419
    @olauplarichart4419 3 роки тому +1

    Please pygame tutorials

  • @its_code
    @its_code 3 роки тому +1

    WOW 😳😲 amazing 😍.
    Love 💕 from Pakistan.

  • @TheMahavatarBabaji
    @TheMahavatarBabaji Рік тому

    'radioactive decay' - this only seems 'random' because nobody is aware of the 'seed'.

  • @bran_rx
    @bran_rx 3 роки тому

    fun fact: nothing's truly random

  • @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

  • @siddharthasarmah9266
    @siddharthasarmah9266 3 роки тому +1

    That was an LTT level segway ngl

  • @trinhvannghiep647
    @trinhvannghiep647 3 роки тому

    I thought he gonna show the random number formula, so I can calculate the rarity of hatching pets in games

  • @goKoding
    @goKoding 3 роки тому

    humm...good explanation...

  • @stavros222
    @stavros222 3 роки тому

    and i was wondering what seed in minecraft exactly does

  • @hritikgautam5878
    @hritikgautam5878 3 роки тому

    Nice video

    • @adthn
      @adthn 3 роки тому +5

      lol.. u didnt even watch it😂

    • @SachinYadav-eh7vg
      @SachinYadav-eh7vg 3 роки тому

      @@adthn 😂😂😂😂😂

  • @dev3560
    @dev3560 3 роки тому

    when the floor is not made out of floor

  • @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

  • @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?

  • @ebux9885
    @ebux9885 3 роки тому

    dont use random for security, use secrets!

  • @forpublic777
    @forpublic777 3 місяці тому +1

    bcos pseudo random

  • @GDPlainA
    @GDPlainA 3 роки тому

    How to make fried rice:
    You will need ingredients to make rice
    Then you need to learn how to cook fried rice
    Done

    • @GDPlainA
      @GDPlainA 3 роки тому

      A wild random message appeared!

    • @GDPlainA
      @GDPlainA 3 роки тому

      @M i Α vℓσg gσ тσ му ¢haηηєℓ! wait ur a python coder?

    • @GDPlainA
      @GDPlainA 3 роки тому

      @Kian Moore yeah i just noticed that a day after i posted my reply