I got interested in GA and want to do my own.
This is the task, I want to achieve:
I got a "world" 16x16 fields. I create 16 bots with random genes. Each gene is an array with 4 numbers from 1-19(16-19 will turn the bot direction and 1 - 15 is the amount of field the bot will go in a specified direction). In this word I take a random position and trying to make the distance from the leader bot to the target as small as possible.
The way I create new generation:
Picking 8 bots with the lowest distance and putting them into the next generation(without crossover)
Doing crossover for the 8 best bots I picked in '1)'(so I get 8 new bots)
- Mutating randomly 2 of the crossovered bots and finally putting them into the next generation. Now I have 16 bots in the new generation.
And the problem is: I only get the distance == 0 in 1/100 of all my tries. But I get the distances 1 and 2 quite often(I wait until generation 1000 and then I give up, trying one more time) Is there is a way to improve this? Or is it not possible to do it better with GA?
