Question to computer scientists

Cpt_pineapple
atheist
Cpt_pineapple's picture
Posts: 5487
Joined: 2007-04-12
User is offlineOffline
Question to computer scientists

Can a computer program 'evolve' on it's own?

 

Such that it can add new coding from old coding? I guess, 'mesh' together old coding to form new? Either in practice or principal?

 


Aqua_Seal
Posts: 42
Joined: 2008-04-08
User is offlineOffline
I'm pretty sure the answer is yes

But the program would have to have some sort of code-creating seed.  Considering that cells have a sort of "programming" that tells them what to do, it's not a huge stretch to imagine evolving programs.


inspectormustard
atheist
inspectormustard's picture
Posts: 537
Joined: 2006-11-21
User is offlineOffline
The answer is

The answer is yes, as long as it's set up to do so (either inadvertently or on purpose).

Essentially how it works (in the purposeful sense) is you build two layers, a virtual machine and an interpreter. Ideally one would want to establish some kind of goal, like "find an algorithm whose output matches this function curve." The program can then either start with a completely random set of instructions or, if you have some idea of a starting place, one of more programs to begin with.

The interpreter then interprets the pseudo code for the virtual machine and assigns a fitness value to it based on its similarity to the desired result. If there are several samples, it continues until there are no more samples left. The program then compares the samples, recombines them, and mutates them randomly to some small degree (0.001% mutation is common). It then repeats this process until it reaches a previously set fitness level or is told to stop.


EXC
atheist
EXC's picture
Posts: 3141
Joined: 2008-01-17
User is offlineOffline
I'd say yes. But the thing

I'd say yes. But the thing is things must be set up that way. An interesting topic to discuss would be "design by evolution" where you don't want to actually design something but instead, you let the computer run a bunch of simulation to find the best design of something.

I saw once where engineers wanted to design a robotic fish that could swim very efficiently. To design an optimal machine to do such a task is nearly impossible(to many variables and complex equations for the human mind to process). The best way to design is to input the parameters to the computer and let it use trail and error/survival of the fittest to find the most optimal design. You run thousands of simulations, eliminating the failures till you get something optimal. So it has no 'designer' it kind of mimics what evolution has done in the real world.

“Religion is regarded by the common people as true, by the wise as false, and by the rulers as useful.” Seneca


HisWillness
atheistRational VIP!
HisWillness's picture
Posts: 4100
Joined: 2008-02-21
User is offlineOffline
 There's actually a branch

 There's actually a branch of computer science called evolutionary computing. I played with it myself during my fascination-with-artificial-intelligence phase. I suppose I could recommend some books if you're really interested.

http://en.wikipedia.org/wiki/Evolutionary_computation

Saint Will: no gyration without funkstification.
fabulae! nil satis firmi video quam ob rem accipere hunc mi expediat metum. - Terence


HisWillness
atheistRational VIP!
HisWillness's picture
Posts: 4100
Joined: 2008-02-21
User is offlineOffline
EXC wrote:An interesting

EXC wrote:
An interesting topic to discuss would be "design by evolution" where you don't want to actually design something but instead, you let the computer run a bunch of simulation[s] to find the best design of something.

That would be design by genetic algorithm. NASA's evolvable systems group has made some antennas that way:

http://ti.arc.nasa.gov/projects/esg/research/antenna.htm

... that's not quite the same as self-modifying code, but it's still incredible.

Saint Will: no gyration without funkstification.
fabulae! nil satis firmi video quam ob rem accipere hunc mi expediat metum. - Terence


systemlord
Posts: 3
Joined: 2008-06-19
User is offlineOffline
yes indeed

Hi this is my first posts on this site. I didn't realy want to make it about computers , but since i am a computer freak i can' t this without answering.

 

inspectormustard has given the most correct answer (keeping in mind that you could also let ur program recompile it instaid of using an interpreter but that would be going to much into detail).

 

Anyway i made this program (ok it doesnt generate it's own code). But to me it proves the concept of natural selection(evolution).

 

The program goes as follows:

 

You start with a number of cells that can reproduce, when they gather enough materials to do so. When a cell reproduces it will create

a copy of itself just like in nature.  But just as in nature there is a rondam factor of this cell that can give it a slight difference in his genetic code

(in my case speed, range of seeking materials, and some other factors,...).

 

If u run this simulation you will see that ONLY THE STRONGER (faster ones or the ones or with a bigger range,...) will survive.

ALLMOST NEVER is there an original cell left after simulation.

 

But not always the fastes one wins,  depending on what random variable is changing more rapidly (for good or for worse). The wole group of cells that survives generally tends to be made out of the ones that have the given parameters to survive in the group. Thus depending on the first factor in the generation cycle your finall group will look differently (because the first ones that evolve to a 'better' gentic code establish the competitive enviroment for the generations to come).

 

Anyway i have to go party now Laughing out loud.

 

I would put the source code online but it is written in Dutch so you won't get it anyway. But as you can guess it is just another variation of the algorithm "game of life". Which is used to calculate cellular systems like the weather.

 

It is also the principle behind why when u pull the plug  in the bath tub sometimes the whirpooll turns clockwise and sometimes counterclockwise (depening in a beginning variable state of the water) (DONT BE CONFUSED BY THE SIMPSONS the whater also turns on the equator, they tell it as a joke but for some reason evryone believes the simpsons hahaha)

 

Anyway greetings from Belgium.

 

Great site, great subject,great community.

 

 

 

 


Cpt_pineapple
atheist
Cpt_pineapple's picture
Posts: 5487
Joined: 2007-04-12
User is offlineOffline
inspectormustard wrote:The

inspectormustard wrote:

The answer is yes, as long as it's set up to do so (either inadvertently or on purpose).

Essentially how it works (in the purposeful sense) is you build two layers, a virtual machine and an interpreter. Ideally one would want to establish some kind of goal, like "find an algorithm whose output matches this function curve." The program can then either start with a completely random set of instructions or, if you have some idea of a starting place, one of more programs to begin with.

The interpreter then interprets the pseudo code for the virtual machine and assigns a fitness value to it based on its similarity to the desired result. If there are several samples, it continues until there are no more samples left. The program then compares the samples, recombines them, and mutates them randomly to some small degree (0.001% mutation is common). It then repeats this process until it reaches a previously set fitness level or is told to stop.

 

That sounds cool.

 

Does it need an interpreter? Can you set it up to randomly mutate but keep the codes that make sense and disregard the junk? That is does it have to have a goal?

 

 


JustAnotherBeliever
TheistBronze Member
Posts: 199
Joined: 2008-06-14
User is offlineOffline
I found this recently...

http://www.texai.org/blog/about/texai-project

It supposedly is an AI that will write its own code someday...

and have been tracking the cyc project for a while. It learns by interaction and their trying to get it to learn by itself by taking stuff off the web.

http://en.wikipedia.org/wiki/Cyc

 


systemlord
Posts: 3
Joined: 2008-06-19
User is offlineOffline
here is the program

Ok so to make it clear this is not proof of the evolutionary theory just a 2 day try to implement the basics of the theory in an algorithm.

So don't take it to seriously it was just a lillte project.

 

It's fun to play with the settings and see with happens. Simmulations take up alot of cpu time (poor implementation). But you can swith of the grahics (whitch glitches a bit)  to make it go faster.

 

It's only for windows. Cause it's an .exe file.

 

Here it is..

http://www.mediafire.com/?yjw1jm4y51b

(download, extract zip to new folder, run the exe,)

Hope u like it.


inspectormustard
atheist
inspectormustard's picture
Posts: 537
Joined: 2006-11-21
User is offlineOffline
Cpt_pineapple

Cpt_pineapple wrote:

inspectormustard wrote:

The answer is yes, as long as it's set up to do so (either inadvertently or on purpose).

Essentially how it works (in the purposeful sense) is you build two layers, a virtual machine and an interpreter. Ideally one would want to establish some kind of goal, like "find an algorithm whose output matches this function curve." The program can then either start with a completely random set of instructions or, if you have some idea of a starting place, one of more programs to begin with.

The interpreter then interprets the pseudo code for the virtual machine and assigns a fitness value to it based on its similarity to the desired result. If there are several samples, it continues until there are no more samples left. The program then compares the samples, recombines them, and mutates them randomly to some small degree (0.001% mutation is common). It then repeats this process until it reaches a previously set fitness level or is told to stop.

That sounds cool.

Does it need an interpreter? Can you set it up to randomly mutate but keep the codes that make sense and disregard the junk? That is does it have to have a goal?

Here the difference between an interpreter and a complier gets a little fuzzy. A compiler translates higher level code (such as the genes for a genetic algorithm) into machine code, and typically does some optimisation along the way. An interpreter executes various functions within its own code depending on what is written. Some languages actually run faster when they're interpreted when the code that's being executed is shoddy. Hence, I would use an interpreter in most cases.

With evolutionary systems it's hard to tell what is good and what isn't. Some bits might seem good at that instance, but might hold back the solution later. Compare to the nautilus's pinhole-camera eye. It's an awesome eye, but it's gone as far as it can go.

Goal setting is the really hard part about writing these things, besides knowing what system of genes to use. A goal should be specific and quantifiable. You have to know the question really well before you set a heuristic system like this to find a solution. Otherwise the thing will run on forever, never getting any closer to it.

systemlord wrote:

Ok so to make it clear this is not proof of the evolutionary theory just a 2 day try to implement the basics of the theory in an algorithm.

So don't take it to seriously it was just a lillte project.

 

It's fun to play with the settings and see with happens. Simmulations take up alot of cpu time (poor implementation). But you can swith of the grahics (whitch glitches a bit)  to make it go faster.

 

It's only for windows. Cause it's an .exe file.

 

Here it is..

http://www.mediafire.com/?yjw1jm4y51b

(download, extract zip to new folder, run the exe,)

Hope u like it.

Seems to be pretty well written. Try setting it up with obstacles so that they have to search for food.


systemlord
Posts: 3
Joined: 2008-06-19
User is offlineOffline
actualy there is a bit of a goal to this one

This little expirement had a goal.

 

My intend was to find out if in a stable system evolution would be necassary. Since generation of food is a regular interval.

I havent realy checked it out yet because i need to amplify the program to record several runs and compare them, but right now i am to buissy on some other projects to work any further on this one.

 

I have read about Cync before. One thing i think is very bad about the system is the manual addition of knowledge to the system. Although when it reaches a certain level of knoledge Cync could be linked to a learing system and it would be even better since it begins with a humanly inputted core.

 

Interesting stuff...


Vermilion
Vermilion's picture
Posts: 66
Joined: 2007-05-22
User is offlineOffline
I would say no.Having done

I would say no.

Having done some programming, and having a good understanding of computers... the computer doesn't do anything it's not told to do.

Now, you could write a program that tries to 'evolve' itself, but really you have written out the path by which to do this, so you are really just running a simulation or test of the path you already laid out for the computer. In no way can a computer program improve itself in a way that generates new information that wouldn't be predictable, and therefore just following the plan.

Of course there are "random" variables you can use, but still, you are just telling the computer to pick a number, and do what you want it to based on the number that is selected... I wouldn't call this evolution.

Although this all depends on your definition of 'evolve'. Just keep in mind, a computer will never gain it's own consciousness and start killing people like the movies show... although it may follow a program written by someone to do this.

 


inspectormustard
atheist
inspectormustard's picture
Posts: 537
Joined: 2006-11-21
User is offlineOffline
Vermilion wrote:I would say

Vermilion wrote:

I would say no.

Having done some programming, and having a good understanding of computers... the computer doesn't do anything it's not told to do.

Now, you could write a program that tries to 'evolve' itself, but really you have written out the path by which to do this, so you are really just running a simulation or test of the path you already laid out for the computer. In no way can a computer program improve itself in a way that generates new information that wouldn't be predictable, and therefore just following the plan.

Of course there are "random" variables you can use, but still, you are just telling the computer to pick a number, and do what you want it to based on the number that is selected... I wouldn't call this evolution.

Although this all depends on your definition of 'evolve'. Just keep in mind, a computer will never gain it's own consciousness and start killing people like the movies show... although it may follow a program written by someone to do this.

While I agree with you that computers don't do anything they're not told to do, I disagree with your second point. It is not uncommon for evolutionary systems to exploit oversights in solving the problems they set out to solve.

For example: An artificial intelligence group created a program which evolves neural networks in an environment. Each creature was born with a certain amount of energy, and either had to eat "plants" which appear randomly or eat other creatures. After several generations, one "species" of creature remained huddled together doing nothing but eating each other and mating. Apparently, evolution had driven this particular group of creatures to realize that they could either move around and find food or mate and eat the free energy that came out of it. It took the group a day or so to realize that this oversight is what caused the breed.

I can't stress enough the power of this method of problem solving. One does not need to know the path in order to find the solution, only the criteria that the solution must meet, but again it must be set up to evolve.

Here is a video of a program someone wrote, after it has crossed the 500 generation mark. Predators are blue, prey are pink. Notice that the "prey" has evolved to flee from the predators, and the predators have evolved to chase after them. Some prey simply waits (possibly conserving energy) until a predator comes along and scares it away.

Here is a video of the same program at an earlier stage (pink are predators this time). Notice that the prey doesn't care much about the predators.


Cpt_pineapple
atheist
Cpt_pineapple's picture
Posts: 5487
Joined: 2007-04-12
User is offlineOffline
Thanks mustard. You seem to

Thanks mustard. You seem to be an expert on this stuff you do this for a living?


inspectormustard
atheist
inspectormustard's picture
Posts: 537
Joined: 2006-11-21
User is offlineOffline
Cpt_pineapple wrote:Thanks

Cpt_pineapple wrote:

Thanks mustard. You seem to be an expert on this stuff you do this for a living?

Yeah. I'm a kind-of consultant right now, but once I finish school who knows. I'd still like to get into game design, but it's a talent-saturated career.