将达尔文进化论应用于编程
不久前,我记得读过一篇杂志文章(我相信是在《连线》杂志上),内容是关于将达尔文进化论应用到程序中以创建更好的程序。本质上,一个程序会产生多个突变,并且表现最好的一个将被选择用于下一轮突变。
不幸的是,我无法让这个主题听起来像文章中听起来那么有趣,但我找不到这篇文章。
因为这对我来说听起来是最酷的事情,所以我想知道程序内部可能有哪些突变
A while back I recall reading a magazine article (in Wired I believe) about applying Darwinian evolution to programs to create better programs. Essentially multiple mutations of a program would be spawned, and the one that performed the best would be selected for the next round of mutations.
Unforunately I can't make the subject sound nearly as interesting as is sounded in the article, but I can't find the article.
Since this sounds like just the coolest thing ever to me, I was wondering what mutations one could have inside of a program
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
是的。它被称为遗传编程,其中一个主程序可以自己编写程序。它编写的程序可以进化到一定的标准。
例如8皇后可以通过GP解决。
Yes. It is called Genetic Programming, where a master program that writes programs itself. And the programs it writes can evolve to a certain criterion.
E.g. 8 queen could be solved by GP.
我认为您指的是遗传算法。我想在我的论文中研究这个主题。我无法停止阅读它:-)
I think you're referring to Genetic Algorithms. I want to work on this topic for my dissertation. I can't stop reading about it :-)
找到了这篇文章/论文 - 这是您所指的吗?还发现此 PDF。相当有趣的主题
听起来像是您可以使用自我修改代码来基于自我监控优化来重现程序本身。目前这将指向解释语言程序。
Found this article/paper - is this what you're referring to?. Also found this PDF. Quite an interesting topic
What it sounds like is that you could use self-modifying code that reproduces the program itself based on self-monitoring optimizations. This would currently point at interpreted-language programs.
前几天我读了一篇关于编码恐怖的文章,内容与此类似:走那条路,真的很快。基本上,我从中得到的想法是软件应该不断改进,这意味着不断推出新版本/版本。这似乎符合进化的理念,因为你的软件总是会改进成更好的东西。
I read an article on Coding Horror about something like that the other day: Go That Way, Really Fast. Basically, the idea I got from it was that software should constantly be improved which means constantly pushing out new versions/releases. This seems to match the idea of evolution in that your software is always improving into something better.
正如之前所说,它被称为遗传编程(GP)。
有趣的是,GP 是一种系统的、领域无关的方法,用于让计算机从需要做什么的高级声明开始自动解决问题。
GP 利用自然进化的思想,从一组随机计算机程序开始,通过突变和交叉(重组)过程逐步完善它们,直到出现解决方案。
所有这一切,用户无需提前知道或指定解决方案的形式或结构。
GP 已经产生了大量与人类竞争的结果和应用,包括新颖的科学发现和可专利的发明(另请参阅遗传算法/遗传编程解决方案的好例子是什么?< /a>)。
有许多遗传运算符(不仅仅是突变)和许多实现。它们需要具备的基本特性是封闭性(它们必须保持遗传程序的结构完整性)。
一般来说,突变用从一组可用符号中选择的兼容终端/函数替换程序的符号。交叉算子混合两个或多个节目的信息。
可能对该主题最好的免费介绍是 遗传编程实地指南
一些不错的内容链接是:
As said before it's called Genetic Programming (GP).
The interesting thing is that GP is a systematic, domain-independent method for getting computers to solve problems automatically starting from a high-level statement of what needs to be done.
Using ideas from natural evolution, GP starts from a population of random computer programs and progressively refines them through processes of mutation and crossover (recombination), until solutions emerge.
All this without the user having to know or specify the form or structure of solutions in advance.
GP has generated a plethora of human-competitive results and applications, including novel scientific discoveries and patentable inventions (see also What are good examples of genetic algorithms/genetic programming solutions?).
There are many genetic operators (not only mutation) and many implementations. The fundamental property they are required to have is closure (they must mantain the structural integrity of the genetic program).
In general mutation replaces a symbol of the program with a compatible terminal / function choosen from a group of available symbols. Crossover operator mixes the information of two or more programs.
Probably the best free introduction to the subject is A Field Guide to Genetic Programming
Some nice links are: