Hey there, my name is Cezanne Camacho and I’m an instructor here at Udacity. I’ve been working on our self-driving car course which focuses on how a car sees the world through cameras and sensors and then makes driving decisions based on what it sees. And deep learning is one of the most exciting tools that self-driving cars use to navigate the world. Using deep learning, you can teach a car to drive based on observations about the environment it’s in, like whether the car is surrounded by people or other cars, or if the car is moving quickly on a highway. The car should respond correctly in all kinds of situations. One problem that deep learning can help solve is navigating efficiently through traffic, a problem that’s near to my heart living in California. People spend hours stuck in traffic every day. So, let’s see how deep learning can help. To get you started, we’ll be looking at a project developed by MIT, called the DeepTraffic. DeepTraffic is a simulation of highway traffic where the car in red is controlled by a neural network that you can train. And a neural network is just a computer program that’s loosely modeled on the way our brain processes information and learns from it. And these networks acquaint themselves with the world like humans do, learning by trial and error. Let’s see how this example works. The car starts out not knowing much about its environment. The only thing that’s already programmed is safety. This car won’t ever crash into other ones. The rest of its behavior is determined by a neural network. This neural network takes input data, processes and learns from this input through hidden or unseen layers, and then outputs and action. The input is data about the car’s surroundings like where it is in relation to other lanes, cars, and empty space. I’ll call this data the car’s state, and the action that the car takes will be to move left or right or stay in the same place and to speed up or slow down. New states and actions happen over and over again as time progresses and each time step, the network learns more about which states and actions results in the fastest navigation through traffic. This is a type of deep learning called reinforcement learning. The car starts out without any knowledge but learns how to act by favoring or rewarding actions and states that results in faster navigation. This reinforces the best behavior. So, given only well-defined input and a goal to drive the fastest, the car can learn for itself how to navigate traffic. It’ll be your job to tune the input to the neural network. In code, this is controlled by the variables, lanesSide, patchesAhead, and patchesBehind. This whole simulation is laid out in a grid defined by lanes and patches. Each car is about three or four patches in length and you can see what the input grid looks like by clicking road overlay and learning input. Right now, the learning input is just one patch which doesn’t provide much information, but if I change patchesAhead to be six and lanesSide to be one, and I quick apply code, I can see a larger learning input area. I’ll see six patches ahead of the red car, and one lane to the left and one to the right of it. This gives a little more information but you’ll probably want to expand this even more. This area defines the input that the neural network will learn from. Other variables you should change include the number of hidden layers and the number of neurons in the neural network. Here there’s a single layer defined for you in the starting code with just one neuron. I’d suggest increasing the number of neurons and copy and pasting this code to add more layers. This will improve the network’s ability to learn from the incoming data. You’ll learn more about these hidden layers and neurons later on. For now, just know that one layer can recognize a basic pattern in the data, like all the places where an empty grid cell is next to an occupied grid cell. Then each successive layer in the network looks for a pattern in the previous layer. Eventually these hidden layers produce the outputs we’re looking for that determine the action that the car should take. I know this all seems mysterious for now but these layers are just the way that neural networks find patterns in data and learn from those patterns. This example is mainly meant to give you some intuition about how deep learning works, and how quickly a network can be trained to solve a real world problem like traffic navigation. So, I urge you to play around with the inputs to the neural network, then when you’re done, click apply code then run training. You should see the behavior of the car change pretty quickly. Then to evaluate how well you’re doing, click start evaluation run or just take a look at how fast your car is moving and how many cars it passes. Try to get it to go faster than 65 miles per hour. Good luck.