prevent genetic algorithm ga from repeating values
1 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(2 个)
Matt J
2012-12-21
编辑:Matt J
2012-12-21
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 个评论
Matt J
2012-12-21
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
2012-12-21
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()
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!