Author Topic: Evolving program  (Read 6177 times)

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« 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)


"problems I see
        1.) every prog wil be* large"

---edit---
I capitalized all my I's for Numsgil
« Last Edit: February 02, 2010, 12:10:11 PM by triclops200 »
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evolving program
« Reply #1 on: February 02, 2010, 05:51:30 PM »
I think what you want is CIL.  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).

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Evolving program
« Reply #2 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.

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« Reply #3 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
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evolving program
« Reply #4 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.

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« Reply #5 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.
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evolving program
« Reply #6 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.

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« Reply #7 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.
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Evolving program
« Reply #8 on: February 03, 2010, 01:55:10 PM »
You might find this interesting :
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.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evolving program
« Reply #9 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.

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« Reply #10 on: February 04, 2010, 12:25:46 AM »
yes it probably would be.
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Evolving program
« Reply #11 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.

Offline triclops200

  • Bot Neophyte
  • *
  • Posts: 32
    • View Profile
Evolving program
« Reply #12 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.
I divided by zero and, guess what? The only thing I found out from it is that dividing by zero doesn't work... You are sitting there 9 hours older and thourougly depressed by the amount of work you had to do to finally convince yourself of that.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Evolving program
« Reply #13 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.

Offline Houshalter

  • Bot Destroyer
  • ***
  • Posts: 312
    • View Profile
Evolving program
« Reply #14 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.