How to record all generations in Genetic Algorithms in MATLAB (R2012a)?

9 views (last 30 days)
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
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.

More Answers (0)

Tags

No tags entered yet.

Products


Release

R2012a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!