Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Neural Network Demo

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
9,707
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Nov 28, 2010

The simulation is based on a neural network to guide the car around the track and a genetic algorithm used to pick and breed the most succesful cars of each generation.

If you want the source code for this demo, send me a PM.

For the people who are interested in how it works:
The car uses its 5 feelers to gauge a normalised intersection depth with the track's edges and then feeds this 5 values as inputs to the neural network. The inputs are then passed through a hidden layer of 8 neurons and then finally to an output layer of 2 neurons: a left and right steering force. These forces are then used to drive the car forward and turn the car.

Each car represents a different genome in a generation (or a unique set weights for the neural net) which are evaluated and potentially carried through to the next generation by a fitness score. The fitness score is based on the distance along the track achieved as well as bonus points for hitting checkpoints (this encourages the network to navigate around tricky sections of the track).

In the video, the neural network / genetic algorithm finds a solution at about 2.25. FRAPs interfered a little by clamping the framerate, so it took a bit longer than usual for it to find a solution.

Legend:
The green dots are the intersection points of the feelers. The blue lines are the feelers
The orange highlighted track geometry is track sections that are being considered for collision.
The blue circle is the radius used to search for track nearby track geometry.

Category:

People & Blogs

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (onethought99)

  • hi there, would it be possible to have a sample of the training, validation and unseen data sets you used?

  • @IceManNavigator

    I didn't use training, validation and unseen data sets for this sorry. It was based on a learning algorithm that would take the best performers from each generation and then cross-breed and mutate them. If you want to view the source code, it is available at: matthewrobbins (dot) net

  • Are you programming it in C? or what language?

  • @Leoz2569

    This was done in C++ using a game engine that was supplied for us while at uni. You can find the source code here: matthewrobbins . net

  • When it learned for this course, is it able to do another different one without training?

  • @jpmorin196

    I never got around to testing it on another course but I imagine that it would be able to.

see all

All Comments (15)

Sign In or Sign Up now to post a comment!
  • if you "bake" this AI, can it drive a different track?

  • Learn to drive in 3 minutes :)

  • awesome, it learned from its mistakes :)

  • @onethought99 hey thanks!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more