I am working with neural networks for a while right now and I've read that I could use a simple feedforward neural network to create a self driving car.

I was wondering how this possibly works because usually for any data that depends on time, I thought that I need to use a RNN.

I am working with Java so implementing a neural network is slightly harder than simply using Numpy in Python etc. So I was not able yet to code my own RNN but still want to create a small 2D simulation where a car should drive a track.

  1. So my question now is how one would make a ANN that learns how to drive a track. My attempt was to have 9 input values that determine the distance to the border of the track in a circular shape in front of the car. The distance is given as a value between 0 and 1 and is calculated as a nonlinear function (like in computer graphics) and might looks something like this:$$\tag{$\forall k \in \mathbb{R}:k>0$} d\left(x\right)\ =\frac{-1}{\left(x\cdot k+1\right)^2}+1$$

  2. Probably 2 hidden layers with 5 neurons each.

  3. The first value of my output determines how fast the car should accelerate. The second one tells the car to drive left/right $$(0,0.5) \rightarrow left $$$$(0.5,1) \rightarrow right$$

    The real question is how would I make my network learn to drive better?. Like what happens when I hit a wall? What should be the error?

  • 1
    $\begingroup$ In this case you don't need RNN since your current state (position / velocity of the car) suffices to drive correctly. Your loss has to be differentiable, so if you have the distance in $(0, 1)$ range maybe something like $L(x) = - log(x)$ will do. $\endgroup$ – Łukasz Grad Oct 20 '17 at 20:19
  • $\begingroup$ But how would this be applied to my neural network? Could I still use the same backprop. algorithm that I used for the Mnist data set? $\endgroup$ – Finn Eggers Oct 21 '17 at 9:32

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.