MarshySyntax
MarshySyntax
  • Видео 10
  • Просмотров 6 251
Exploring Pi through Code
In this video I uncover some of the fascinating properties of Pi through algorithms and techniques to approximate and visualise Pi.
Feedback is always appreciated, thank you!
subscribers: 150
Просмотров: 120

Видео

The Fastest Prime Number Algorithm
Просмотров 3 тыс.Месяц назад
In this video I compare the speed of 3 different prime number finding algorithms. All of the code was written in python. There are definitely algorithms faster than those that I've showed in this video, and different algorithms have different advantages and use cases. In this video I only explore 3 of such algorithms - do let me know if you're interested in a video on other prime number algorit...
AI Learns To Parkour
Просмотров 367Месяц назад
In this video Marshy attempts to parkour his way across various obstacles with the use of deep reinforcement learning. This is my first time using unity so forgive me if it looks janky. I made use of unity's ml-agent package to train the ai with deep reinforcement learning. It's brain is made up of 4 layers of 128 hidden units each. It takes in various observations such as its position, rotatio...
Simulating the Monty Hall Problem
Просмотров 98Месяц назад
Today I make a simulation of the Monty Hall problem to find out whether switching doors have any effect. All feedback is well appreciated!
A.I. SOLVES the HARDEST Maze
Просмотров 1,1 тыс.2 месяца назад
In this video I programmed a maze solver using 2 different path finding algorithms. Any feedback is well appreciated! Also thank you to all who took the time to watch, like or comment on my previous video! ^_^
AI makes the WORLD'S HARDEST MAZE
Просмотров 9912 месяца назад
In this video I show myself making an AI algorithm which generates mazes. Feedback is always appreciated!

Комментарии

  • @phuonglinh4775
    @phuonglinh4775 10 дней назад

    You look so cute

  • @scxjuegosyarte8100
    @scxjuegosyarte8100 13 дней назад

    Hello, mathematician here. Your method is awesome, but you only need to check for divisors up to the floor of sqrt(p), what i mean is, if you wanna check if one thousand is prime, you only need to check if 1000 is divisible by the numbers 2 to 31 (square root of 1000). Hope this helps, this makes it a lot faster.

    • @eu7059
      @eu7059 12 дней назад

      If you check the code, this was already implemented, just not mentioned verbally

    • @MarshySyntax
      @MarshySyntax 9 дней назад

      Thanks for the feedback! But yes I did implement this, just not for the first algorithm 😁

  • @DirkKuepper
    @DirkKuepper 17 дней назад

    Question: Does the respective script exclude numbers ending in 0, 2, 4, 5, 6, 8? Because these are certainly not prime numbers. Where can I get the scripts?

    • @MarshySyntax
      @MarshySyntax 17 дней назад

      Nope! It does not explicitly exclude those numbers. But when the script is run it’ll naturally figure out that these aren’t primes

    • @DirkKuepper
      @DirkKuepper 17 дней назад

      @@MarshySyntax The script can be faster. It don't need time for checking 0, 2, 4, 5, 6, 8 if the number has millions of digits.

  • @imsuck12
    @imsuck12 Месяц назад

    printing to stdout took way more time than the actual computation itself also there are algorithms that can find all primes under 10^9 in less than a second (in C++)

  • @vincehomoki1612
    @vincehomoki1612 Месяц назад

    Pretty good channel! Yes, the high-pitched voice really hurts our ears. Other than that, you've earned a new subscriber!

  • @InfiniteWithout
    @InfiniteWithout Месяц назад

    Marsh mallows are cylinder!

    • @MarshySyntax
      @MarshySyntax Месяц назад

      That’s true! Pi is in there somewhere

  • @_Not_Karl_
    @_Not_Karl_ Месяц назад

    🥧🎨

  • @re_capps
    @re_capps Месяц назад

    Sweet! :O (I wonder if marshmallow pies are any good)

    • @MarshySyntax
      @MarshySyntax Месяц назад

      😁 I wonder too, but they sure sound good

  • @aDevBilly
    @aDevBilly Месяц назад

    nice

  • @scr3w-i3n
    @scr3w-i3n Месяц назад

    amzing video!

  • @aDevBilly
    @aDevBilly Месяц назад

    underrated channed. this video is so good. Would you like to do more number algorithms showcase like this. I'd love to watch!

  • @_Not_Karl_
    @_Not_Karl_ Месяц назад

    I was late but great video again

  • @declandougan7243
    @declandougan7243 Месяц назад

    Great content just change the voice

  • @joeyhicks1670
    @joeyhicks1670 Месяц назад

    Thank you for the video! I love quick little algorithm comparison showcases. A quick note: on my machine, my own version of the trial division algorithm (up to 1 million) took 12 seconds to run while printing the numbers and just over one second without printing the numbers. This is because system calls (which are required to print to the terminal) are around a thousand times (or more!) slower to run than typical math operations, depending on the language and environment. This also explains why the sieve and trial division algorithms took about the same time for the first million primes, they both spent most of the time printing instead of actually doing math. It's worth keeping this in mind for future comparisons. Again, thank you for the video; I would love to see more naive vs. advanced algorithm implementation comparisons!

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Hi! Really glad to hear that you enjoyed the video😊 I’ve also tried the algorithm without printing and realised they were quicker, however I felt like it would be a little more visually interesting if the prime numbers were printed out in the video 😅

  • @coolmanthecool603
    @coolmanthecool603 Месяц назад

    The voice is paintful to listen to, but good video

  • @toughtntman37doesanimations
    @toughtntman37doesanimations Месяц назад

    I mean I really would like to see more of the code, but other than that, it's very easy to understand

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thank you! I’ll keep that in mind 🙏🏻

  • @Gibero
    @Gibero Месяц назад

    Super easy to understand, would love to see more complex subjects

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thanks! I’ll try to keep them coming!

  • @narpwa
    @narpwa Месяц назад

    wtf is this voice

  • @matthewwheatley1406
    @matthewwheatley1406 Месяц назад

    Really good video, however the voice goes straight through me.

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thanks for the feedback! Very much appreciated 🙏🏻

  • @prathameshmukhedkar9768
    @prathameshmukhedkar9768 Месяц назад

    Hi, just a quick question for trial division algorithm why you had calculated square root as limit

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Good catch, this was actually an oversight when I made the video. The trial division algorithm actually had the square root as the limit, I just forgot to explain it during the video. Hope that answers your question!

    • @prathameshmukhedkar9768
      @prathameshmukhedkar9768 Месяц назад

      @@MarshySyntax Thanks for the solution!! Btw, very good video!!

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thank you!

  • @ZapayaGuy
    @ZapayaGuy Месяц назад

    it would be great if the voice was a little lower in pitch, but otherwise this is a great video!👍

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thank you for the feedback! 😁

  • @0xzero10
    @0xzero10 Месяц назад

    Search for "THE MEISSEL, LEHMER, LAGARIAS, MILLER, ODLYZKO METHOD" It's faster than the sieve of Eratosthenes

    • @MarshySyntax
      @MarshySyntax Месяц назад

      I’ll have to give that a look thank you!

  • @Somebody71828
    @Somebody71828 Месяц назад

    We be obtaining security keys used by big internet security firms with this one 🗣️🗣️🗣️🔥🔥🔥🔥💯💯💯

  • @AksunkarAssylbay
    @AksunkarAssylbay Месяц назад

    I thought this is a channel with a million subscribers, really high quality video ,l like it

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thank you! I try my best to make as good videos I can 😊

  • @LangSphere
    @LangSphere Месяц назад

    Nice video! I like your explanations because they are really simple and easy to understand!

  • @scr3w-i3n
    @scr3w-i3n Месяц назад

    Great video as always, i really enjoy watching your videos. Keep the great work up!

  • @re_capps
    @re_capps Месяц назад

    The algorithm explanation is genuinely super easy. Great job as always :D Also a quick question; if we use a faster compiling language than python will the time change be noticeable or same?

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thanks!🙏🏻 Yes the time difference if we use a faster language (e.g C/C++) should be noticeable! I just used python because it’s the language I am most familiar with 😁

    • @re_capps
      @re_capps Месяц назад

      @@MarshySyntax ah I see. Thanks for answering. Cause I am studying programming so these kinda videos and questions help :D

    • @ERazzor
      @ERazzor Месяц назад

      I think, the main problem with faster algorithms here is results output. Most of the time this code would spend printing the results. If it is true, the way of working with i/o is more important (in terms of performance) than programming language choice

    • @rizzwan-42069
      @rizzwan-42069 Месяц назад

      It's probably around 10x the speed

    • @wackymoder
      @wackymoder Месяц назад

      Yes, I actually did this a while back with 3 languages and this sieve. Nodejs, C++, and Python Also, a quick note, these tests were automated back to back, mixing the order. along with that I did not have each number printed into the console because printing, especially on Windows, is slow. On going to 1m, and averaged over 5 times, the times were: Python: 1797.4 ms Node: 149.8 ms (12x faster) C++: 46.7 ms (38.4x faster) then for 10m, again averaged over 5 times: Python: 23752.1 ms Node: 1214.1 ms (19.6x faster) C++: 699.8 ms (33.9x faster) Also, here are the peak ram usages going from the 1m run, then 10m run, were Python: 86.7 mb, 772.9 mb Node: 36.6 mb, 119.7 mb C++: 4.9 mb, 15.6 mb C++ is so much better here btw because I used bit arrays (std::vector<bool>), basically each number bool takes up a single bit in the array. (this is how the sieve works btw)

  • @InfiniteWithout
    @InfiniteWithout Месяц назад

    This is cool

  • @InfiniteWithout
    @InfiniteWithout Месяц назад

    How is the voice created

  • @atalayeren5640
    @atalayeren5640 Месяц назад

    I really enjoyed video. Could you please share the source code ? It would be really helpful to see how you implemented it. Also, if possible, could you provide a brief demonstration of how to run the code? Keep up the good work ,thanks a lot!"

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Hi, glad to hear that you enjoyed the video! The source code is so messy so I don’t think I’ll show it 😅 However if you’re interested, perhaps some time in the future I’ll make a tutorial on how to get started with ml-agents for ai reinforcement learning 😄

  • @DDvargas123
    @DDvargas123 Месяц назад

    What input change is it waiting for in Level 3? surely if its standing still it would continue to output the stand still command? (unless there's a timer input or the raycasts are semi random? maybe the outputs are only allowed to change every so often and its waiting for the next output cycle??)

    • @MarshySyntax
      @MarshySyntax Месяц назад

      One thing I did was set the ai to only request a decision every 20 academy steps. However I think where the ‘waiting’ mostly came from was lag - sometimes the programme would freeze for a second or two when I was recording it because I had many simultaneous environments in the background. However I changed this in level 4 onwards so it would lag less. Hope this helps! :D

  • @re_capps
    @re_capps Месяц назад

    The budget increased let's go!!!

  • @_Not_Karl_
    @_Not_Karl_ Месяц назад

    great video again :D

  • @insignificantfool8592
    @insignificantfool8592 Месяц назад

    The Monty Hall problem as stated is a one time event. If you want to simulate it, you need to make further assumptions first. For this simulation, you assumed the host would always offer the switch. If the host only sometimes offered the switch, the simulation would look different and the result would be a different one.

    • @AbiSaysThings
      @AbiSaysThings Месяц назад

      What the hell are you talking about? These events aren't connected, you're just doing the same "one time event", where you ARE offered a switch, 1000 times. That's literally how probabilities work. The situation where you only get to swap "sometimes" (when?) is a different thing entirely that you haven't even described properly.

    • @insignificantfool8592
      @insignificantfool8592 Месяц назад

      @@AbiSaysThings no, it's not, because there's obviously a human being involved (the host) whose behavior isn't specified. Unlike a dice that predictably will roll 1 through 6 on average 1/6 of the time, with a human there's no telling what will happen next time. To assume that the same thing will and must happen is rather naive.

    • @Bacon2000.
      @Bacon2000. Месяц назад

      ​@@insignificantfool8592bro your name is spitting fact's

    • @insignificantfool8592
      @insignificantfool8592 Месяц назад

      @@Bacon2000. You're not really trying to say the behavior of the host us properly specified? Because it isn't.

  • @_Not_Karl_
    @_Not_Karl_ 2 месяца назад

    great video as always

    • @MarshySyntax
      @MarshySyntax Месяц назад

      Thank you! 🙏🏻🙏🏻 I appreciate your continuous support ☺️

  • @eeyen366
    @eeyen366 2 месяца назад

    great video marshy!

  • @eeyen366
    @eeyen366 2 месяца назад

    save marshy!!😫 keep up the good content!

  • @_Not_Karl_
    @_Not_Karl_ 2 месяца назад

    already did :D

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      Thanks for being so supportive!

    • @_Not_Karl_
      @_Not_Karl_ 2 месяца назад

      @@MarshySyntax no problem

  • @theeldenlord10
    @theeldenlord10 2 месяца назад

    I wish I knew to code like that

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      There are a lot of great resources out there to learn how :D

  • @knowname5354
    @knowname5354 2 месяца назад

    999 947 subscribers left

  • @secretaltaccountfr
    @secretaltaccountfr 2 месяца назад

    00:35 I hate that dusty sponge!!!!!!!

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      It’s a cracker! I got turned into a S’more 😢

    • @phuonglinh4775
      @phuonglinh4775 10 дней назад

      Sandwich marshmallow

  • @scr3w-i3n
    @scr3w-i3n 2 месяца назад

    Awesome video keep the great work up! 👍👏❤

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      Thanks for the kind words!

  • @_Not_Karl_
    @_Not_Karl_ 2 месяца назад

    another great video. keep up the good work!

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      Thank you for the support! 😊

  • @re_capps
    @re_capps 2 месяца назад

    NOOOOO MARSHYYYYYYYY!!!!! awesome video :p

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      Thanks! Haha don't worry I'm all well and good! :D

  • @Viquiq
    @Viquiq 2 месяца назад

    Im 50th sub, nice :D

  • @Likemea
    @Likemea 2 месяца назад

    its not ai ... everyone needs to stop using that buzzword.. its just an algorithm thats all

  • @marliini_
    @marliini_ 2 месяца назад

    chey marshmallow can't wait for your new video

  • @Pascilein
    @Pascilein 2 месяца назад

    Good Video

  • @adok2007
    @adok2007 2 месяца назад

    Amazing video, please don't show programming in small window, maybe anyone wanna see code in process. Good luck.

    • @MarshySyntax
      @MarshySyntax 2 месяца назад

      Thanks for the feedback! I'll keep that in mind :D

  • @VALEn781
    @VALEn781 2 месяца назад

    yes, this guy is gonna be popular