PyBrain is a Python-based library for creating neural networks. I’ve looked at the tutorials on their site but they don’t seem to help me very much. The simulation I plan to do is have a car that drives on a track, equipped with 5 rangefinders showing the current distance between it and the walls, ranging between 0.0 and 1.0. The fitness is based on average speed. (Higher would be better) The output would be one number, how much you turn for that specific moment, where all the way right is 1.0, and all the way left is either -1.0 or 0.0, whichever makes it simpler.
I assume using this setup I would have 5 input neurons and 1 output neuron. Just for example, I’ll assume I have 4 hidden neurons. Let’s also assume I’ve made a function called runSimulation() which takes a neural network as an argument, drives the car down a course using that neural network, and returns the average speed (the fitness).
How can I train a neural network based upon the repeated results of runSimulation()?
I hope I am explaining this correctly, (not to mention even slightly knowing what I am doing) but if I am not, please tell me.
It seems that this is a supervised learning problem. In this type of problem you NEED to provide some answers BEFORE to train your NN.
You can try following approach
Lets assume you have following car.
Below is your rf diagram
Your train set should be like below.
After you have given such a training dataset to your NN you may train it.