什么是遗传算法/遗传编程解决方案的好例子? [英] What are good examples of genetic algorithms/genetic programming solutions?

查看:229
本文介绍了什么是遗传算法/遗传编程解决方案的好例子?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

遗传算法(GA)和的遗传编程(GP)是有趣的研究领域。

Genetic algorithms (GA) and genetic programming (GP) are interesting areas of research.

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

I'd like to know about specific problems you have solved using GA/GP and what libraries/frameworks you used if you didn't roll your own.

问题:

  • 有什么问题你用过GA / GP解决?
  • 在库/框架,你用什么?

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

I'm looking for first-hand experiences, so please do not answer unless you have that.

推荐答案

我提出,生活在这个小小的世界里一个小动物。他们有得到某种程度的投入来自世界神经网络的大脑和产量除其它动作的运动矢量。他们的大脑是在基因。

I made a little critters that lived in this little world. They had a neural network brain which received some inputs from the world and the output was a vector for movement among other actions. Their brains were the "genes".

该计划始于一个随机人群的小动物随机脑筋。输入和输出神经元是静态的,但什么是介于两者之间并没有。

The program started with a random population of critters with random brains. The inputs and output neurons were static but what was in between was not.

该环境中包含的食品和危险。食品增加能量,当你有足够的能量,你可以交配。的危险会减少能量,如果能量为0,他们死了。

The environment contained food and dangers. Food increased energy and when you have enough energy, you can mate. The dangers would reduce energy and if energy was 0, they died.

最终的生物进化到移动世界各地,寻找食物和躲避危险。

Eventually the creatures evolved to move around the world and find food and avoid the dangers.

然后,我决定做一个小实验。我给了生物大脑的输出神经元称为大嘴和输入的神经元被称为耳。开始了,惊讶地发现,他们进化到最大限度的空间,每个相应的生物会留在各自的部分(食品放在随机)。他们学会了互相合作,并没有得到每个人的方式。总是有例外。

I then decided to do a little experiment. I gave the creature brains an output neuron called "mouth" and an input neuron called "ear". Started over and was surprised to find that they evolved to maximize the space and each respective creature would stay in its respective part (food was placed randomly). They learned to cooperate with each other and not get in each others way. There were always the exceptions.

然后我尝试一些有趣的事情。我死的动物会成为食物。试着猜猜发生了什么事!两种类型的生物进化,那些攻击像群,以及那些有高回避。

Then i tried something interesting. I dead creatures would become food. Try to guess what happened! Two types of creatures evolved, ones that attacked like in swarms, and ones that were high avoidance.

那么,什么是教训吗?通讯方式的合作。只要你介绍一个元素伤害的地方又意味着你有所收获,那么合作被破坏。

So what is the lesson here? Communication means cooperation. As soon as you introduce an element where hurting another means you gain something, then cooperation is destroyed.

我想知道这反映了自由市场和资本主义制度。我的意思是,如果企业能伤害他们的竞争和逃脱它,然后它明确表示,他们将尽一切力量伤害竞争。

I wonder how this reflects on the system of free markets and capitalism. I mean, if businesses can hurt their competition and get away with it, then its clear they will do everything in their power to hurt the competition.

编辑:

我用C写++不使用框架。写我自己的神经网络和GA code。埃里克,谢谢你这么说是有道理的。人们通常不相信GA的权力(虽然局限性是显而易见的),直到他们用它播放。 GA很简单,但并不简单。

I wrote it in C++ using no frameworks. Wrote my own neural net and GA code. Eric, thank you for saying it is plausible. People usually don't believe in the powers of GA (although the limitations are obvious) until they played with it. GA is simple but not simplistic.

有关的怀疑,神经网络已被证明能够模拟任何功能,如果他们有一个以上的层。 GA是pretty的简单的方式来浏览解空间寻找局部和潜在的全球最低。结合遗传算法与神经网络,你必须找到找到一般问题的近似解函数pretty的好方法。因为我们使用的神经网络,那么我们优化功能,对一些投入,而不是一些输入函数,如别人都在用GA

For the doubters, neural nets have been proven to be able to simulate any function if they have more than one layer. GA is a pretty simple way to navigate a solution space finding local and potentially global minimum. Combine GA with neural nets and you have a pretty good way to find functions that find approximate solutions for generic problems. Because we are using neural nets, then we are optimizing the function for some inputs, not some inputs to a function as others are using GA

下面是演示code生存例如:<一href="http://www.mempko.com/darcs/neural/demos/eaters/">http://www.mempko.com/darcs/neural/demos/eaters/ 构建指令:

Here is the demo code for the survival example: http://www.mempko.com/darcs/neural/demos/eaters/ Build instructions:

  • 在安装的darcs,libboost,liballegro,海湾合作委员会,cmake的,请
  • 的darcs克隆--lazy http://www.mempko.com/darcs/neural/
  • CD神经
  • cmake的。
  • CD演示/食客
  • ./食
  • Install darcs, libboost, liballegro, gcc, cmake, make
  • darcs clone --lazy http://www.mempko.com/darcs/neural/
  • cd neural
  • cmake .
  • make
  • cd demos/eaters
  • ./eaters

这篇关于什么是遗传算法/遗传编程解决方案的好例子?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆