Genetic algorithm and Backpropagation in autonomous cars
Autonomous cars need learning in order to recognize their environment and behave consistently. Neural networks give us the opportunity to develop complex behaviors and tasks like driving.
I have implemented two algorithms that are widely used in machine learning: backpropagation (supervised learning) and genetic algorithm (reinforcement learning).
Supervised Learning (Backpropagation)
This is the most used algorithm and compared to the rest, this is the most powerful and needs fewer resources to be performed. However, there is a disadvantage, we need training data for the learning process and thus is really restrictive.
Reinforcement Learning (Genetic Algorithm)
It is an algorithm that was inspired by the theory of evolution by Charles Darwin.
The implementation simulates the process of natural selection where the fittest individuals have higher probabilities to transfer their genes to the next generation. It is usually divided into 4 parts.
Initialization
Genes frequently use Boolean representation (0 or 1). However, here we use a real number in between -1 and 1 to depict the gene value. We now need to design the neural net topology, for example: if I use 5 sticks to measure the distance to the nearest object and we want to return acceleration, right and left turn, this represents 5 inputs and 3 outputs, and you can change the hidden layers topology. We have used 4 layers in our experiments. Then, to initialize the weight values one can select a random number, in the interval [-1..1].
Selection
This process orders individuals from each generation, according to their fitness. The
fitness function returns a probability to transmit ”genes” to the next generation.
There are different variants of this step. I have designed a function that uses 2 variables: accuracy and diversity. Genetic algorithm, like others, have a paramount problem while you are trying to reach the global minimum, it usually comes to a standstill in a local minimum. To solve this problem, I have used a measure of the distance from one individual to the rest of the individuals.
The accuracy can be measured using the positioning system that can tell us the percentage of the circuit traveled, by the individual. Once we have the accuracy and the diversity of each individual, we can transform absolute data to relative. The result will be given with a real number between 0 and 1.
Crossover
The elements we have chosen will experiment with the crossover operation. It is the process of exchanging genes among parents to reach a new individual made by progenitors. This part can be modified as you may require. It will be possible to design it with some hyper-parameters: crossover rate, number of progenitors.
Mutation
We change some of the genes with a random number generator. By the fact that if decimal numbers, we need some hyper-parameters: mutation rate, mutation change.
12 thoughts on “Autonomous Car – Learning Algorithms”
I will immediately snatch your rss as I can not find your e-mail subscription link or newsletter service. Do you’ve any? Please let me know so that I may subscribe. Thanks. Ahaa, its good conversation about this piece of writing here at this blog, I have read all that, so now me also commenting at this place. Hi there! Someone in my Myspace group shared this site with us so I came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this to my followers! Wonderful blog and wonderful design. http://samsung.com
Ꮋowⅾy! Someone in my space ցroup shared this ѕite with us so I came to check it out. I’m definitely loving the information. I’m book-mаrking and will be tweeting this to my folloѡers! Great blog and terrific design.
I just like the helpful information you provide for your articles. I’ll bookmark your blog and take a look at again here frequently. I am somewhat certain I’ll be told plenty of new stuff right here! Good luck for the next!
I do ƅerlieve all thee ideas yoᥙ’ve offered to your post. They are very cοnvincing ɑnd will certainly work. Nonetheless, the posts are too brief for novices. May you please lengthen them a littlе from next time? Ƭhanks for tһe рost.
Somebody essentially assists to make significantly posts I would state. That is the first time I frequented your website page and thus far? I amazed with the research you made to make this particular put up incredible. Wonderful activity!
Greetings from Ohio! I’m bored at work so I decided to check out your site on my iPhone during lunch break. I love the info you provide here and can’t wait to take a look when I get home. I’m shocked at how quick your blog loaded on my phone…
I just like the helpful information you provide for your articles. I will bookmark your weblog and check once more here regularly. I’m somewhat sure I will be informed plenty of new stuff proper here! Best of luck for the following!
I will immediately snatch your rss as I can not find
your e-mail subscription link or newsletter service. Do
you’ve any? Please let me know so that I may subscribe.
Thanks. Ahaa, its good conversation about this piece of writing here at
this blog, I have read all that, so now me also commenting
at this place. Hi there! Someone in my Myspace group shared this site with us
so I came to take a look. I’m definitely loving the information. I’m book-marking and will be tweeting this
to my followers! Wonderful blog and wonderful design. http://samsung.com
I could not refrain from commenting. Perfectly written!
Ꮋowⅾy! Someone in my space ցroup shared this ѕite with us so I came to check it out.
I’m definitely loving the information. I’m book-mаrking and will be tweeting this to my folloѡers! Great blog and terrific design.
I just like the helpful information you provide for your articles.
I’ll bookmark your blog and take a look at again here frequently.
I am somewhat certain I’ll be told plenty of new stuff right here! Good luck for the next!
I do ƅerlieve all thee ideas yoᥙ’ve offered to your post. They are very cοnvincing ɑnd will certainly work.
Nonetheless, the posts are too brief for novices. May you please lengthen them a littlе from next time? Ƭhanks for tһe рost.
Is going to be back ceaselessly to check up on new posts
Greetings! I’ve been following your web site for a while
now and finally got the courage to go ahead and give you a shout out from Kingwood Tx!
Just wanted to tell you keep up the excellent
work!
Somebody essentially assists to make significantly posts
I would state. That is the first time I frequented your website page and thus far? I amazed with the research you made to make this particular put up incredible. Wonderful activity!
Hi there! Do you use Twitter? I’d like to follow you
if that would be ok. I’m definitely enjoying your blog and look forward to new updates.
Greetings from Ohio! I’m bored at work so I
decided to check out your site on my iPhone during lunch break.
I love the info you provide here and can’t wait to take a look when I get home.
I’m shocked at how quick your blog loaded on my phone…
What’s Going down i am new to this, I stumbled upon this I have
discovered It absolutely helpful and it has aided me out loads.
I’m hoping to contribute & help different users like its helped me.
Great job.
I just like the helpful information you provide for your articles.
I will bookmark your weblog and check once more here regularly.
I’m somewhat sure I will be informed plenty of new stuff proper here! Best of luck for the following!