How does the parallel genetic algorithm evaluates the initial population?

3 views (last 30 days)
I am wondering how does the genetic algorithm evaluates the initial population.
I have expected that in parallel mode if I specify the population size =4, the algorithm will generate {x1,x2,x3,x4}, and evaluate the objective function at each of the xs simultaneously and then use the evaluated objective function to generate the new set of the four values.
However, when I write a simple program where I force the objective to print the time when the objective function is evaluated, it appears that the algorithm first evaluates x1, then simultaneously evaluates x2,x3,x4. Then creates a new population and from then on evaluates 4 objective functions simultaneously. For an example of the behavior see the files attached.
In summary, my question is why the genetic algorithm does not evaluate each of the values in the first population generation simultaneously.
Sincerely, Lena

Answers (1)

Alan Weiss
Alan Weiss on 5 Jun 2015
ga does an initial function evaluation in part to determine if the fitness function errors or has other problems. Once a single individual evaluates correctly, it goes into parallel evaluation of the entire population.
Alan Weiss
MATLAB mathematical toolbox documentation

Community Treasure Hunt

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

Start Hunting!