fitness for Shortest path using a genetic algorithm
Hi.
I have this problem:
I'm doing a program that has a map and two points. the map has wall that are not valid positions.
I have used a A* algorithm to calculate the shortest path and is working fine.
now i'm implementing a genetic algorithm to solve the problem but i'm not having sucess.
My genetic operator are directions (left, right, up and down).
I'm not being able to find a goodfitness function to solve the problem.
can someone tell me a god function or here I can found information about that?
I have been searching on google and I have not yet had sucess.
I have tryed two diferent fitness tecniques:
- add 1 for each step and if it finds a wall or gets out of the map add the maximum value (mapsize*mapsize).
- the other one is add the valid steps and if it finds a wall or gets out of the map add the number of necessary steps to gets to destination. the valid steps has a weight of 30% and the necessary steps has a weight of 70% (i have tryed to use diferent weight).
Can someone help me?
thanks

