the operations in genetic operators
显示 更早的评论
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 个评论
Geoff Hayes
2018-7-10
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
2018-7-10
编辑:Johan Johan
2018-7-10
Geoff Hayes
2018-7-10
Johan - I'm not sure where in that index I should be looking for this other function. Please provide more details.
Johan Johan
2018-7-11
回答(0 个)
类别
在 帮助中心 和 File Exchange 中查找有关 Genetic Algorithm 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!