1.1: Introduction to Session 1 – Intelligence and Learning


Okay, so maybe you watched the first the introduction to this larger Playlist the “Intelligence and Learning” set of videos But now this video is an introduction to just the first session and the first session is about Search and graph systems now. Why why why should that be the first session? I don’t know might be a bad idea first of all I wanted a warm-up. So I wanted something to kind of get us thinking about algorithms Data and things that the intelligence, or that solve problems in an intelligent way, so And also there are some very you know some ways common unsolved problems of computer science like the traveling Salesperson problem which is one of the topics of this week’s that could could use of new newly invented Machine learning system to solve it. You know I don’t have my prop if I had my book Artificial Intelligence: A Modern Approach [Stuart Russell and Peter Norvig] Books yes, and I hope I got that right um you would see a lot of. I don’t got my pen anymore. continuity error You would notice that There’s a lot of algorithms in these books about search because one of the first one of the kinds of problems that artificial intelligence algorithms that intelligent algorithms often need to solve in computer science in applications Interactivity all the sort of kind of projects you might be thinking of making is there’s a problem. I need to figure out the answer to this problem, but there are so many possible answers I couldn’t possibly check every single one and so search refers to the idea of searching for the answer in A sea of possibilities now one way is to search every single possibility I mentioned the traveling salesperson problem. Let’s talk about that for a second. So, I] want to talk about search and graph system. This is kind of loosely the topic for right now There goes that eraser. Oh my God! Sorry everybody the erasers okay! Everything’s fine! OK so the traveling salesperson says oh, I have videos on this already, so you can go watch those there are some number of cities and let’s say there are five and that a sales person needs to visit all of the cities in the shortest amount of time or picking it with the shortest distance in any order Starting with anyone ending with anyone, so I might be able to eyeball this and say like okay? Well, maybe that’s the path that’s probably not the path. It’s probably more like that whatever the point is we could have a computer algorithms figure this out let’s just check every single possibility, so first let’s pick a city how many cities should I pick how many cities click? Oh? There’s five okay? Now if I pick if there’s five possibilities now once I picked one city. How many possibilities are there left? Four? I’m how many are left three now We’re left to and we left one so five factorial 20 60 120 120 possibilities for five cities And this is 5 factorial, so this is a kind of problem. That doesn’t seem like such a big deal but if I just have 10 cities What’s 10 factorial no the computer could probably crunch through that number? What about 50 cities? Okay, that’s just three with 64 zeros after it It’s like a really really really big number. I mean, what’s the listing the age of the known universe If you 13.6 times 2 billion years that other numbers a lot more than that So and you know even if we could do like a million per second or something. It’s trust me We’re going to have some issues. I’ll talk about it. So what are some solutions to this next week We’re going to look at genetic algorithms. Which is a technique for trying to optimally find a solution, and there are ways we might say something known as a greedy algorithm. I went off on a tangent there! We’ll see if it is a problem and edit this part out but a greedy algorithm which might say like I don’t know Let’s just pick a city and then pick the closest one they took the closest one to that Trying to get us a pretty good answer Even if it’s not the exact optimal answer… the point of what I’m saying is this is the application that I want to look at In this first week so the things that we need to learn about to be able to do things and work with problems like the Traveling Salesperson are: number one graph systems and number two search algorithms Okay, now. What is a graph system? A graph system is something … a system that is made up of two elements node and an edge We can name these other things, but I’m going to call them the nodes and edges. One of the next videos that you’ll watch if you follow this playlist will be on something called a binary search tree a binary tree Is a graph system where every node is connected to two children nodes a left and a right and those are connected to two and those are connected to two ETc, Etc, Etc, so this is one example of a graph system. So what you’ll notice is We need some sort of Data structure to store what are all the nodes and what are all the edges and this depends on the problem a Common example also the graph system similar to the traveling Salesperson problem in a subway map So let’s say you to get from this station to this station. Well there are all these other stations and roots and maybe they all are interconnected And there’s many ways to get on this bus subway map makes no sense there’s many ways to get there But they all take different amounts of time like maybe I could go from here to here to here to here to here Which is, hold on, let me redraw. Let me redraw this let me just draw it like this So let’s say I want to get from here to here We could see like oh, I’m going to get from in one step to here and it’s going to a two-step I want to take two trains to get to hear what if this train takes 60 minutes this train takes 30 minutes and each one of these is 65 to 60 to the 61 in this pic 6 So even though I have to go on 1 2 3 4 or trains. This is optimal this will get me there faster This is known as a weighted graph system. So the graph system is a bunch of nodes those nodes might have value so a binary search tree You can use to organize An alphabetical order a lot of words or numbers and other variety of things and you could think of this… But the edges here don’t necessarily have weights at least in a standard binary tree, but here they do. Now. There’s an algorithm for Searching for that optmal path in this scenario in a weighted graph and it’s called Dijkstra’s Algorithm there’s also another algorithm called A* and ETc ETc. So these are different examples binary search algorithm Dijkstra’s Algorithm, A*, and the one that I’m actually doing today But that doesn’t really matter to you because you’re to watch these videos in sequence. I’ll talk about a second It’s something called Breadth first search So breadth-first search is a good algorithm for finding the shortest path between two nodes in a graph that Aren’t weighted so the shortest number of steps and I’ll talk about the example that I’m gonna use for that in a bit so this week is all about learning how to program a graph system and learning about different algorithms to efficiently solve a some type of problem associated with the graph system like the shortest path and you’ll and so now Once you stop watching this video There’s going to be a bunch of others in this playlist that I’ve made at all different times under different circumstances So this is experiment that I’m trying to put together a sequence course with all different coding challenges So you’ll see there’s a binary search tree example there will be a breadth-first search example There’s there is no at the time of this recording but there might be at the time as you’re watching a Dijkstra’s algorithm A*. So, you’ll see, and I’m going to be filling stuff in as time goes on Once you get to the end of all of those if you choose to watch them all I’ll make another video that kind of wraps up and shows you a bunch of examples all together and gives you some ideas for some homework exercises that you might do that you could share with me in the comments And that sort of thing If you want to participate in a slack channel that I have that’s going on for this course you can sign [up] Patreon.com coding train is a crowdfunding thing if you want to participate in this Slack channel but you can also always hit me up on Twitter at shiffman In the comments here which I do read. Okay. So that’s what’s going to happen next and I will see you if you decide [to] [come] back in a wrap-up video where I Kind of summarize bunch of this tough and give you some exercise ideas great, so I’m going to go and actually record a video Right now on breadth-first search, but you might watch some of these other ones first. Thanks very much. OOPS! I’ve always it back at the end of my videos when you think they’re over so one thing I want to mention that if you’re about to watch Some of these the rest of the videos in [this] sequence first of all you should you know if you don’t know… Javascript programming in Pjs. You might want to take a look at some of my intro people have shows videos but more importantly than that if you have experience with Two things that [I’m] using in these videos is one is this a concept of prototype as a way of attaching Methods to an object in Javascript as well as this idea of an associative array, or hash table, and how that works in Javascript. So those two things or might be videos that you might wanna go and watch first before you start looking at some of the graph systems and different search algorithms, okay, just in case that matters to you, you know But you don’t really have to know very much to follow this up along if you know a bit about Programming you’ve tried you watched them my other videos. Hopefully you’ll be okay. If not let me know and I’ll see what I can do okay. See you soon!

71 thoughts on “1.1: Introduction to Session 1 – Intelligence and Learning

  • March 29, 2017 at 4:52 pm
    Permalink

    there's progress !

    Reply
  • March 29, 2017 at 4:59 pm
    Permalink

    I've been waiting for this!
    Thanks for making these videos!

    Reply
  • March 29, 2017 at 5:03 pm
    Permalink

    I really like you videos, they make me feel like I am doing something with my time. Keep up the good work.

    Reply
  • March 29, 2017 at 5:07 pm
    Permalink

    I learned something! Thank you 🙂

    Reply
  • March 29, 2017 at 5:17 pm
    Permalink

    What does 50 Cent has to do with 50! loool

    Reply
  • March 29, 2017 at 5:23 pm
    Permalink

    Is this mainly going to be p5 or processing?

    Reply
  • March 29, 2017 at 6:21 pm
    Permalink

    Wohoo I've been waiting for this all day since I woke up

    Reply
  • March 29, 2017 at 6:40 pm
    Permalink

    for my 2420 course at the University of Utah, our project this week is using a breadth-search algorithm to find the shortest path between two points in a maze, so this is a little late, but we'll appreciated

    Reply
  • March 29, 2017 at 8:12 pm
    Permalink

    What did you study?

    Reply
  • March 29, 2017 at 8:13 pm
    Permalink

    i miss the old outro

    Reply
  • March 29, 2017 at 8:15 pm
    Permalink

    Yes! I love the way you teach so looking forward to this series, I find all of the other courses on AI/ML very dry.

    Reply
  • March 29, 2017 at 8:54 pm
    Permalink

    This is awesome, im starting my career and im just learning all that things you are talking about, hope this videos help me review, even if i learned in C

    Reply
  • March 29, 2017 at 10:32 pm
    Permalink

    You made me understand how programming works, and the only course that made me be interested and understand . I love your teaching style, I want to adopt some of it for my teaching as well. Thanks a lot !!

    Reply
  • March 29, 2017 at 11:56 pm
    Permalink

    Dude… you rock!

    Reply
  • March 30, 2017 at 2:51 am
    Permalink

    Keep it up your work, It's very helping mee 😁

    Reply
  • March 30, 2017 at 4:33 am
    Permalink

    I think this is the first time I comment on this channel and I've been subscribe for a year and I'm really impressed in how you made your videos I really like them.

    BTW I took this course a few years ago and it was short since the teacher we have back then was new on the topic.

    Greetings from Mexico

    Reply
  • March 30, 2017 at 2:18 pm
    Permalink

    Hey, could you tell me can i somehow ignore translation in p5.js and take true coordinates from translated coordinates?

    Reply
  • March 30, 2017 at 2:45 pm
    Permalink

    I Love you start the ML and DL tutorial

    Reply
  • March 30, 2017 at 3:44 pm
    Permalink

    Fun stuff! I remember building an algorithm in C last semester that used Dijkstra pathfinding to navigate between US cities.

    Reply
  • March 31, 2017 at 1:24 am
    Permalink

    Love that beard Dan.

    Reply
  • April 2, 2017 at 8:31 pm
    Permalink

    You should be a college professor

    Reply
  • April 7, 2017 at 5:28 pm
    Permalink

    Hey Dan! Hope you're well. How do you make this? https://vimeo.com/211758157 Cheers Louis 😛

    Reply
  • April 13, 2017 at 4:11 pm
    Permalink

    whens the next lecture coming up?

    Reply
  • May 2, 2017 at 4:55 pm
    Permalink

    i never get bored watching ur videos ! u amazing man ! #respect

    Reply
  • May 5, 2017 at 6:04 pm
    Permalink

    it's so cool when you laugh for no reason

    Reply
  • May 6, 2017 at 5:59 pm
    Permalink

    I'm in tenth grade rn, but I currently learn C++ and I just dropped on one of your coding challenge video and I was kind of amazed before so much passion and enthusiasm! I really love your videos and even tho I'm yet in high school I learn a lot of things with them and they make me wanna get to the oop part of my learning faster and faster (don't know if this sentence makes sense lmao I'm french). Anyway, keep up your teaching it's really helpful and great to watch 🙂

    Reply
  • May 21, 2017 at 12:12 am
    Permalink

    Honestly? It is the best programming channel I ever seen on YouTube!

    Reply
  • June 20, 2017 at 3:23 am
    Permalink

    please what is use programing ,its programing processing or no ,if no please telm my name programming thanks

    Reply
  • July 9, 2017 at 12:04 am
    Permalink

    Good video. Though it's 'etcetera' and not 'eccetera'.

    Reply
  • July 29, 2017 at 6:00 pm
    Permalink

    perhaps the best Teacher on Youtube..Thanks SIR

    Reply
  • September 15, 2017 at 4:28 pm
    Permalink

    P5 is only on ios?

    Reply
  • September 15, 2017 at 4:28 pm
    Permalink

    Can i download p5 on windows?

    Reply
  • November 18, 2017 at 7:16 am
    Permalink

    I tell this story to all my students and friends:

    Once upon a time, there was a superhero who changed many lives through his awesome teaching and charming personality. His humour was simple infective disarming, his depth was unassumingly unimaginably great and the presentation was extraordinarily ordinary but with a background knowledge that made me learn such difficult concepts so easily that I seriously believe that we have all been victims of poor teaching without passion or knowledge or fun or none of these. Then comes in the middle of the educational crisis, one man to save the all, one man to change them all , one man to save the worldd from bad education!!!

    Presenting you the Tutorman alias Daniel Shiffman aka Master Shifu(Hope you make us all tech ninjas and samurais!!!)

    Reply
  • January 2, 2018 at 8:13 pm
    Permalink

    I stumbled upon this channel. This stuff is amazing. BTW your book – The nature of code – is the first book I bought on Amazon. I didn't realize when I saw this video that it was you because your name does not appear anywhere on the channel. I love your teaching style. Great work and many thanks !!!

    Reply
  • January 6, 2018 at 4:28 pm
    Permalink

    You said computer science 1:22!!!

    Reply
  • February 20, 2018 at 5:21 am
    Permalink

    You are a coding GOD ! Did you go to university for computer science ? Or are you self taught? What recommendations can you give me to be at the level you are at?

    Reply
  • April 18, 2018 at 5:17 pm
    Permalink

    Hi ,

    I am new to programming so Please Guide me from where i should start.

    Reply
  • May 12, 2018 at 10:42 am
    Permalink

    Your'e my Sensei, hello from Poland!

    Reply
  • May 16, 2018 at 5:42 am
    Permalink

    This "traveling salesperson problem" seems to be the same as the well known Traveling Salesman Problem.

    Reply
  • July 13, 2018 at 3:18 am
    Permalink

    Great Introduction of everything! HAHA

    Reply
  • July 27, 2018 at 10:09 am
    Permalink

    i wish you could train us with java script and web development languages.

    Reply
  • August 1, 2018 at 7:43 am
    Permalink

    As always, THANK YOU!

    Reply
  • August 21, 2018 at 5:38 pm
    Permalink

    Here is my implementation of Maze Generator and Pathfinding A* in Windows Form C# for anyone who wants to practice with c#
    https://github.com/TrongHieu90/MazeSolver

    Reply
  • August 31, 2018 at 9:43 am
    Permalink

    Any prerequisites to follow this course ?

    Reply
  • September 27, 2018 at 11:52 am
    Permalink

    I found this video a few weeks ago, got to the end where you suggested watching the p5.js videos first, so I did, wrote a bunch of exercises in the web editor, shared them with friends, and now I'm back for these exciting code challenges and tutorials about machine learning! Thanks for making these videos!

    Reply
  • October 18, 2018 at 12:59 pm
    Permalink

    <3 Love you, Dan.

    Reply
  • October 29, 2018 at 11:23 pm
    Permalink

    You are the best of the best. Please keep share your knowledge. I love you!

    Reply
  • November 21, 2018 at 5:48 pm
    Permalink

    is OSPF a similar Algo?

    Reply
  • December 17, 2018 at 10:49 pm
    Permalink

    Can you do this in java some of us are more comfortable in java

    Reply
  • December 21, 2018 at 11:59 pm
    Permalink

    HELLO I REALLY ENJOY YOUR VIDS – a lot!!! they are so intuitive and u make learning soo fun
    i was wondering if you could prolly make videos (later on) on python

    Reply
  • December 22, 2018 at 11:14 am
    Permalink

    You are so fun! xx

    Reply
  • December 27, 2018 at 7:28 am
    Permalink

    These lectures are of a higher quality than my Fundamental Algorithms class at Courant

    Reply
  • January 28, 2019 at 3:19 am
    Permalink

    Your tutorials are incredible!!! I want to start this series on Machine Learning with 10 sessions but was wondering …are there any prerequisites for this series?

    Reply
  • February 5, 2019 at 9:05 pm
    Permalink

    Dude..you should totally get an award.

    Reply
  • February 7, 2019 at 11:24 pm
    Permalink

    Thank you for this. I am starting to follow these videos as of Feb 7th 2019 in the hopes of applying this to complex Distribution Problems. I will keep you posted on my progress through comments on your videos. I have a strong background in math and moderate computer skills in Matlab. Best Regards from Canada.
    You know these are going to be very intructional when the only other subtitle option is Chinese.
    Edit: Slight setback, looks like I need to learn p5js…

    Reply
  • March 6, 2019 at 1:24 pm
    Permalink

    Please Turkish subtitle 🙂

    Reply
  • March 10, 2019 at 10:15 pm
    Permalink

    Very informative videos with friendly personality of the presentor . I enjoyed your videos and definitely I am a subscriber . Keep up the good work

    Reply
  • April 3, 2019 at 6:05 pm
    Permalink

    You are a life saver!! <3

    Reply
  • April 25, 2019 at 5:31 pm
    Permalink

    Super way of learning, please make a video on min max algorithm with javascript

    Reply
  • May 18, 2019 at 2:08 pm
    Permalink

    ur ideos are very informative and intersesting but how to download these.

    Reply
  • May 23, 2019 at 3:41 am
    Permalink

    Hey man.Can you please teach coding as though you are teaching to a 5 year old.I would like to learn but the most basic thing to a person like you is hella complex to a guy like me.so please make videos for children so i can start learning from the basics.I think that would be much more useful to a tech defficient individual like myself.thank you.and please keep up the good work.

    Reply
  • May 26, 2019 at 3:39 pm
    Permalink

    It's always refreshing to come back and watch you speak here. I'm back now that my exams are over and I keep saying it and it will still not be enough, that I just love seeing you on these videos. You are magical _

    Reply
  • June 16, 2019 at 2:23 pm
    Permalink

    I love your channel, it's not boring ^^

    Reply
  • June 27, 2019 at 1:55 am
    Permalink

    Funny that you've included Wikipedia links to everything. Can't everyone just go to Wikipedia? All I'm saying is they're not particularly great finds on your part. Maybe look for something else, better maybe?

    Reply
  • June 29, 2019 at 6:18 pm
    Permalink

    hey, very good videos, do you recommend to know javascript, because I know Python but most of your videos I think they are in javascript, I mainly understand everything but there are functions or other things that are quite different

    Reply
  • July 12, 2019 at 8:44 am
    Permalink

    that is so funny

    Reply
  • July 26, 2019 at 4:02 pm
    Permalink

    I like your videoes! Make coding more passionate for me!

    Reply
  • July 30, 2019 at 12:41 pm
    Permalink

    it's awesome thank you very much

    Reply
  • August 30, 2019 at 12:48 am
    Permalink

    You are one of my favorite 'professors' on the planet. I only have 5 of them so far.

    Reply
  • September 3, 2019 at 7:40 pm
    Permalink

    is this dude on uppers?

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *