the operations in genetic operators
Show older comments
when applicat the genetic algorithm in matlab there is two type of crossover
the first type is
y1=alpha.*x1+(1-alpha).*x2;
y2=alpha.*x2+(1-alpha).*x1;
and the second is
y'= alpha(x2 - x1) + x2
Tow types is using in real genetic algorithm ,what is the difference between them? When we use the first method and when we use the second?
4 Comments
Geoff Hayes
on 10 Jul 2018
Johan - please post a reference to your above code. Is it from the File Exchange (possibly from https://www.mathworks.com/matlabcentral/fileexchange/52856-binary-and-real-coded-genetic-algorithms) or from the Optimization Toolbox? At a glance, it looks like the first type will produce two children whereas the second type will just produce one child (or have you neglected to add the second equation?). Note how if we rewrite it, we get
y'= (1 + alpha)*x2 - alpha*x1;
Depending upon what alpha is, it would seem that x2 is being weighted "more" than x1...and seems to be incorrectly weighted. Please include a reference to this equation.
Johan Johan
on 10 Jul 2018
Edited: Johan Johan
on 10 Jul 2018
Geoff Hayes
on 10 Jul 2018
Johan - I'm not sure where in that index I should be looking for this other function. Please provide more details.
Johan Johan
on 11 Jul 2018
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!