How to record all generations in Genetic Algorithms in MATLAB (R2012a)?
10 views (last 30 days)
Show older comments
MathWorks Support Team
on 22 Jul 2016
Edited: MathWorks Support Team
on 5 Mar 2021
I am implementing Genetic Algorithm for my problem. The program needs many generations to reach the optima and I need to record the information of every generation in a text file or a variable (best function). I was wondering if there is any option in GA to record that for me?
Accepted Answer
MathWorks Support Team
on 8 Mar 2021
Edited: MathWorks Support Team
on 5 Mar 2021
The details can be accessed in a specified OutputFcns function. This is detailed in the following documentation page:
All the information you need, such as the population, the score of the current population, the current geneartion number, etc. - can be saved in the 'state' variable onto a file.
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!