Saving intermediate population during GA
2 ビュー (過去 30 日間)
古いコメントを表示
I need some help to find out a way to store the information related to every generation of the GA
(both the variable and the fitness values)
It could be both on an external file ( e.g. in a .txt file) or in a struct array.
Which one do you suggest? And how can I do it?
Thanks in advance
0 件のコメント
採用された回答
Alan Weiss
2013 年 4 月 18 日
You can save whatever you like using an output function. For examples of output functions (using a different syntax, be careful, GA uses its own), see a MATLAB example, and an Optimization Toolbox example.
Alan Weiss
MATLAB mathematical toolbox documentation
2 件のコメント
yusra asad
2018 年 12 月 8 日
It seems that the example gives only the values of the variables, I need the corresponding fval for each indiviual, did you get it?
その他の回答 (1 件)
Daniel Frisch
2020 年 10 月 7 日
You can use my function
outputFcn_global
to store all intermediate results in a global variable, and easily inspect them later on.
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!