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

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

问题:

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

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


当前回答

我几周前做了这个有趣的小玩意。它生成有趣的互联网图像使用GA。有点傻,但很好笑。

http://www.twitterandom.info/GAFunny/

对此有一些见解。它是一些mysql表。一个用于图像列表及其评分(即适合度),另一个用于子图像及其在页面上的位置。

子图像可以有几个细节,但不是全部实现:+大小,倾斜,旋转,+位置,+image_url。

当人们投票决定这张照片有多有趣时,它或多或少会流传到下一代。如果它存活下来,它会产生5-10个带有轻微突变的后代。目前还没有交叉。

其他回答

当你打算粉刷你的房子时,通常很难得到一个确切的颜色组合。通常,你脑海中有一些颜色,但它不是其中一种颜色,供应商向你展示。

昨天,我的GA研究员教授提到了一个发生在德国的真实故事(对不起,我没有更多的参考资料,是的,如果有人要求我可以找到它)。这个家伙(让我们称他为配色员)曾经挨家挨户地帮助人们找到确切的颜色代码(RGB),这将是客户心目中的衣柜。下面是他的做法:

The color guy used to carry with him a software program which used GA. He used to start with 4 different colors- each coded as a coded Chromosome (whose decoded value would be a RGB value). The consumer picks 1 of the 4 colors (Which is the closest to which he/she has in mind). The program would then assign the maximum fitness to that individual and move onto the next generation using mutation/crossover. The above steps would be repeated till the consumer had found the exact color and then color guy used to tell him the RGB combination!

通过将最大适应度分配给接近消费者想法的颜色,配色员的程序增加了收敛到消费者想法的颜色的机会。我发现它很有趣!

现在我已经得到了一个-1,如果你计划更多的-1,请说明这样做的原因!

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.

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

在我的本科论文中,我使用遗传编程来开发用于空中搜索和救援的合作搜索策略。我使用一个名为NetLogo(基于StarLogo)的开源代理建模平台作为世界模型。NetLogo是用java写的,因此提供了java api -所以GP框架需要基于java -我使用的一个叫做JGAP,还有另一个开源GP框架在java中,我知道叫做ECJ。

模拟运行起来非常慢(我认为这是由于NetLogo模型),所以我的功能/终端集非常有限,限制了搜索空间。尽管如此,我还是想出了一些很好的解决办法。如果你有这种冲动,你可以在我的论文http://www.cse.unsw.edu.au/~ekjo014/z3157867_Thesis.pdf的第三章读到

进化计算研究生班: 开发了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.

我使用遗传算法(以及一些相关技术)来确定风险管理系统的最佳设置,该系统试图阻止淘金者使用偷来的信用卡来购买mmo游戏。该系统将接收数千笔具有“已知”值的交易(欺诈与否),并找出最佳设置组合,以正确识别欺诈交易,而不会产生太多误报。

We had data on several dozen (boolean) characteristics of a transaction, each of which was given a value and totalled up. If the total was higher than a threshold, the transaction was fraud. The GA would create a large number of random sets of values, evaluate them against a corpus of known data, select the ones that scored the best (on both fraud detection and limiting the number of false positives), then cross breed the best few from each generation to produce a new generation of candidates. After a certain number of generations the best scoring set of values was deemed the winner.

创建用于测试的已知数据语料库是该系统的阿喀琉斯之踵。如果你等待退款,你在试图回应欺诈者时就会落后几个月,所以有人必须手动审查大量交易,以建立数据库,而不必等待太长时间。

这最终确定了绝大多数的欺诈行为,但在最容易欺诈的项目上,这一比例无法低于1%(考虑到90%的交易可能是欺诈,这已经相当不错了)。

我用perl完成了所有这些。在一个相当旧的linux机器上运行一次软件需要1-2个小时(20分钟通过WAN链路加载数据,其余时间用于处理)。任何给定代的大小都受到可用RAM的限制。我会一遍又一遍地运行它,稍微改变参数,寻找一个特别好的结果集。

总而言之,它避免了手动调整数十个欺诈指标的相对值所带来的一些失误,并且始终能够提出比我手动创建的更好的解决方案。AFAIK,它仍然在使用(大约3年后我写了它)。