Pb Genetic algorithm
Afficher commentaires plus anciens
Dear all,
I have a problem with the genetic algorithm in Matlab. I tried to create a custom function in order to save the "state" at each generation, but I have a lot of problems. By chance do you have an example of a code ?
Thank you very much,
Best regards,
Aymeric
Réponses (2)
Alan Weiss
le 30 Août 2011
0 votes
There is a thread on CSSM addressing this issue: http://www.mathworks.com/matlabcentral/newsreader/view_thread/311708#849624
To quote my own answer there:
You can certainly write an output function. The basic syntax is here: http://www.mathworks.com/help/releases/R2010b/toolbox/gads/f6174dfi10.html#f17837
(There is an error in the description of the syntax in the R2011a documentation, sorry, that's why I am pointing to R2010b.)
For examples of using an output function (albeit with a different syntax than ga uses), see http://www.mathworks.com/help/techdoc/math/bsgpq6p-23.html#bsgpq6q-31 http://www.mathworks.com/help/toolbox/optim/ug/brhkghv-56.html
Alan Weiss MATLAB mathematical toolbox documentation
aymeric
le 30 Août 2011
Catégories
En savoir plus sur Genetic Algorithm dans Centre d'aide et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!