Darwinbots Forum

General => Off Topic => Topic started by: triclops200 on February 02, 2010, 12:01:57 PM

Title: Evolving program
Post by: triclops200 on February 02, 2010, 12:01:57 PM
I am, im c#, trying to make a life-copying program that can build/compile new programs.
I have two different theories on how it will work, limited and less-limited, and I need help to choose which and guidence after that. (and also, if it would even be possible)
(http://i50.tinypic.com/11176ab.jpg)
(http://i45.tinypic.com/2h52vj8.jpg)
"problems I see
        1.) every prog wil be* large"

---edit---
I capitalized all my I's for Numsgil
Title: Evolving program
Post by: Numsgil on February 02, 2010, 05:51:30 PM
I think what you want is CIL (http://en.wikipedia.org/wiki/Common_Intermediate_Language).  It's the stack based assembly language that C# is "compiled" down to before it's JITed client side.

I think you're going to have a hard time evolving the programs if they're supposed to run as client level programs in an OS (eg: windows).
Title: Evolving program
Post by: Houshalter on February 02, 2010, 09:32:31 PM
Oh geez. Is this another debate on trying to get alife to run in assembly. Even if you could get it to work its a bad idea. Creating a evolving self-replicating virus is dangerous  . Although it would be awesome, assuming it wouldn't kill us all or destroy the internet. Honestly, I don't know what your talking about so maybe I should stay out of it.
Title: Evolving program
Post by: triclops200 on February 03, 2010, 12:40:40 AM
I was going to build a newer, simpler assembly launguage which will only start with basic commands such as:
/dec int .A
/dec int .B
/dec int .C
/wr 'hi'
/=.C .A .B +                                  (C=A+B )
/wr .C
/replecate
then on mutate it does:
/dec int .A
/dec int .B
/dec int .C
/wr 'hi'
/=.C .A .B -                             (C=A-B )
/wr .C
/replecate
that's just an example
Title: Evolving program
Post by: Numsgil on February 03, 2010, 12:42:32 AM
What's the ultimate goal?  Or better yet, what's the fitness landscape you're going to be using?  Is it supposed to solve a specific problem (ala Avida) or are you going to be releasing your creations "to the wild" of a raw OS?  That's going to dictate a lot about the language design, or whether you should use something pre-existent, etc.
Title: Evolving program
Post by: triclops200 on February 03, 2010, 09:57:14 AM
I was planning on just letting it go free on a computer nobady needs, maybe my old one. just to see what behaviors would evolve . it was going to have full c# laungauge acess after awhile.
Title: Evolving program
Post by: Numsgil on February 03, 2010, 12:57:32 PM
The thing with that is there isn't anything that can "kill" one of the programs, except if it does something stupid and segfaults.  So once one learns to reproduce you just end up spawning thousands of programs that compete for processing power and memory, but otherwise can't interact in any way (the OS makes sure of that).  So just a heads up that this will probably be less cool than it sounds.

But yeah, I think you'll want to use CIL.  That way you get the benefit of the .NET library, and things are at least sort of sanitized against seg faults and the like.
Title: Evolving program
Post by: triclops200 on February 03, 2010, 01:18:52 PM
see, I dont understand CIL, I was going to handbuild a interpreter and run all progs using one central program. that way I could close one window to kill the whole thing. If I knew how to build a O.S. then I would build interactions. I might do a built in interpreter or even a CIL based program later though.
Title: Evolving program
Post by: Moonfisher on February 03, 2010, 01:55:10 PM
You might find this interesting :
http://www.koth.org/pmars/ (http://www.koth.org/pmars/)

It's called core wars, and it's basicaly assembler code designed to make the oponent processes segfault
The trick is that mem locations are relative to your own position in the code, making small code bits very powerfull.
Title: Evolving program
Post by: Numsgil on February 03, 2010, 04:54:38 PM
Quote from: triclops200
see, I dont understand CIL, I was going to handbuild a interpreter and run all progs using one central program. that way I could close one window to kill the whole thing. If I knew how to build a O.S. then I would build interactions. I might do a built in interpreter or even a CIL based program later though.

Not to state the obvious or anything, but learning CIL would probably be faster than writing your own assembler language and interpreter.
Title: Evolving program
Post by: triclops200 on February 04, 2010, 12:25:46 AM
yes it probably would be.
Title: Evolving program
Post by: Houshalter on February 04, 2010, 10:02:30 AM
What would be the point if the programs couldn't interact with each other. And coudn't they also randomly crash to whole computer.
Title: Evolving program
Post by: triclops200 on February 05, 2010, 01:16:18 PM
maybe, depending on how limeted I make it, and I was going to run it on a closed envioroment.
Title: Evolving program
Post by: Panda on February 07, 2010, 10:11:19 AM
instead of the program evolving, you have a file with it that is mutated, by the program, which tells the program what to do, after it is mutated.
Title: Evolving program
Post by: Houshalter on February 07, 2010, 01:20:34 PM
Quote from: Panda
instead of the program evolving, you have a file with it that is mutated, by the program, which tells the program what to do, after it is mutated.
Or many files, and some of them would have to ability to overwrite other files or create new files if they had the nessacary code. Then you could evolve interesting repair mechanisms and networking behaviors between groups of similiar organisms sharing their resources. Kind of like DB but without all the physics. I don't know if this is what you were originaly planning but i want to do something like this someday.