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

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

问题:

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

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


当前回答

我为我的公司在1992年为货运业开发的3D激光表面轮廓系统开发了一个家庭酿造GA。 该系统依赖于三维三角测量,并使用了定制的激光线扫描仪,512x512相机(具有定制的捕获hw)。相机和激光之间的距离永远不会是精确的,相机的焦点也不会在你期望的256,256的位置找到!

尝试使用标准几何和模拟退火式方程求解来计算校准参数是一场噩梦。

遗传算法在一个晚上就完成了,我创建了一个校准立方体来测试它。我知道立方体的精度很高,因此我的想法是,我的遗传算法可以为每个扫描单元进化一组自定义三角测量参数,以克服生产变化。

这招很管用。退一步说,我简直目瞪口呆!在大约10代的时间里,我的“虚拟”立方体(由原始扫描生成并根据校准参数重新创建)实际上看起来像一个立方体!经过大约50代之后,我得到了我需要的校准。

其他回答

首先,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.

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.

在我的婚宴上,我使用GA来优化座位分配。80位客人超过10张桌子。评估功能是基于让人们和他们的约会对象在一起,把有共同点的人放在一起,把观点完全相反的人放在不同的桌子上。

我运行了几次。每次我都有九张好桌子,还有一张都是怪球。最后,我妻子安排了座位。

我的旅行推销员优化器使用了一种新的染色体到行程的映射,这使得繁殖和变异染色体变得很简单,没有产生无效行程的风险。

更新:因为一些人问了…

以任意但一致的顺序(如按字母顺序排列)的客人(或城市)数组开始。称之为参考溶液。把客人的座位号看作是他/她的座位号。

我们没有尝试直接在染色体中编码这种顺序,而是编码将参考溶液转化为新溶液的指令。具体来说,我们将染色体视为数组中要交换的索引列表。为了解码染色体,我们从参考溶液开始,并应用由染色体指示的所有交换。交换数组中的两个条目总是会得到一个有效的解决方案:每个来宾(或城市)仍然只出现一次。

因此,染色体可以随机生成,突变,并与其他染色体交叉,总是会产生有效的解决方案。

进化计算研究生班: 开发了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年后我写了它)。