How can I modify the 'SelectionFcn' between two generations when using the Genetic Algorithm and Direct Search Toolbox 1.0.3 (R14SP2) from the command line?
3 views (last 30 days)
Show older comments
The Selection option ('SelectionFcn') specifies how the genetic algorithm chooses parents for the next generation. I am aware of the fact that I can modify the 'SelectionFcn' of a genetic algorithm when using the GATOOL, by pausing to stop the generation process and then choosing another selection function, and subsequently restarting the process. I would like to do the same from the command line.
Accepted Answer
MathWorks Support Team
on 27 Jun 2009
You may change the 'SelectionFcn' option from the command line by writing an output function and modifying the 'SelectionFcn' option in the options structure. To get started with this, you may use the gaoutputfcntemplate.m file, which illustrates how this can be done. You can study this function by typing the following at the command prompt:
edit gaoutputfcntemplate.m
0 Comments
More Answers (0)
See Also
Categories
Find more on Genetic Algorithm in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!