遗传算法(GA)和遗传规划(GP)是一个有趣的研究领域。
我想知道你使用GA/GP解决的具体问题,以及如果你没有自己的库/框架,你使用了什么库/框架。
问题:
你用GA/GP解决过什么问题? 你使用了哪些库/框架?
我在寻找第一手的经验,所以请不要回答,除非你有。
遗传算法(GA)和遗传规划(GP)是一个有趣的研究领域。
我想知道你使用GA/GP解决的具体问题,以及如果你没有自己的库/框架,你使用了什么库/框架。
问题:
你用GA/GP解决过什么问题? 你使用了哪些库/框架?
我在寻找第一手的经验,所以请不要回答,除非你有。
当前回答
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张桌子。评估功能是基于让人们和他们的约会对象在一起,把有共同点的人放在一起,把观点完全相反的人放在不同的桌子上。
我运行了几次。每次我都有九张好桌子,还有一张都是怪球。最后,我妻子安排了座位。
我的旅行推销员优化器使用了一种新的染色体到行程的映射,这使得繁殖和变异染色体变得很简单,没有产生无效行程的风险。
更新:因为一些人问了…
以任意但一致的顺序(如按字母顺序排列)的客人(或城市)数组开始。称之为参考溶液。把客人的座位号看作是他/她的座位号。
我们没有尝试直接在染色体中编码这种顺序,而是编码将参考溶液转化为新溶液的指令。具体来说,我们将染色体视为数组中要交换的索引列表。为了解码染色体,我们从参考溶液开始,并应用由染色体指示的所有交换。交换数组中的两个条目总是会得到一个有效的解决方案:每个来宾(或城市)仍然只出现一次。
因此,染色体可以随机生成,突变,并与其他染色体交叉,总是会产生有效的解决方案。
几周前,我提出了一个关于SO的解决方案,使用遗传算法来解决图布局的问题。这是一个约束优化问题的例子。
同样在机器学习领域,我用c/c++从头开始实现了一个基于ga的分类规则框架。 我还在一个示例项目中使用了GA来训练人工神经网络(ANN),而不是使用著名的反向传播算法。
此外,作为我研究生研究的一部分,我已经使用GA来训练隐马尔可夫模型,作为基于em的Baum-Welch算法的额外方法(还是在c/c++中)。
As part of my undergraduate CompSci degree, we were assigned the problem of finding optimal jvm flags for the Jikes research virtual machine. This was evaluated using the Dicappo benchmark suite which returns a time to the console. I wrote a distributed gentic alogirthm that switched these flags to improve the runtime of the benchmark suite, although it took days to run to compensate for hardware jitter affecting the results. The only problem was I didn't properly learn about the compiler theory (which was the intent of the assignment).
我本可以用现有的默认标志来播种初始种群,但有趣的是,算法发现了一个与O3优化级别非常相似的配置(但实际上在许多测试中更快)。
编辑:我还用Python写了我自己的遗传算法框架,只是使用popen命令来运行各种基准测试,尽管如果不是评估作业,我会看看pyEvolve。
我曾经尝试制作一个围棋电脑播放器,完全基于基因编程。每个程序都将被视为一系列动作的评估函数。即使是在一个相当小的3x4板上,制作的程序也不是很好。
我使用Perl,并自己编写了所有代码。我今天会做不同的事情。
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.
这个系统完全是从零开始编写的,我没有使用任何其他库。我并不反对使用这些东西,只要它们能提供可靠的结果,但是您必须注意许可兼容性和代码可移植性问题。