遗传算法(GA)和遗传规划(GP)是一个有趣的研究领域。
我想知道你使用GA/GP解决的具体问题,以及如果你没有自己的库/框架,你使用了什么库/框架。
问题:
你用GA/GP解决过什么问题? 你使用了哪些库/框架?
我在寻找第一手的经验,所以请不要回答,除非你有。
遗传算法(GA)和遗传规划(GP)是一个有趣的研究领域。
我想知道你使用GA/GP解决的具体问题,以及如果你没有自己的库/框架,你使用了什么库/框架。
问题:
你用GA/GP解决过什么问题? 你使用了哪些库/框架?
我在寻找第一手的经验,所以请不要回答,除非你有。
当前回答
首先,Jonathan Koza的《遗传编程》(在亚马逊上)几乎是一本关于遗传和进化算法/编程技术的书,有很多例子。我强烈建议你去看看。
As for my own use of a genetic algorithm, I used a (home grown) genetic algorithm to evolve a swarm algorithm for an object collection/destruction scenario (practical purpose could have been clearing a minefield). Here is a link to the paper. The most interesting part of what I did was the multi-staged fitness function, which was a necessity since the simple fitness functions did not provide enough information for the genetic algorithm to sufficiently differentiate between members of the population.
其他回答
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.
这个系统完全是从零开始编写的,我没有使用任何其他库。我并不反对使用这些东西,只要它们能提供可靠的结果,但是您必须注意许可兼容性和代码可移植性问题。
我和一个同事正在研究一种解决方案,使用我们公司要求的各种标准将货物装载到卡车上。我一直在研究遗传算法的解决方案,而他正在使用具有激进修剪的分支和绑定。我们仍在实施这个解决方案的过程中,但到目前为止,我们已经取得了良好的结果。
There was an competition on codechef.com (great site by the way, monthly programming competitions) where one was supposed to solve an unsolveable sudoku (one should come as close as possible with as few wrong collumns/rows/etc as possible).What I would do, was to first generate a perfect sudoku and then override the fields, that have been given. From this pretty good basis on I used genetic programming to improve my solution.I couldn't think of a deterministic approach in this case, because the sudoku was 300x300 and search would've taken too long.
我是一个研究使用进化计算(EC)来自动修复现有程序中的错误的团队的成员。我们已经在现实世界的软件项目中成功地修复了一些真实的错误(参见本项目的主页)。
这种EC修复技术有两种应用。
The first (code and reproduction information available through the project page) evolves the abstract syntax trees parsed from existing C programs and is implemented in Ocaml using our own custom EC engine. The second (code and reproduction information available through the project page), my personal contribution to the project, evolves the x86 assembly or Java byte code compiled from programs written in a number of programming languages. This application is implemented in Clojure and also uses its own custom built EC engine.
进化计算的一个优点是技术的简单性,使得编写自己的自定义实现不太困难。有关遗传规划的一个很好的免费的介绍性文本,请参阅遗传规划的现场指南。
我做了一些生活在这个小世界里的小动物。他们有一个神经网络大脑,从世界上接收一些输入,输出是其他行动的运动矢量。他们的大脑就是基因。
该项目从随机的动物群体开始,它们的大脑是随机的。输入和输出神经元是静止的,但中间的神经元不是。
环境中有食物和危险。食物可以增加能量,当你有足够的能量时,你就可以交配了。危险会降低能量,如果能量为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演示/吃 吃。/