遗传算法(GA)和遗传规划(GP)是一个有趣的研究领域。

我想知道你使用GA/GP解决的具体问题,以及如果你没有自己的库/框架,你使用了什么库/框架。

问题:

你用GA/GP解决过什么问题? 你使用了哪些库/框架?

我在寻找第一手的经验,所以请不要回答,除非你有。


当前回答

我曾经尝试制作一个围棋电脑播放器,完全基于基因编程。每个程序都将被视为一系列动作的评估函数。即使是在一个相当小的3x4板上,制作的程序也不是很好。

我使用Perl,并自己编写了所有代码。我今天会做不同的事情。

其他回答

进化计算研究生班: 开发了TopCoder马拉松比赛49:megpartty的解决方案。我的小组正在测试不同的域表示法,以及不同的表示法如何影响ga找到正确答案的能力。我们为这个问题编写了自己的代码。

Neuroevolution and Generative and Developmental Systems, Graduate Class: Developed an Othello game board evaluator that was used in the min-max tree of a computer player. The player was set to evaluate one-deep into the game, and trained to play against a greedy computer player that considered corners of vital importance. The training player saw either 3 or 4 deep (I'll need to look at my config files to answer, and they're on a different computer). The goal of the experiment was to compare Novelty Search to traditional, fitness-based search in the Game Board Evaluation domain. Results were relatively inconclusive, unfortunately. While both the novelty search and fitness-based search methods came to a solution (showing that Novelty Search can be used in the Othello domain), it was possible to have a solution to this domain with no hidden nodes. Apparently I didn't create a sufficiently competent trainer if a linear solution was available (and it was possible to have a solution right out of the gates). I believe my implementation of Fitness-based search produced solutions more quickly than my implementation of Novelty search, this time. (this isn't always the case). Either way, I used ANJI, "Another NEAT Java Implementation" for the neural network code, with various modifications. The Othello game I wrote myself.

As part of my thesis I wrote a generic java framework for the multi-objective optimisation algorithm mPOEMS (Multiobjective prototype optimization with evolved improvement steps), which is a GA using evolutionary concepts. It is generic in a way that all problem-independent parts have been separated from the problem-dependent parts, and an interface is povided to use the framework with only adding the problem-dependent parts. Thus one who wants to use the algorithm does not have to begin from zero, and it facilitates work a lot.

你可以在这里找到代码。

你可以用这个算法找到的解决方案已经在科学工作中与最先进的算法SPEA-2和NSGA进行了比较,并且已经证明 算法的性能相当,甚至更好,这取决于您用来衡量性能的指标,特别是取决于您正在关注的优化问题。

你可以在这里找到它。

同样,作为我的论文和工作证明的一部分,我将这个框架应用于项目组合管理中的项目选择问题。它是关于选择对公司增加最大价值的项目,支持公司的战略或支持任何其他任意目标。例如,从特定类别中选择一定数量的项目,或最大化项目协同作用,……

我的论文将该框架应用于项目选择问题: http://www.ub.tuwien.ac.at/dipl/2008/AC05038968.pdf

之后,我在一家财富500强公司的投资组合管理部门工作,在那里他们使用了一种商业软件,该软件还将GA应用于项目选择问题/投资组合优化。

更多资源:

框架文档: http://thomaskremmel.com/mpoems/mpoems_in_java_documentation.pdf

mPOEMS演示论文: http://portal.acm.org/citation.cfm?id=1792634.1792653

实际上,只要有一点热情,每个人都可以很容易地将通用框架的代码适应任意的多目标优化问题。

I used a simple genetic algorithm to optimize the signal to noise ratio of a wave that was represented as a binary string. By flipping the the bits certain ways over several million generations I was able to produce a transform that resulted in a higher signal to noise ratio of that wave. The algorithm could have also been "Simulated Annealing" but was not used in this case. At their core, genetic algorithms are simple, and this was about as simple of a use case that I have seen, so I didn't use a framework for generation creation and selection - only a random seed and the Signal-to-Noise Ratio function at hand.

我年轻时就尝试过GA。我用Python写了一个模拟器,工作原理如下。

这些基因编码了神经网络的权重。

神经网络的输入是检测触摸的“天线”。较高的数值表示非常接近,0表示不接触。

输出是两个“轮子”。如果两个轮子都向前,这个人也向前。如果轮子方向相反,他就会转向。输出的强度决定了车轮转动的速度。

生成了一个简单的迷宫。这真的很简单,甚至很愚蠢。屏幕下方是起点,上方是球门,中间有四面墙。每面墙都有一个随机的空间,所以总是有一条路。

一开始我只是随机挑选一些人(我认为他们是bug)。只要有一个人达到了目标,或者达到了时间限制,就会计算适合度。它与当时到目标的距离成反比。

然后我把它们配对,“培育”它们来创造下一代。被选择繁殖的概率与它的适应性成正比。有时,这意味着如果一个人具有非常高的相对适应性,就会与自己反复繁殖。

I thought they would develop a "left wall hugging" behavior, but they always seemed to follow something less optimal. In every experiment, the bugs converged to a spiral pattern. They would spiral outward until they touched a wall to the right. They'd follow that, then when they got to the gap, they'd spiral down (away from the gap) and around. They would make a 270 degree turn to the left, then usually enter the gap. This would get them through a majority of the walls, and often to the goal.

我添加的一个功能是在基因中放入一个颜色矢量来跟踪个体之间的相关性。几代之后,它们的颜色都是一样的,这说明我应该有更好的繁殖策略。

我试着让他们制定更好的策略。我把神经网络复杂化了——增加了记忆和其他东西。这没有用。我总是看到同样的策略。

我尝试了各种方法,比如建立单独的基因库,在100代之后才重新组合。但没有什么能促使他们采取更好的策略。也许这是不可能的。

另一个有趣的事情是绘制适应度随时间变化的图表。有明确的模式,比如最大适合度在上升之前会下降。我从未见过一本进化论的书谈到这种可能性。

In 2007-9 I developed some software for reading datamatrix patterns. Often these patterns were difficult to read, being indented into scratched surfaces with all kinds of reflectance properties, fuzzy chemically etched markings and so on. I used a GA to fine tune various parameters of the vision algorithms to give the best results on a database of 300 images having known properties. Parameters were things like downsampling resolution, RANSAC parameters, amount of erosion and dilation, low pass filtering radius, and a few others. Running the optimisation over several days this produced results which were about 20% better than naive values on a test set of images unseen during the optimisation phase.

这个系统完全是从零开始编写的,我没有使用任何其他库。我并不反对使用这些东西,只要它们能提供可靠的结果,但是您必须注意许可兼容性和代码可移植性问题。