replace some individuals in the current population using genetic algorithm, matlab
19 次查看(过去 30 天)
显示 更早的评论
Hello,
I'd like to use genetic algorithm to solve optimization problems based on the available commands ga or gamultiobj in matlab. But I want to make some change:
|Evaluate the objective values of the current offspring (population), and sort out m individuals with the worst fitness values and some individuals with the best fitness values;
Create m new individuals based on the best individuals, replace the m worst individuals with the newly creased ones;
Start the next round of evolution...|
Is it possible to re-conduct the ga or gamultiopt command to achieve it? In the documentation I found that I could use user-defined function for the scaling, selection, mutation and crossover. But these do not offer a space for replacing the current population. Anybody know how to solve the problem? Or do I need to prepare my own genetic algorithm code instead of using ga or gamultiopt command?
I'm looking forward to any suggestions.
Thanks in advance!
0 个评论
回答(2 个)
Alan Weiss
2013-12-5
Selection gets you the parents. Mutation and crossover get you the children. So custom selection, mutation, and crossover functions can provide what you need.
Alan Weiss
MATLAB mathematical toolbox documentation
0 个评论
Ahmed Rageh
2018-3-5
How could I know the current population number. For example, if I have 20 population, how can I know which one is currently in progress?
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!