Question

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

Was it helpful?

Solution

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.

OTHER TIPS

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 :-)

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.

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?).

I was wondering what mutations one could have inside of a program

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:

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top