通过遗传算法进行二维形状优化
我最近刚刚开始学习遗传算法,现在正在尝试在物理模拟中的二维形状优化中实现它们。模拟为每个形状生成一个标量。 (我猜这有点类似于 boxcar2d http://boxcar2d.com/)
2D 形状实际上是并集几个二维“子形状”。每个子形状都存储为角度/半径列表。然后将 2D 形状存储为子形状列表的列表。这是我现在的染色体。
现在为了健身,我可能会使用模拟生成的标量。我的问题是,我应该如何进行选择和复制过程?锦标赛会更合适,还是我想将截断与比例选择结合使用?另外,你如何找到一个好的突变率/种群大小等,
抱歉有这么多问题,但提前感谢。我只是真的不知道从哪里开始。
I just recently started learning about genetic algorithms and am now trying to implement them in 2D shape optimization in physics simulaiton. The simulation produces a single scalar for each shape. (I guess this is kind of similar to boxcar2d http://boxcar2d.com/)
The 2D shapes are actually the union of several 2D "sub shapes." Each subshape is stored as an list of angles/radii. The 2D shape is then stored as a list of subshape lists. This serves as my chromosone right now.
Right now for fitness, I will probably use the scalar the simulation produced. My question is, how should I go about the selection and reproduction process? Would tournament be more appropriate, or would I want to use truncation in combination with the proportional selection? Also, how do you find a good mutation rate/population size, etc
sorry for so many questions but thanks in advance. I just don't really know where to start.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
在我看来,最好的方法是在进化过程中使用自适应繁殖策略:在第一步(让其命名为“计算的第一阶段”),您可能会设置高突变概率,在这个阶段你应该找到足够好的解决方案。在算法的“第二阶段”,您可以设置每隔几步减少突变概率 - 在这个阶段您应该改进您的解决方案。但有时在我的实践中,我注意到优化第二阶段期间种群数量的退化(当每个染色体与其他染色体非常相似时) - 这会极大地减慢优化性能,所以我的解决方案是利用高值突变随机扰动改进算法,这会有所帮助。
另外,我建议您阅读差分进化算法 - http://en .wikipedia.org/wiki/Differential_evolution。对我来说,它的性能比遗传算法快得多。
On my point of view the best way is to use adaptive reproduction strategy during evolution: at the first steps (let name it - "the first phase of calculations") you might set high mutation probability, at this phase you should find enough good solution. At the "second phase" of algorithm you might set decreasing of mutation probability every few steps - at this phase you should improve your solution. But sometimes in my practice I've noticed degradation of population during second phase of optimization (when each chromosome is strongly similar to other) - which effects with extremly slowing down of optimization pperformance, so my solution was to improve algorithm with high valued mutation random perturbations and it helps.
Also I'll advice you to read about differential evolution algorithm - http://en.wikipedia.org/wiki/Differential_evolution. As for me it's performance is much more faster than genetic algorithm.