字幕表 動画を再生する 英語字幕をプリント SPEAKER: This is CS50. [MUSIC PLAYING] DAVID MALAN: Hello world. This is the CS50 podcast. My name is David Malan. And I'm here with CS50's own Colton, no Brian Yu. BRIAN YU: Hi everyone. DAVID MALAN: So Colton could no longer be here today. He's headed out west. But I'm so thrilled that CS50's own Brian Yu's, indeed, now with us for our discussion today of machine learning. This was the most asked about topic in a recent Facebook poll that CS50 conducted. So let's dive right in. Machine learning is certainly all over the place these days in terms of the media and so forth. But I'm not sure I've really wrapped my own mind around what machine learning is and what its relationship to artificial intelligence is. Brian, our resident expert, would you mind bring me and everyone up to speed? BRIAN YU: Yeah, of course. Machine learning is sometimes a difficult topic to really wrap your head around, because it comes in so many different forms and different shapes. But, in general, when I think about machine learning, the way I think about it is how a computer is performing a task. And usually when we're programming a computer to be able to do a task, we're giving it very explicit instructions-- do this. And if this is true, then do that or do this some number of times using a for loop, for example. But in machine learning, what we do is, instead of giving the computer explicit instructions for how to do something, we, instead, give the computer instructions for how to learn to do something on its own. So instead of giving it instructions for how to perform a task, we're teaching computer how to learn for itself and how to figure out how to perform some kind of task on it. DAVID MALAN: And I do feel like I hear about machine learning and AI, artificial intelligence, almost always in the same breath. But is there a distinction between the two? BRIAN YU: Yeah, there is. So artificial intelligence or AI is usually a little bit broader. It used to describe any situation where a computer is acting rationally or intelligently. Machine learning is a way of getting computers to act rationally or intelligently by learning from patterns and learning from data and being able to learn from experiences. But there are certainly forms of AI of being able to act intelligently that don't require the computer to actually be able to learn, for example. DAVID MALAN: OK. And I feel like I've certainly heard about artificial intelligence, AI, especially for at least 20 years, if not 30 or 40, especially in the movies or anytime there's some sort of robotic device. Like, artificial intelligence has certainly been with us for some time. But I feel like there's quite the buzz around machine learning, specifically these days. So what is it that has changed in recent months, recent years that put this at the top of this poll, even among CS50's own students? BRIAN YU: Yeah, so a couple of things have changed, certainly. One has definitely been just an increase in the amount of data that we have access to-- the big companies that have a lot of data from people on the internet that are using devices and going on websites, for instance. There's a lot of data that companies have access to. And as we talk about machine learning, you'll soon see that a lot of the way that these machine learning algorithms work is that they depend upon having a lot of data from which to draw understanding from and to try and analyze in order to make predictions or draw conclusions, for example. DAVID MALAN: So, then, is it fair to say, because I have more familiarity myself with networking and hardware and so forth that because we just have so much more disk space available to us now and such higher CPU rates at which machines can operate that that's partly what's driven this that we now have the computational abilities to answer these questions? BRIAN YU: Yeah, absolutely. I would say that's a big contributing factor. DAVID MALAN: So if we go down that road, like, at what point are the algorithms really getting fundamentally smarter or better, as opposed to the computers just getting so darn fast that they can just think so many steps ahead and just come up with a compelling answer to some current problem quicker than, say, a human? BRIAN YU: Yeah, it's a good question. And the algorithms that we have right now tend to be pretty good. But there's a lot of research that's happening in machine learning right now about like, trying to make these algorithms better. Right now, they're pretty accurate. Can we make them even more accurate, given the same amount of data? Or even given less data-- can we make our algorithms able to be able to perform tasks effectively just as effectively? DAVID MALAN: OK, all right. Well, so I feel like the type of AI or machine learning that I grew up with or knew about or heard about was always related to, like, games. Like, chess was a big one. I knew Google made a big splash with Go some years ago-- the game, not the language-- and then video games more generally. Like, if you ever wanted to play back in the '80s against the "CPU," quote, unquote, I'm pretty sure it was mostly just random at the time. But there's certainly been some games that are ever more sophisticated where it's actually really hard to beat the computer or really easy to beat the computer, depending on the settings you choose. So how are those kinds of games implemented when there's a computer playing the human? BRIAN YU: Yeah, so this an area, a very development in the last couple of decades that 30 years ago was unimaginable probably that a computer could beat a human at chess, for example. But now, the best computers can easily beat the best humans. No question about it. And one of the ways that you do this is via form of machine learning known as reinforcement learning. And the idea of this is just letting a computer learn from experience. So if you want to train a computer to be good at chess, you could try and give it instructions about you thinking of strategies yourself as the human and telling the computer. But then the computer can only ever be as good as you are. But in reinforcement learning, what we do is, you let the computer play a bunch of chess games. And when the computer loses, it's able to learn from that experience, figure out what to do and then in the future, know to do less of that. And if the computer wins, then whatever it did to get to that position, it can do more of that. And so you imagine just having a computer play millions and millions and millions of games. And eventually, it starts to build up this intelligence, so to speak, of knowing what worked and what didn't work. And so in the future of being able to get better and a better at playing this game. DAVID MALAN: So is this all that different from even the human and the animal world where, like, if humans have tried to domesticate animals or pets where you sort of reinforce good behavior positively and negatively reinforce, like, bad behavior? I mean, is that essentially what we're doing with our computers? BRIAN YU: Yeah, it's inspired by the same idea. And when a computer does something right or does something in the works, you give the computer a reward, so to speak, is what people actually call it. And then there's the penalty if the computer isn't able to perform as well. And so you just train the computer algorithm to maximize that reward, whether that reward is the result of like winning a game of chess or a robot being able to move a certain number of paces. And the result is that with enough training, you end up with a computer that can actually perform the task. DAVID MALAN: Fascinating. So I feel like another buzzword these days is, like, smart city where somehow, cities are using computer science and using software more sophisticatedly. And I gather that you can even use this kind of reinforcement learning for, like, traffic lights, even in our human world? BRIAN YU: Yeah. So traffic lights traditionally are just controlled by a timer that after a certain number of seconds, the traffic light switches. But recently, there's been growth in, like, AI-controlled traffic lights where you have traffic lights that are connected to radar and cameras. And that can actually see, like, when the cars are approaching in different places-- what times of day they tend to approach. And so you can begin to, like, train an AI traffic light to be able to predict, all right, when should I be switching lights and maybe even having traffic lights coordinated across multiple intersections across the city to try and figure out what's the best way to flip the lights in order to make sure that people are able to get through those intersections quickly. DAVID MALAN: So that's pretty compelling, because I'm definitely in Cambridge, been, like, in a car and stopped at a traffic light. And there's, like, no one around. And you wish it would just notice either via sensor or timer or whatever that, like, this is clearly not the most efficient use of, like, anyone's time. So that's pretty amazing that it could adapt sort of seamlessly like that. Though, what is the relationship between AI and the buttons that the humans pushed across the street that according to various things I've read are actually placebos and don't actually do anything and in some cases, aren't even connected to wires. BRIAN YU: I'm not actually sure. I've also heard that they may be placebos. I've also heard that, like, the elevator close button is also a placebo that you press that. And it sometimes doesn't actually work. DAVID MALAN: Yes, I've read it even, which not necessarily authoritative source. There is, like, a photo where someone showed a door close button had fallen off. But there was nothing behind it. Now, could have been photoshop. But I think there's evidence of this, nonetheless. BRIAN YU: It might be the case. I don't think there's any AI happening there. But I think it's more just psychology of the people and trying to make people feel better by giving them a button to press. DAVID MALAN: Do you push the button when you run across the street? BRIAN YU: I do usually push the button when I want to cross the street. DAVID MALAN: This is such a big scam, though, on all of us it would seem. BRIAN YU: Do not push the button? DAVID MALAN: No, I do, because just, what if? And actually it's so gratifying, because there's a couple places in Cambridge, Massachusetts where the button legitimately works. When you want to cross the street, you hit the button. Within half a second, it has changed the light. It's the most, like, empowering feeling in the world because that never happens. Even in an elevator, half the time you push it, like, nothing happens, or eventually it does and is very good positive reinforcement to see the traffic lights changing. I'm very well behaved-- the traffic lights as a result. OK, so more recently, I feel like, computers have gotten way better at some technologies that kind of sort of existed when I was a kid, like, handwriting recognition. There was the palm pilot early on, which is like a popular PDA or personal digital assistant, which has now been replaced with Androids and iPhones and so forth. But handwriting recognition is a biggie for machine learning, right? BRIAN YU: Yeah, definitely. And this is an area that's gotten very, very good. I mean, I recently have just started using an iPad. And it's amazing that I can be taking handwritten notes. But then my app will let me, like, search for them by text that it will look at my handwriting, convert it to text so that I can search through it all. It's very, very powerful. And the way that this is often working now is just by having access to a lot of data. So, for example, if you wanted to train a computer to be able to recognize handwritten digits, like, digits on a check that you could deposit virtually now, like, my banking app can deposit checks digitally. What you can do is give the machine learning algorithm a whole bunch of data, basically a whole bunch of pictures of handwritten numbers that people have drawn and labels for them associated with what number it actually is. And so the computer can learn from a whole bunch of examples of here are some handwritten ones, and here are some handwritten twos, and here's some handwritten threes. And so when a new handwritten digit comes along, the computer just learns from that previous data and says, does this look kind of like the ones, or does it look more like the twos?