Episode#1 - Random Number Generators (Mersenne Twister vs. Middle Square)

แชร์
ฝัง
  • เผยแพร่เมื่อ 26 ก.ย. 2024
  • This is the first episode in a mini-series on Monte Carlo methods. This episode brings to life two PRNGs: the Mersenne -Twister and the Middle Square Algorithms.
    ---------------------------------------------
    I would like to thank the following people for their (unwitting) contribution to this video:
    - Grant Sanderson (for inspiration and manim)
    - Benjamin Hackl and the Manim Community (for the manim tutorials and making manim accessible)
    - Christian Robert and George Casella (for my favorite book on Monte Carlo methods - "Introducing Monte Carlo Methods with R")
    - Bradley Efron and Trevor Hastie (for the book "Computer Age Statistical Inference [page 448] which inspired the 'travel across time plot and animation')
    - Those behind the movie "Operation Mincemeat", whose opening scene inspired my opening scene
    ---------------------------------------------
    My sincere thanks to the BreakingCopyright (breakingcopyright.com) TH-cam channel for the beautiful music. I used the following songs in this video:
    "Hayden Folker - Adrift" is under a Creative Commons (CC-BY 3.0) license
    Music promoted by BreakingCopyright: bit.ly/bkc-adrift
    "Miguel Johnson - Still A Long Way To Go" is under a Creative Commons license (CC BY-SA 3.0).
    / migueljohnson
    migueljohnson....
    Music promoted by BreakingCopyright:
    • 📽️ Royalty Free Film Orchestral Music...
    "Artificial.Music - And So It Begins [Lo-fi]" is under a Creative Commons license (CC-BY) 3.0
    Music provided by BreakingCopyright:
    • [No Copyright Music] Artificial.Music...
    "Keys Of Moon - Way To Dream" is under a Creative Commons (CC BY 3.0) license
    / keysofmoonmusic
    Music promoted by BreakingCopyright: bit.ly/bc-way-...
    "Nomyn - Insomnia" is is under a Creative Commons (CC BY 3.0) license.
    creativecommons....
    / @nomynmusic
    Music promoted by BreakingCopyright:
    • 🌙 Chill Trap (Royalty Free Music) - "...
    "Scott Buckley - Jul" is under a Creative Commons (CC BY 3.0) license.
    creativecommon....
    / musicbyscottb
    Music promoted by BreakingCopyright: bit.ly/bc-jul-...
    "Nomyn - Wonder" is is under a Creative Commons (CC BY 3.0) license.
    creativecommons....
    / @nomynmusic
    Music promoted by BreakingCopyright:
    • 🍃 Ethereal & Ambient (Royalty Free Mu...
    ---------------------------------------------
    The animations are done in manim (python library) with occasional minimal post-production touch-up in Adobe.

ความคิดเห็น • 26

  • @bagel6581
    @bagel6581 3 หลายเดือนก่อน +2

    I'm so glad I found this because I was in the middle of a fixation on PRNGs but couldn't find any comprehensible explanations of it. The animations and decomposition of the whole algorithm really helped me understand it more. Thank you for making this.

  • @josevalencia9233
    @josevalencia9233 2 หลายเดือนก่อน +1

    Really high quality contents. Keep going sir!

  • @Maple_Whitecat
    @Maple_Whitecat 3 หลายเดือนก่อน +2

    I love this video! It's really beautiful together with the music. Everything is well explained! I will later watch your other videos too. Please keep the good work going 💕💕

    • @statisticscrystallized
      @statisticscrystallized  3 หลายเดือนก่อน +3

      Thank you. Glad you enjoyed it. There should be a full length episode 2 by the end of the year.

  • @isaac10231
    @isaac10231 4 หลายเดือนก่อน +2

    This is an insane amount of work wtf

    • @statisticscrystallized
      @statisticscrystallized  4 หลายเดือนก่อน

      True... as with any big task, you try to break it down into smaller tasks and it becomes more manageable; also I tried to recycle code as much as possible; the tens of sub-animations of the binary operations, for example, are all done with the same chunk of code; there is something very rewarding and gratifying in tackling tasks that seem impossible or overwhelming at first, but which through a systematic approach become amenable to reduction and understanding

    • @isaac10231
      @isaac10231 4 หลายเดือนก่อน

      @@statisticscrystallized How long did this take to code?

    • @statisticscrystallized
      @statisticscrystallized  4 หลายเดือนก่อน

      Hard to say as I didn’t work on it continuously

  • @jakeaustria5445
    @jakeaustria5445 หลายเดือนก่อน +1

    Thank you

  • @Iprenius
    @Iprenius 4 หลายเดือนก่อน +1

    wow! great explain

  • @ahmetaknc5878
    @ahmetaknc5878 2 หลายเดือนก่อน +1

    This is why I pay for the internet.

  • @nananou1687
    @nananou1687 9 หลายเดือนก่อน +4

    Great video.

  • @oskarbircks245
    @oskarbircks245 7 หลายเดือนก่อน +3

    Incredible video!

    • @statisticscrystallized
      @statisticscrystallized  7 หลายเดือนก่อน

      glad to hear you enjoyed it; thank you for the feedback

  • @vortex370
    @vortex370 9 หลายเดือนก่อน +3

    Nice

  • @pvtglarson1
    @pvtglarson1 3 หลายเดือนก่อน +1

    no wonder they replaced the twister its so slow on here ;)

    • @statisticscrystallized
      @statisticscrystallized  3 หลายเดือนก่อน

      😄

    • @statisticscrystallized
      @statisticscrystallized  3 หลายเดือนก่อน

      Funny; I hope there is no causal link there. Just for the record, I will mention that the Mersenne-Twister is still the default PRNG in most languages, including R, Python's random module, etc but it has been replaced with PCG64 in numpy for example. What language were you referring to?

    • @pvtglarson1
      @pvtglarson1 3 หลายเดือนก่อน

      @@statisticscrystallized so i wasnt really referring to a specific language as much as, from what i think i understand about casino games, is that they need to be cryptographically secure (at least in my state). So in my mind it was "replaced" in the sense that by law the RNGs need to be secure, and using a normal MT in any casino game is not legal so its obsolete in my mind.

    • @statisticscrystallized
      @statisticscrystallized  3 หลายเดือนก่อน

      @@pvtglarson1 Got it; thank you for that clarification

  • @josevalencia9233
    @josevalencia9233 2 หลายเดือนก่อน +1

    Really high quality contents. Keep going sir!

    • @statisticscrystallized
      @statisticscrystallized  2 หลายเดือนก่อน

      Thank you and glad you enjoyed it. I am indeed working, every now and then, on episode 2. It should be out hopefully in the next 2-3 months.