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

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

问题:

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

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


当前回答

几周前,我提出了一个关于SO的解决方案,使用遗传算法来解决图布局的问题。这是一个约束优化问题的例子。

同样在机器学习领域,我用c/c++从头开始实现了一个基于ga的分类规则框架。 我还在一个示例项目中使用了GA来训练人工神经网络(ANN),而不是使用著名的反向传播算法。

此外,作为我研究生研究的一部分,我已经使用GA来训练隐马尔可夫模型,作为基于em的Baum-Welch算法的额外方法(还是在c/c++中)。

其他回答

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.

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

除了一些常见的问题,如《旅行推销员》和Roger Alsing的《蒙娜丽莎》程序的变体,我还编写了一个进化数独求解器(这需要我自己更多的原创想法,而不仅仅是重新实现别人的想法)。解决数独游戏有更可靠的算法,但进化方法效果相当好。

在过去的几天里,在Reddit上看到这篇文章后,我一直在玩一个进化程序来寻找扑克的“冷牌”。目前还不太令人满意,但我想我可以改进。

我有自己的进化算法框架。

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

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

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

我做了一些生活在这个小世界里的小动物。他们有一个神经网络大脑,从世界上接收一些输入,输出是其他行动的运动矢量。他们的大脑就是基因。

该项目从随机的动物群体开始,它们的大脑是随机的。输入和输出神经元是静止的,但中间的神经元不是。

环境中有食物和危险。食物可以增加能量,当你有足够的能量时,你就可以交配了。危险会降低能量,如果能量为0,他们就会死亡。

最终,这些生物进化到可以在世界各地移动,寻找食物和躲避危险。

于是我决定做一个小实验。我给这个生物的大脑一个输出神经元叫做“嘴”,一个输入神经元叫做“耳朵”。重新开始,惊讶地发现它们进化到最大化空间,每个生物都呆在各自的部分(食物是随机放置的)。他们学会了相互合作,不妨碍彼此。凡事总有例外。

然后我尝试了一些有趣的事情。死去的生物将成为食物。猜猜发生了什么事!进化出了两种生物,一种是成群攻击,另一种是高度回避。

那么这里的教训是什么呢?沟通意味着合作。一旦你引入了一个元素,即伤害他人意味着你获得了一些东西,那么合作就会被破坏。

我想知道这对自由市场和资本主义体系有何影响。我的意思是,如果企业可以伤害他们的竞争并侥幸逃脱,那么很明显,他们会尽其所能来伤害竞争。

编辑:

我用c++写的,没有使用框架。我自己写了神经网络和GA代码。埃里克,谢谢你这么说。人们通常不相信GA的力量(尽管其局限性很明显),直到他们玩过它。GA很简单,但不过分简单化。

对于怀疑者来说,神经网络已经被证明能够模拟任何功能,只要它们有不止一层。遗传算法是一种非常简单的方法,可以在解空间中找到局部和全局最小值。将遗传算法与神经网络结合起来,你就有了一个很好的方法来寻找函数,为一般问题找到近似解。因为我们使用的是神经网络,所以我们是针对某些输入优化函数,而不是像其他人使用遗传算法那样对某个函数的某些输入进行优化

下面是生存示例的演示代码:http://www.mempko.com/darcs/neural/demos/eaters/ 建立产品说明:

安装darcs, libboost, liballegro, gcc, cmake, make Darcs克隆——懒惰http://www.mempko.com/darcs/neural/ cd神经 cmake。 使 cd演示/吃 吃。/