I am going to rewrite an algorithm using genetic methods for mutating my solutions, and I am wondering what I should expect and only consider my algorithm optimized or finished if various runs of the algorithm give the same result.For example, if I run the program once and get a good solution, A, but the second time I run it and get a good solution, B, is this expected behavior for an adequately designed genetic algorithm? Or should I only get a solution with minor variations of the same solution on each run?
Should a randomly-seeded genetic algorithm give deterministic optimized solutions on each run?
algorithms
As mentioned, you could have various global optimal solutions, so this behavior could be possible. However, it is also possible you could have a cost function surface that has a lot of variation based on the selected hypercube you are using for your search space. If there is a lot of variation and you aren't using enough points per generation in the genetic algorithm, you may not be adequately sampling the surface to end up at a given optimal location.So while this behavior isn't uncommon, you might want to experiment with having more points per generation to see if that helps you end up at a consistent global optimizer.When I use methods such as this, I usually try to find a list of the top N best locations and then I 'zoom' in on those locations and do some more optimization procedures to better sort out which spots are most optimal.