How can I learn genetic algorithm using MATLAB (to be precise).
The easiest way to start learning Genetic Algorithms using MATLAB is to study the examples included with the (Multiobjective) Genetic Algorithm Solver within the Global Optimization Toolbox. You can then replace any of the fitness, selection, variation, creation or plotting functions with yours to solve your specific problem.
Another more involved way to learn Genetic Algorithms using MATLAB is to write your own code from scratch. You do not need any specific toolbox for this. Writing the code for a simple Genetic Algorithm is not difficult if you already know how to program in MATLAB. You might also need to use this approach if the solvers in the Global Optimization toolbox do not fit the workflow for the algorithm you have in mind.
If the fitness function you are trying to optimize is CPU bound (as it is for many nontrivial genetic algorithm problems), consider implementing the fitness evaluations in C and have MATLAB call those as MEX functions.
Another more involved way to learn Genetic Algorithms using MATLAB is to write your own code from scratch. You do not need any specific toolbox for this. Writing the code for a simple Genetic Algorithm is not difficult if you already know how to program in MATLAB. You might also need to use this approach if the solvers in the Global Optimization toolbox do not fit the workflow for the algorithm you have in mind.
If the fitness function you are trying to optimize is CPU bound (as it is for many nontrivial genetic algorithm problems), consider implementing the fitness evaluations in C and have MATLAB call those as MEX functions.
Comments
Post a Comment