Saving intermediate population during GA
8 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
andrea84
le 17 Avr 2013
Réponse apportée : Daniel Frisch
le 7 Oct 2020
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 commentaires
Réponse acceptée
Alan Weiss
le 18 Avr 2013
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 commentaires
yusra asad
le 8 Déc 2018
It seems that the example gives only the values of the variables, I need the corresponding fval for each indiviual, did you get it?
Plus de réponses (1)
Daniel Frisch
le 7 Oct 2020
You can use my function
outputFcn_global
to store all intermediate results in a global variable, and easily inspect them later on.
0 commentaires
Voir également
Catégories
En savoir plus sur Genetic Algorithm dans Help Center et File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!