[MUSIC - RANDY ROGERS BAND, "TONIGHT'S NOT THE NIGHT (FOR GOODBYE)"] DAVID MALAN: Hello world. This is CS50 Live and this is our season finale. But boy do we have a good episode for you today, in particular, the latest in image stabilization, robo soccer, and ultimately, a look back at CS50 Live itself. Now you may recall that desk lamps have been a bit of a thing this year. In fact, this was kind of a spontaneous introduction to CS50's week zero this past fall 2013. Just a day or so before the very first lecture this past fall, I decided it would be kind of fun to be able to visualize binary-- zeros and ones-- and so I headed to CS50's favorite store, Target, and picked up these desk lamps here. Now, at the end of the lecture, I found that I didn't really need these lamps for another year. And even if I did, it would kind of be an old bit by 2014, so I offered them up to students in the audience. Now, since then of course, we've been receiving quite a few emails, Facebook posts, and tweets requesting these same CS50 desk lamps to be sent nationally and internationally. And so we did. And we got back this very nice note from CS50's Luigi Morelli in Rome, Italy who wrote us this. "And here I am! Thanks to CS50 staff. Hey, look at those four books behind me." In fact, if you do look up there on the top shelf, you will see four books. And if we enhance, you'll see that it's a canonical set of computer science books by a very renowned computer scientist known as Donald Knuth who wrote, The Art of Programming. So if you yourself were looking to build your own collection of computer science canon, go ahead and take a look at The Art of Programming. Now, meanwhile, if we take a look at videos that some of your classmates have submitted, we will see the first one from Rian from India. Hi. I'm Rian [INAUDIBLE] from India. And I'm taking CS50 online [INAUDIBLE]. And the reason I want the lamp is basically because I don't have a lamp at all and I really need one as I'm doing [INAUDIBLE] for [INAUDIBLE] and all this stuff. And I don't have a desk lamp or anything like that. So it would be really great if you guys would send me one. I'm Rian [INAUDIBLE], and this is CS50. DAVID MALAN: Now, your next classmate, Mauricio, you may recall from a previous video. But this time, Mauricio decided to take it up a notch and actually deliver his own lecture for week zero. MAURICIO RADA: So this is CS50. My name is Mauricio Rada, and 73% have no prior experience in computer science, contrary to what you might think. So today, we thought we would chip away at that lack of familiarity, but also give you a sense of, for those of you with more comfort, which directions you can go this semester. So let us start with this. I have these little desk lamps here, so-- oh. We haven't any desk lamp here. We can't go on. So you will have to end this lab here. This is not CS50. At the next CS50-- DAVID MALAN: And lastly, is Sid, also from India, who actually decided to create for us his own song. SID: Hi, I'm Sid, and I'm from India. I want a desk lamp because-- how about I put it this way. [MUSIC PLAYING] It's kind of funny how life can change once you take CS50 in a matter of days. So I'm making this video to show you guys why I deserve a brand new desk lamp. So it goes like this. I get yelled at every night for not switching off the lights. SPEAKER 2: Switch off the light, man! SID: Just a second. Whether I'm writing lyrics or coding some [INAUDIBLE]. SPEAKER 2: Dude, I'm switching off the lights. SID: Five minutes. Just five minutes. One love for CS50. One love for the desk lamps. One love. If I don't get one, I won't survive. So please give me a desk lamp. Darkness makes me wet my pants. Please give me a desk lamp. Desk lamp is all I need. I hope you like it. DAVID MALAN: Now lest I be shamed on the internet, it's CS50 that's an introduction to the intellectual enterprises of computer science and the art of programming. But Professor Donald Knuth's books, if you would like to Google and find them yourself, are The Art of Computer Programming. Now, you may recall that CS50 recently participated in this, a 48 hour film project wherein CS50 had just 48 hours to create a short film with a few required elements. Now, one of the scenes from that film was this one here wherein Daven was desperately running along the Charles River near Harvard trying to just say hello. Now, what you might not have realized is that running in front of these two were actually three guys. In fact, pictured here is some of CS50's team. And if we zoom in, you'll see Ian holding the camera, Patrick holding Ian, and Dan directing the scene. Now, in fairness, if we zoom out, you'll see CS50's own Ramon Galvan who was just running. Now, what Ian was holding with the camera was this device here which performs something called image stabilization which is the technology with which we were keeping that shot along the river so relatively steady even though those guys were all running backwards. Now, you might know of this kind of technology from yesteryear. In fact, if you grew up with the so-called gyro bowl, which looked a little something like this, this is a very simple device that essentially spins on three axes so that you have some cereal inside of this bowl, in theory, it should never fall out because the handles will always keep the bowl itself in an upright position. Now, I recently had an opportunity to spend time with CS50's own Dan Coffey, who went into more technical detail as to how more modern image stabilization works. So I'm here with CS50's own Dan Coffey, jogging along the Charles River on Harvard's campus. Now if Dan were just using a camera to shoot this, the image would be pretty shaky, definitely not stable. He's using a technique called image stabilization which should, hopefully, be stabilizing the image. Can we shoot the rest of this inside? OK. Image stabilization. What is it? How does it work? DAN COFFEY: So for many years, the TV and film industry have been trying to get more dynamic shots by introducing movement, but it's a challenge to keep them stabilized. You've seen The West Wing maybe where they do the walk and talk shot? And basically what they use for that is a steady cam, which is a big rig that you wear. It's a vest with an arm that isolates the camera from the user and counter balances it with a series of weights. But it takes a really long time to set up and it's very complicated to actually use. There are new developments in software that you can use where you can make adjustments in Mac or PC which sometimes work, sometimes they don't. But one of the latest developments is actually this. This is the MoVI M10. It's a really neat piece of equipment from our friends at Freefly Systems. And basically, it uses a series of gimbal axes to stabilize your camera. DAVID MALAN: What's a gimbal? DAN COFFEY: So a gimbal is a set of rings that each spins on its own axis and basically isolates each direction, either the x, the y, or the z. And really just makes it very smooth and fluid. So this M10 is a large gimbal and has three axes on it-- one here for the tilt, it's got one in the back for the roll, and one up top for the pan. And I can actually show you if you want to see how these actually work. DAVID MALAN: Yeah, sure. DAN COFFEY: So if you look here in the software, this is their Freefly Configurator. And it's basically outputting diagnostic information right now. But you see we have motor tilt, motor roll, and motor pan. And as I actually pan the camera, you're going to see the blue lines start to go up and down. DAVID MALAN: OK. So that represents the-- DAN COFFEY: It's the resistance of the motor pushing back against me because the M10 always wants to come back to rest in the same position. DAVID MALAN: OK. So the taller, the lower the bar, the more resistance. DAN COFFEY: Yeah, the more intensity that the motor's using to fight me. If I tilt, you can see the red line doing the same thing. And then roll-- DAVID MALAN: The green line up and down. DAN COFFEY: So these are the three axes we're stabilizing against. And so this is not normally how you would operate it, right? So if I actually pick this up-- and here, why don't you actually hang on to it. DAVID MALAN: Yeah, sure. Thank you. DAN COFFEY: And now you can see how little the camera moves when you hit the edge. The window, if you will, it starts to pan with you. That's actually set in the software as well. DAVID MALAN: I see. DAN COFFEY: But there's another really neat feature. If you are in a more complicated shoot, you can turn on this remote, have a second camera operator actually do the nitty gritty control. So I can now pan, flex this control. I can tilt and I can actually roll. So in this set-up, you would actually be the one moving the camera physically and I would connect a wireless video transmitter to the camera, put a receiver here on a monitor, and then I could actually, just like a video game, operate the camera for you. DAVID MALAN: Nice. DAN COFFEY: So I'll put it back in single operator mode, but you can get a sense of how smooth it actually is. DAVID MALAN: Yeah, no, absolutely. And I have an idea. Want to follow me? DAN COFFEY: Sure. DAVID MALAN: OK. So we're here in the bathroom to test out some actual image stabilization in front of, well, the only mirror we have. And I thought it'd be interesting to see just how much the camera moves when I actually move my arms up, down, left and right. DAN COFFEY: So let's see the pan, tilt, roll. DAVID MALAN: All right. Here we go. I'm really moving it. DAN COFFEY: So I see a little bit movement, but I mean, you would never operate it like that either. DAVID MALAN: No, definitely not. DAN COFFEY: All right. So David, let's get serious this time. We'll do a test where you actually go up the stairs and I will lead you with the stabilized MoVI, and Andrew will actually come next to me. Come on over Andrew. And we'll see what it looks like side-by-side. DAVID MALAN: Got it. DAN COFFEY: OK. Here we go. Ready to go up the stairs in three, two, one, go. Hi Shelley. All right, David, why don't you take this? Take all that you've learned today and put it together and we'll get the final shot. DAVID MALAN: All right. Here we go. DAN COFFEY: And now, 60 seconds of gimbals. SPEAKER 3: Uh-oh. Look out! Let's face it. Kids spill stuff. But now, parents can relax whenever kids snack. Introducing the GyroBowl, the world's first ever snack bowl that spins and spins and stuff stays in. The GyroBowl is 100% totally, absolutely, kid-proof! Just fill the GyroBowl and you're ready to go. SPEAKER 4: The magic is in the middle. The GyroBowl works just like a bowl. SPEAKER 3: GyroBowl's inner bowl rotates 360 degrees and magically stays open side up, no matter what! So the GyroBowl keeps all your snacks inside, however you bounce, swing, or fly! Now, kids can use the amazing GyroBowl as a super snack contraption. Fill it up with raisins or cereal and rev up the action! SPEAKER 5: Kids loves the amazing GyroBowl because it's fun and it never spills! SPEAKER 3: Pack crackers and grapes and get on with the chase! And when mom drives to the store, GyroBowl keeps the snacks off the floor. DAVID MALAN: Now, you may recall, I recently spent time with his CS50's own Colton Ogden. And this guy here, the NAO Robot that was loaned to us by CS50's friend Professor Radhika Nagpal in the robotics group. Now, of course, robots don't all take this form. In fact, we recently saw this guy here playing soccer with President Barack Obama. But it turns out that even soccer playing robots can come in different forms. In fact, pictured here are two custom made robots by Professor Radhika Nagpal's research group, with whom we sat down recently to better understand how they and you can build your own soccer playing robots and pit them in competition against each other in an international RoboCup competition. RADHIKA NAGPAL: My name Radhika Nagpal. I'm a professor at Harvard University. And I do bio-inspired robotics. So I'm really interested in how groups can work together really well. ERIC SCHLUNTZ: So my name is Eric Schluntz. I'm studying electrical engineering at Harvard University, KATE DONAHUE: I'm Kate Donahue. I'm a sophomore at Harvard College and concentrating in math and physics. So I'm part of RFC Cambridge. It's a joint Harvard/MIT team. We basically build robots that play soccer. RADHIKA NAGPAL: So the challenge of the RoboCup competition-- and it's an international competition that was started by people in the US and Japan actually-- is to create a team of robots that can play and possibly win against the world champions at the world cup. KATE DONAHUE: There are teams from all around the world. And because we're so far spread out, it's really hard for us to get to test the robots against each other. So it's basically just sort of like a soccer match. There will be some round robin games and then a final competition. And it's a chance to see how our robots stack up against others and just exchange ideas. RADHIKA NAGPAL: If you think about little kids playing soccer and older people playing soccer and think about the difference, like all the things that a little kid cannot do that an older person can, computer science has to fill that whole gap. ERIC SCHLUNTZ: So you could say, I want the robot to go behind the ball to set up for a shot. But what you really have to tell the computer to do is find the vector between the ball and the goal and go there, minus an offset. And you really need the computer science people to express yourself in a way that the robots can understand. KATE DONAHUE: We all work on very different parts of the robot, but we really need to coordinate. It's a big challenge and it's great when we all work on something together. So we'll build the mechanical part of it, and then the electrical engineers will make the circuit boards, and the computer science people will have done their simulations and then try and figure out how they can combine that and make the robot actually move. RADHIKA NAGPAL: I think really robotics is often about iteration. You do take one step forward. You take two steps back. You try to make one thing better. It makes something else worse. ERIC SCHLUNTZ: On the computer science team, we've made a lot of progress on our artificial intelligence. We threw out all the old strategy code and have been making something that's much more adaptive to how the other team is playing. So on defense, we do things like ranking the most dangerous players and covering them in a man to man defense based on that. And then our offense, we generate these maps over the entire field of how good the spot is and then assign our robots to these dynamically. RADHIKA NAGPAL: They need to be able to see. They need to be able to understand the world. They need to be able to move fast and turn and manipulate. They need to be able to notice their teammates and understand what they're doing. They need to have a strategy. And they need to adapt their strategy because their opponent will be doing things all the time. And so you can't have a pre-determined plan. You have to be able to adapt. KATE DONAHUE: Since last year's competition, we've done a lot of advances, especially in the wheel design. We've shifted the motors down and made everything much more compact, which has allowed us to move our center of gravity down, which allows us to go faster and also put in a dribbler, which is something we've wanted for a long time but just haven't been able to make fit until now. ERIC SCHLUNTZ: So each of the circuit boards on the robot has a different purpose. The four big ones, there, there, and there, each control one of the motors. So that basically takes a signal from the computer, decides how fast the wheel should spin, and sends the correct voltage to the wheels to do that. So like this board here controls this motor and this one here controls this motor. We also have these two boards in the middle. This one right here controls charging these big capacitors for the kicker. This board here controls when the robot kicks by using this light sensor right here to see when the ball is in front of it. It also controls the dribbler here which we use to put backspin on the ball so we can move backwards with it. KATE DONAHUE: It's not just you're trying to win. It's that you're trying to advance knowledge. And so you work on whatever you work on and then you have to release a paper saying exactly what you did that's so cool, and how other people can do that and they can build on your work. And so if there's something so advanced that someone comes up with, everybody can sort of draw on that. You can have that for one year and maybe nobody else can use it for that year. But then the next year, everybody will have modified it and have done the same thing. So it's really just moving forwards and not staying in the same place. ERIC SCHLUNTZ: I definitely want to be working on robotics in my career. I think that there's just a lot of amazing things that can be done to automate things, to make cars safer, to make just really everything work automatically so that people don't have to do things that are dangerous or dull. There's just so many things that robots can do better than people. And I think that as a society we need to start doing those to free people up to do more interesting things. DAVID MALAN: This is indeed our season finale and our 10th of 10 episodes. And it's truly remarkable how in just 10 episodes how many mistakes we have made. In fact, CS50's own Shelley Westover-- whom you may recall from such films as-- recently went through hours of footage of both live episodes and rehearsals thereof to find some of our favorite memories to share them with you. Hello world. This is CS50 Live. So if you see me trip, if you see me misspeak, if you see me screw up, all of that is happening literally right now in Cambridge, Massachusetts. Oh, hi world. Drum roll. Persp-- uh, persec-- pause the video if you would like. [INAUDIBLE]. [STUTTERING] Is Mark Zunkerburn's favorite pa-- to protect our nuclear missile. Keeping an eye as usual. Bugle itself. Gaggles. Good episude for you. It's actually quite-- Ah, it ends. You may recall. Head to this UR here. SPEAKER 6: This is CS50. Ah. DAVID MALAN: And now I made the blooper reel. Fantastic. SPEAKER 7: Should we redo the ending? How should we do the ending? DAVID MALAN: Photos of Jason Hirschhorn dressed as a punmpkin. SPEAKER 8: Oh, boy. I don't know if I want people to see that. DAVID MALAN: No. Now it's photos of Jason Hirsch dressed as a boy. SPEAKER 9: And if you're interested, I can actually show you how-- DAVID MALAN: Yeah, absolutely. SPEAKER 9: He's a little off-balance this morning. He hasn't had his coffee yet. SPEAKER 10: Whoa! Oh god. DAVID MALAN: From-- where's he from? SPEAKER 11: Right about-- right where my arm is, you can see like the white characters. There's the pole. DAVID MALAN: They don't know that's the-- you should point here. SPEAKER 11: Oh. DAVID MALAN: Can you hear me, world? RAMON GALVAN: Hello world. Welcome to CS50 Live. I'm Ramon Galvan. DAVID MALAN: And-- and I'm David Malan. RAMON GALVAN: And today, I'm hosting today's episode. DAVID MALAN: Well, with me. RAMON GALVAN: OK. OK. Oh, [BLEEP] SPEAKER 12: Don't say [BLEEP] on the air! RAMON GALVAN: Oh, [BLEEP] He'll be the Robin to my Batman, the Andy Richter to my Conan, the Cheech to my Chong today. This is most definitely a serious thing that we're doing today. This is not a joke. Dropbox has been quite a fuss lately because I know nothing about this. What is this about? That was all above me. And this is something I don't know of. We also take a tour of third glass-- third deg-- DAVID MALAN: Right there. It allows you to swipe credit cards on your iPhone in order to process payments. RAMON GALVAN: I have a flip phone. Let's play the clip. One, two-- DAVID MALAN: That was the first ever. RAMON GALVAN: What? DAVID MALAN: That was the first ever. RAMON GALVAN: OK. To host the first ever-- DAVID MALAN: I was in graduate school at the time. RAMON GALVAN: And I was in fourth grade. Although I love Zamyla, I would much rather not spend-- DAVID MALAN: Spend half as much time with her. RAMON GALVAN: Exactly. DAVID MALAN: Come on out, Zamyla! This was CS50, and this was terrifying. RAMON GALVAN: This is terrifying. Made a little sizzle roll to encapsulate the debauchery that took place. DAVID MALAN: I love you. Aww. RAMON GALVAN: I love you. Unlike David, who circles you. DAVID MALAN: Where are my slides? Oh. That's it for CS50 Live. Thanks so much to this week's contributors, to every one behind the camera, and thank you to you for tuning in this whole season. This was CS50. [MUSIC - SEMISONIC, "CLOSING TIME"]