What is Monte Carlo?

Поделиться
HTML-код
  • Опубликовано: 8 июл 2016
  • Here's a video describing programming magic: Monte Carlo integration!
    It's a super cool algorithm that is used all the time (in physics at least), so it was good to cover it here. We'll have more algorithms coming up, so be sure to check them out as they come along!
    Information on the Batman Curve:
    mathworld.wolfram.com/BatmanCu...
    math.stackexchange.com/questio...
    I also did a small write-up on integrating the Batman Curve:
    leios.github.io/Batman_Montecarlo
    As always, the simulations were done live on:
    / leioslabs
    / @leioslabslive
    Feel free to follow me on Twitter!

    The code is available here:
    github.com/leios/simuleios/bl...
    And the music is from Josh Woodward (sped up 1.5 times):
    www.joshwoodward.com/
    Thanks for watching!
    Also, discord:
    / discord
  • НаукаНаука

Комментарии • 284

  • @LeiosLabs
    @LeiosLabs  6 лет назад +15

    Since making this video, we have created a new project called the Algorithm Archive and have added a chapter on Monte Carlo: www.algorithm-archive.org/chapters/monte_carlo/monte_carlo.html
    Please go there for information on how to code this up yourself!

  • @yolofapper9668
    @yolofapper9668 8 лет назад +132

    this is the best mathematical education video I ever saw,short,simple,no overcomplicated shit,just straight to the point

    • @LeiosLabs
      @LeiosLabs  8 лет назад +24

      That is exactly how I want the videos to be: As short as possible while still conveying the point. It takes forever to make 3 minutes of content, but that's alright.

    • @raqueloliveiramotivacional2348
      @raqueloliveiramotivacional2348 5 лет назад

      Yolo Fapper Monte Carlo

    • @J_46
      @J_46 4 года назад

      Totally!

  • @AdnanKhan-so1ey
    @AdnanKhan-so1ey 6 лет назад +4

    After wasting an hour trying to understand an algorithm that shouldnt take more than 3 minutes to understand, I finally came across your video. You explained it perfectly. Thanks a lot

    • @LeiosLabs
      @LeiosLabs  6 лет назад +1

      I'm glad it was helpful! =)

  • @AnujGupta-wp2ww
    @AnujGupta-wp2ww 4 года назад +49

    Einstein once said "If you can't explain it to a 6 year old kid, your education about that topic in incomplete".
    Great explanation

    • @phythematics2188
      @phythematics2188 3 года назад +7

      Einstein himself couldn't make understand scientists the Theory of relativity let alone a 6 years old kid.

    • @samuraijosh1595
      @samuraijosh1595 3 года назад +1

      @@phythematics2188 Lol.

  • @jameshuang9568
    @jameshuang9568 4 года назад +7

    I've been running through all youtube videos about his topic for hours and even the professor from MIT didn't answer my question. You are brilliant

  • @jrwkc
    @jrwkc 7 лет назад +93

    Keep it up, you will hit youtube fame soon. Probably one of the best educators out there.

    • @LeiosLabs
      @LeiosLabs  7 лет назад +8

      Thanks! I really appreciate it!

  • @LeiosLabs
    @LeiosLabs  8 лет назад +1

    Alright! New video about Monte Carlo!
    This one was super fun to make (live on: www.twitch.tv/simuleios), especially the batman integration!
    Let me know what you think / if you have any comments, questions or concerns!
    Thanks for being awesome guys!

  • @DanielDuesentrieb86
    @DanielDuesentrieb86 7 лет назад +17

    Monte Carlo methods are also very handy in game theory where it is easy to state the game rules, yet hard to precisely calculate the probability to win.

  • @rishabtirupathi9431
    @rishabtirupathi9431 Год назад +1

    I was so scared that this video would be too complicated. Thank you so much for making it simple.

  • @victoriagee1059
    @victoriagee1059 3 года назад +1

    This is one of the best explanations for Monte Carlo I have found. Good job, James!

  • @kamruzzamankanon4794
    @kamruzzamankanon4794 5 месяцев назад

    Concise+informative+to the point+easy example = My subscription!

  • @corporalwaffles
    @corporalwaffles 7 лет назад +1

    You earned a sub today, keep up these vids (along with algorithms) :D

  • @naveenchandrakumar480
    @naveenchandrakumar480 5 лет назад +1

    Very Nice. This is first time I understood Monte Carlo method clearly. Thanks for the video

  • @forgettd
    @forgettd 3 года назад

    This is the best explanation of anything I've ever seen on youtube. Thank you!

  • @AashishMishra_Nygma
    @AashishMishra_Nygma 7 лет назад

    This channel is gonna touch the skies! I am happy that I am such an early subscriber!

  • @vladscp6579
    @vladscp6579 10 месяцев назад

    this is the coolest algorithm videos I've ever seen, better than most stuff in my uni

  • @robertpretorius7627
    @robertpretorius7627 6 лет назад +3

    Short, simple, clear. Wow! Great video! I finally understand Monte Carlo simulations!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Yeah, it's crazy how random numbers can be so useful!

  • @harkirehal258
    @harkirehal258 4 года назад

    This is an excellent explanation of a complex concept. I was glued to the video and understood every word. I wish I had you for my teacher when I was younger. I subscribed to your channel. I now want to learn everything you teach even if it just for fun. Its rare to find a teacher that explais a concpet to the core in a way that a layman understands.

  • @PrettyMuchPhysics
    @PrettyMuchPhysics 5 лет назад

    It's amazing how many modern application use Monte Carlo! Great introduction video :D

  • @AbuSayed-er9vs
    @AbuSayed-er9vs 7 лет назад +1

    A lots of thanks for giving a valuable information.Please keep going on to do more and more videos with your amazing information.

  • @filiphradil95
    @filiphradil95 7 лет назад +2

    Awesome explanation! Finaly some non-boring video for numeric methods! :)

    • @LeiosLabs
      @LeiosLabs  7 лет назад +1

      haha, I'm glad you liked it! I actually really like Monte Carlo. It was one of the first integration methods I learned and really helped me understand integration.

  • @TheRach995
    @TheRach995 3 года назад +1

    My grandfathers research on Monte Carlo numbers was actually pretty important. Look up Martin J Berger, his world is all available online and his obituary is achieved by the Washington post, is available through a simple search. I’m so proud of him.

  • @Aa11qq
    @Aa11qq 7 лет назад +36

    This is an amazing explanation. Thank you!

  • @kemfic
    @kemfic 5 лет назад

    This is the best explanation I've seen on Monte Carlo so far

  • @tudorversoiu8138
    @tudorversoiu8138 7 лет назад +1

    Never seen a better explanation on anything, ever. Amazing videos, just found your channel :)

    • @LeiosLabs
      @LeiosLabs  7 лет назад

      I'm glad it was useful! =)

  • @saitaro
    @saitaro 6 лет назад

    Best Monte Carlo advertisement I've ever seen. The slogan @ 3:26 is great

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I like my videos to advertise algorithms. It's better to motivate people to learn.

  • @charlesasmr7242
    @charlesasmr7242 6 лет назад +1

    you are amazing, and also very vivid ways to tell others the simulation process.

  • @lerneninverschiedenenforme7513
    @lerneninverschiedenenforme7513 3 года назад

    Awesome! The only video, that can deliver 4 minute content in around 4 minutes (and not 10, 20 or 50, like the other videos)

  • @snackbob100
    @snackbob100 4 года назад

    you are going places my dude, keep it coming!

  • @OOnestly
    @OOnestly 6 лет назад

    Dude, you explained such a concept in 3 minutes. That was amazing!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad it was helpful!

  • @shakilmasud
    @shakilmasud 3 года назад

    Thank you. Searching for so many sites but here I cleared my conception :)

  • @Tom-sp3gy
    @Tom-sp3gy 3 года назад

    This is absolutely brilliant ! What a simple and short explanation ! Thankyou so much

  • @jennis493
    @jennis493 6 лет назад +1

    Great Video! After a one semester course on computational science and still not quite getting what this was all about your video really cleared things up! Thank you!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Woo! I'm glad it was helpful! =)

  • @handlenotprovided
    @handlenotprovided 3 года назад

    Very concise and straightforward explanation of monte carlo integration. Thank you

  • @ProXicT
    @ProXicT 7 лет назад +3

    This is the best explanation on the internet, thanks a lot!!

    • @LeiosLabs
      @LeiosLabs  7 лет назад

      I'm glad it was helpful!

  • @scose
    @scose 6 лет назад +1

    The Batman example showed how to use Monte Carlo methods to find the area of a complex domain. More generally, we can think of integrating f(x) * p(x) where p(x) is a probability distribution. In your example f(x) is the indicator function of the batman logo and p(x) is the uniform distribution on the ellipse. But we could also extend this to something more complicated e.g. if f(x) = x and p(x) is the uniform distribution over the logo itself, we can find the center of mass of the logo. Or, if p(x) is not a uniform distribution, we can use importance sampling or Markov Chain Monte Carlo methods to compute the expected value of a function of a random variable. (commenting for other viewers - as a physicist I guess you already know this)

    • @LeiosLabs
      @LeiosLabs  6 лет назад +2

      Yeah. I want to cover some of this stuff in the future soon (tm)!

  • @HKHasty
    @HKHasty 6 лет назад

    Greatest explanation of Monte Carlo I've ever seen!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad you found it useful!

  • @bondmanu
    @bondmanu 7 лет назад +2

    Very much liked it....explained the complex definition very simply ...keep up the good work! :)

    • @LeiosLabs
      @LeiosLabs  7 лет назад +1

      I'm super glad it was useful! =)

  • @kaarla2805
    @kaarla2805 3 года назад

    Omg i just discover your videos and they’re amazing, thanks for share.

  • @ferdousadnan5814
    @ferdousadnan5814 5 лет назад +2

    An excellent excellent video, excellent explanation. Both liked and subscribed.

  • @SamiyuruSenarathna
    @SamiyuruSenarathna 5 лет назад

    You conveyed the point very clearly.

  • @ashishbastola8412
    @ashishbastola8412 5 лет назад

    Short, sweet & amazing!

  • @ozzyfromspace
    @ozzyfromspace 5 лет назад +1

    Wow, you did that in less than 4 minutes. Bravo!

  • @abdulelahaljeffery6234
    @abdulelahaljeffery6234 7 лет назад +2

    omg!! dude you are definitely one of them! a rare bread of human beings who know how to explain things really well, congrats! (clapping)

    • @LeiosLabs
      @LeiosLabs  7 лет назад +1

      Haha, I'm glad you like the content! =)
      Let me know if you have any questions!

    • @abdulelahaljeffery6234
      @abdulelahaljeffery6234 7 лет назад +1

      I most certainly will ..

  • @jackyxue7885
    @jackyxue7885 6 лет назад +1

    I was out there reading papers and falling sleep. You saved my day. Simply and elegant ~~~

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad you liked it! When I saw this for the first time, I thought it was magic!

  • @prateekverma6873
    @prateekverma6873 7 лет назад +1

    Nice video!. the explanation was easy and understandable.

  • @JoannaBalasbas
    @JoannaBalasbas 7 лет назад +2

    thank you so much for explaining so well and concisely to beginners like us!

    • @LeiosLabs
      @LeiosLabs  7 лет назад +1

      I'm glad it helped! =)

  • @prathameshpradipdatar2003
    @prathameshpradipdatar2003 3 года назад

    Simple, elegant and impactful!

  • @khudhurm7709
    @khudhurm7709 7 лет назад +1

    Amazing explanation! Subscribed :)

  • @LoserHands
    @LoserHands 4 года назад +2

    I've always wanted to integrate odd shapes into a shooter videogame, for shotgun chokes.
    Maybe percent-error per shot can be used for boosting the unlucky shots, or the area-of-circumscribed-shape can be used to find the effectiveness of a shotgun choke, so the better ones cost more in a borderlands-style procgen.
    Also sometimes your videos make certain terms like integral wayyy less scary for someone like me, who has a lot of math left on their plate following high school and dropping college once. It's hard getting back into crowded class and math is totally smthn I don't want to fail. Ty

    • @LeiosLabs
      @LeiosLabs  4 года назад

      I'm happy this was useful! I'm interested to see how you work this out for your game. It could be really cool!

  • @greenowski
    @greenowski 3 года назад

    This is exactly what I was looking for! thanks :)

  • @harshavardhan9660
    @harshavardhan9660 7 лет назад +1

    Thanks a lot bro;Atlast I've found the platform for visualizing the concepts clear.Keep it up..

    • @LeiosLabs
      @LeiosLabs  7 лет назад

      I'm glad it was useful! I've been trying to get more videos out, but with work and everything, it takes a little longer then I'd like...

  • @qiuzhishu2583
    @qiuzhishu2583 7 лет назад +1

    Really nice! Easy to understand!

  • @aminsn779
    @aminsn779 4 года назад +1

    great, easy, and fast explanation. exactly what I needed :))
    Thank you.

  • @ujjayantabhaumik3109
    @ujjayantabhaumik3109 5 лет назад

    This was really cool. You explained it so nicely. Gracias :)

  • @arturotorreslopez4283
    @arturotorreslopez4283 5 лет назад +6

    And that's another precious way of calculating pi :D

  • @srik24
    @srik24 5 лет назад

    A thorough explanation. Thanks!!

  • @yassertalebi1026
    @yassertalebi1026 4 года назад

    Many thanks Sir, you made as easy as could have been possible, I was watching MIT 's course for 55 min wasn't that clear as you were

  • @Aa-tf1li
    @Aa-tf1li 6 лет назад +1

    I made a long research to understand this topic and I can't reach to the nut...
    your video is very helpful , it summarise whole idea in simple concepts, thanx for ur efforts

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Yeah, there are a lot of concepts that seem super complicated at first glance, but are much easier after you get used to them a little.

  • @cupofkoa
    @cupofkoa 6 лет назад

    You're one of the few that don't say 'click like and subscribe'. Its because you don't need to because you're stuff is good. Hitting that subscribe button now.

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Ah, thanks man! I don't tell people to like and subscribe because I hate watching people who say that. People know what to do. I don't need / want to tell them. I would honestly feel bad if people only subscribed to me because I told them to.

  • @matt9912
    @matt9912 7 лет назад +13

    Very nicely done!

  • @cameronmiller4144
    @cameronmiller4144 4 года назад +1

    concise and entertaining. thanks!

  • @kshitijkulkarni8698
    @kshitijkulkarni8698 7 лет назад +1

    Thank you for making this video!!

  • @Rotwh7
    @Rotwh7 7 лет назад +7

    Sir, I hope you read this comment. You are brilliant and kind. GOD bless You! Keep educating us like this Sir!

  • @deeptivirgo2009
    @deeptivirgo2009 6 лет назад

    Very nice Explanation ! Thanks a lot!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Thanks! I am glad it was useful!

  • @tusharkush7
    @tusharkush7 4 года назад

    Great Explaination!

  • @TheFitAuto
    @TheFitAuto 6 лет назад +1

    I understand exactly about Monte Carlo calculation after seeing this video..many thanks!!

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Great! I am glad it was helpful! =)

  • @peter9910
    @peter9910 7 лет назад +1

    Great explanation, thanks!

  • @ashish6114
    @ashish6114 7 лет назад +16

    You sir should have more subs. The presentation of the concepts is super intuitive and easy to absorb thanks to the proper and simple explanations provided unlike the majority of college professors who unnecessarily complicate the matter due to their inadequate teaching skills. Sometimes I think that they became professors simply because they held 'PhDs'.

    • @ashish6114
      @ashish6114 7 лет назад +1

      I've seen the other videos of yours too. It'd be amazing if you were a professor. We need more people who teach in such simple and intuitive ways.

    • @LeiosLabs
      @LeiosLabs  7 лет назад

      Honestly, I would love to be a professor. It's one of my dream jobs!

  • @theinstigatorr
    @theinstigatorr 7 лет назад +1

    Nice video. I'm surprised it doesn't have more views

  • @bluecpp2059
    @bluecpp2059 3 года назад

    Thank you for this great video. I will read more about it.

  • @aashmavlogs5512
    @aashmavlogs5512 4 года назад

    Thank you so much. You explained it with simplicity.

  • @aming.alhashim-ou6032
    @aming.alhashim-ou6032 7 лет назад +1

    Well done! You are a great teacher.

    • @LeiosLabs
      @LeiosLabs  7 лет назад +1

      I'm glad you found it useful!

  • @GBWF1984
    @GBWF1984 5 лет назад

    I just want to thank you for this great video. Also, I took sometime to visit the Arcane Algorithm Archive, very nice work!! Congratulation!!

  • @ElMakk_Med
    @ElMakk_Med 4 года назад

    hey there, thanks for this awesome work, i just wanna ask what is the software you used to make the simulation in the video?

  • @thyagtubes
    @thyagtubes 5 лет назад

    Very well done

  • @locopepele
    @locopepele 7 лет назад

    Great explanation! Thank you!

  • @bharatkukreti8449
    @bharatkukreti8449 6 лет назад +1

    Very well explained the Jargon.

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad it was useful!

  •  7 лет назад +1

    I should've found this video several hours ago! Nice!

    • @LeiosLabs
      @LeiosLabs  7 лет назад

      I'm glad it was helpful!

  • @IanFarias00
    @IanFarias00 5 лет назад

    Amazing video! ^^

  • @FamMeierundCo
    @FamMeierundCo 4 года назад

    Oh my god awesome video!

  • @abubakerbarenis
    @abubakerbarenis 6 лет назад +1

    very nice explanation, appreciated..

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad it was helpful!

  • @md.abdullahal-alamin8059
    @md.abdullahal-alamin8059 7 лет назад +1

    At last I understood monte carlo simulation. Thanks :)

    • @LeiosLabs
      @LeiosLabs  7 лет назад +2

      I'm glad it was helpful!

  • @MrZouzan
    @MrZouzan 5 лет назад

    2 sec of this vid and u got a new suscriber !

  • @Ravikumar_Sharma
    @Ravikumar_Sharma 5 лет назад

    Excellent!

  • @Manu-sz4mo
    @Manu-sz4mo 6 лет назад

    Simply AWESOME

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      Yeah, batman took a while...

  • @aln447
    @aln447 5 лет назад

    Brilliant!

  • @Rightwing789
    @Rightwing789 3 года назад +2

    I love this!!!!!

  • @karimaelouahmani7078
    @karimaelouahmani7078 2 года назад

    i am soooo thankful

  • @AhmedHatem1996
    @AhmedHatem1996 6 лет назад +1

    Awesome Explanation .. Thank you so much

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad it was useful!

  • @GeorgeSandle
    @GeorgeSandle 6 лет назад

    Very well explained :)

    • @LeiosLabs
      @LeiosLabs  6 лет назад +1

      Thanks! The point is to provide quick, intuitive descriptions of things.

  • @pman-codes
    @pman-codes 5 лет назад

    short and awesome

  • @kishangovind8499
    @kishangovind8499 6 лет назад +1

    Thanks a lot . Nicely explained

    • @LeiosLabs
      @LeiosLabs  6 лет назад

      I'm glad it was useful!

  • @kenroyadams2762
    @kenroyadams2762 5 лет назад

    Thank you! Liked and subbed

  • @walidwalid9991
    @walidwalid9991 7 лет назад +1

    Thank you so much for this explanation. your student from Algeria

  • @reinia127
    @reinia127 4 года назад

    Thank you so much sir!!

  • @williamehrhardt918
    @williamehrhardt918 5 лет назад

    I used monte carlo integration in my masters thesis to approximate the volume contained in a specific electron density of a molecule.
    Advantage: You can get decent accuracy in a small amount of time.
    Disadvantage: If you need highly accurate values, it scales very poorly. To halve the area requires a squared number of points.
    Tesselation is better in pretty much every way

  • @ProCipher
    @ProCipher 3 года назад

    you are a hero :)

  • @Foba_Bett
    @Foba_Bett 6 лет назад +1

    Cool Video, Thank you :)

  • @NERMIENKH
    @NERMIENKH 5 лет назад

    very useful thank you!