From where does the Genetic Algorithm take the values of variables in optimisation process?
Show older comments
In the genetic algorithm optimisation process, from where does the GA take initial values for the variables?
function y = simple_fitness(x) y = 100 * (x(1)^2 - x(2)) ^2 + (1 - x(1))^2;
FitnessFunction = @simple_fitness; numberOfVariables = 2; [x,fval] = ga(FitnessFunction,numberOfVariables)
In this script, we have not defined the values for x(1) and x(2) to start the optimisation process. However, the script is executed and we get the answer.
Accepted Answer
More Answers (0)
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!