什么遗传算法会产生有趣/令人惊讶的结果,并且没有无聊/明显的终点?
我发现像 this 这样的遗传算法模拟非常令人着迷,我认为让我的自己的。但大多数像这样的模拟的问题在于,它们通常只是爬山达到可预测的理想状态在人类指导下可以很容易地制作出结果。一个有趣的模拟将有无数不同的解决方案,这些解决方案彼此之间显着不同,并且让观察它们的人类感到惊讶。
那么我该如何尝试创造这样的东西呢?期望实现我所描述的目标是否合理?是否有任何“标准”模拟(从某种意义上说,生活游戏是标准化的)我可以从中汲取灵感?
I find genetic algorithm simulations like this to be incredibly entrancing and I think it'd be fun to make my own. But the problem with most simulations like this is that they're usually just hill climbing to a predictable ideal result that could have been crafted with human guidance pretty easily. An interesting simulation would have countless different solutions that would be significantly different from each other and surprising to the human observing them.
So how would I go about trying to create something like that? Is it even reasonable to expect to achieve what I'm describing? Are there any "standard" simulations (in the sense that the game of life is sort of standardized) that I could draw inspiration from?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
取决于你所说的“有趣”是什么意思。这是一个非常主观的术语。我曾经为了好玩编写了一个图形分析器。该程序首先会让您绘制您选择的任何 f(x) 并设置边界。第二步是创建一棵树,其中包含 x 的随机生成函数中最常见的二元运算符 (+-*/)。该程序将创建一个此类随机函数的池,测试它们与相关原始曲线的拟合程度,然后对池中的一些函数进行杂交和变异。
结果非常酷。一个完全奇怪的函数通常是查询函数的一个很好的近似。也许不是最有用的程序,但仍然很有趣。
Depends on what you mean by interesting. That's a pretty subjective term. I once programmed a graph analyzer for fun. The program would first let you plot any f(x) of your choice and set the bounds. The second step was creating a tree holding the most common binary operators (+-*/) in a random generated function of x. The program would create a pool of such random functions, test how well they fit to the original curve in question, then crossbreed and mutate some of the functions in the pool.
The results were quite cool. A totally weird function would often be a pretty good approximation to the query function. Perhaps not the most useful program, but fun nonetheless.
好吧,对于初学者来说,遗传算法不会爬山,否则它会卡在第一个局部最大值/最小值处。
而且,你怎么能说它不会产生令人惊讶的结果呢?看看这里的这辆车,例如,我尝试过的一次运行中在第 7 代左右生产的车辆。这是一辆非常古老的自行车型号。当人类花了几千年才想出同样的模型时,你怎么能说这不是一个令人惊讶的结果呢?
Well, for starters that genetic algorithm is not doing hill-climbing, otherwise it would get stuck at the first local maxima/minima.
Also, how can you say it doesn't produce surprising results? Look at this vehicle here for example produced around generation 7 for one of the runs I tried. It's a very old model of a bicycle. How can you say that's not a surprising result when it took humans millennia to come up with the same model?
为了获得有趣的突发行为(不可预测但有用),可能有必要为遗传算法提供一个有趣的学习任务,而不仅仅是一个简单的优化问题。
例如,您提到的汽车制造商(虽然本身相当不错)只是使用固定道路作为适应度函数。这使得遗传算法很容易找到最佳解决方案,但是如果道路发生轻微变化,该最佳解决方案可能不再起作用,因为解决方案的适应性可能会依赖于景观中的微小细节,并且不稳健对其进行更改。事实上,汽车也不是在一条固定的测试道路上进化的,而是在许多不同的道路和地形上进化的。使用不断变化的道路作为(动态)适应度函数,由随机因素生成但在斜坡等的某些实际边界内,将是更现实和有用的适应度函数。
To get interesting emergent behavior (that is unpredictable yet useful) it is probably necessary to give the genetic algorithm an interesting task to learn and not just a simple optimisation problem.
For instance, the Car Builder that you referred to (although quite nice in itself) is just using a fixed road as the fitness function. This makes it easy for the genetic algorithm to find an optimal solution, however if the road would change slightly, that optimal solution may not work anymore because the fitness of a solution may have grown dependent on trivially small details in the landscape and not be robust to changes to it. In real, cars did not evolve on one fixed test road either but on many different roads and terrains. Using an ever changing road as the (dynamic) fitness function, generated by random factors but within certain realistic boundaries for slopes etc. would be a more realistic and useful fitness function.
我认为 EvoLisa 是一个可以产生有趣结果的 GA 。从某种意义上说,输出是可预测的,因为您正在尝试匹配已知图像。另一方面,输出的细节非常酷。
I think EvoLisa is a GA that produces interesting results. In one sense, the output is predictable, as you are trying to match a known image. On the other hand, the details of the output are pretty cool.