Ok.
This is now an official attempt to navigate a given map using genetic algorithms. I will be using the techniques explained in the previous post.
Genetic algorithms.
Look at the
git page.
Now to explain the code.
- The gene
- The gene is composed of 'l' 'r' 'u' 'd'.
- each letter corresponds to a left, right up down movement on the map.
- The map
- the map is composed of empty spaces
- walls are determined by '0'
- entry point is 1
- target is 2
- The roulette function
- This can select a gene from a population based on the weights.
- It can select max and min fitness
With that done ill leace the rest of the code to be seen and read by you.