prevent genetic algorithm ga from repeating values
Mostrar comentarios más antiguos
I am using genetic algorithm to optimize two variables for a specific function. However, as I thought would be the general demand, I don't want ga to repeat the evaluation of pairs of variables, i.e., I want ga to test only unique pairs of values. There are a few pairs of values that it repeats several times and not only as an elite, but as spawn as well.
I would like to know if it possible to prevent this. Thank you. Best Regards, Pedro
Respuestas (2)
Since there are only 2 unknown variables, can't you get a good fix on the global optimum using exhaustive search on an MxN discrete grid of the parameter values? If you restrict your initial population to include the discrete global minimum and points nearby, I'd guess you would not only avoid repetitions, but get very quick convergence as well.
2 comentarios
Pedro
el 21 de Dic. de 2012
Matt J
el 21 de Dic. de 2012
You should at least be able to rule out large regions of local minima. Using the MIN function on a grid of samples would find the global minimum over those samples. If the grid is fine enough relative to how sharply your function varies, that should correspond reasonably closely with the continuous-space global minimum.
Sean de Wolski
el 21 de Dic. de 2012
0 votos
This seems to contradict the theories behind genetic algorithms. The good candidates are supposed to breed and create other good candidates nearby and this is how these algorithms converge.
Also, it is the general recommendation that you should try patternsearch() before using ga()
Categorías
Más información sobre Genetic Algorithm en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!