Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Artificial Life - Tierra like program

Author
Message
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 1st Nov 2003 04:26
Ok, this probably isnt the best place to post so if not please go ahead and delete this or move it to an appropriate place. Anyways, I've recently been reading about artificial life and a particular program called Tierra. In Tierra a program would simply copy itself over and over in memory and each time it copied itself there would be a certain random chance that a part of its code would be corrupted. When the program was run it actually ended up evolving to exploit the "landscape" of the computer.

Im interested in creating my own version of Tierra and was wondering if anyone knew if this could be done in assembly, or would I have to use machine code? Thanks.
Ian T
23
Years of Service
User Offline
Joined: 12th Sep 2002
Location: Around
Posted: 1st Nov 2003 06:43
Tierra was created in C, as it says in the introduction to its documentation .

--Mouse: Famous (Avatarless) Fighting Furball

A very nice %it, indeed.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 1st Nov 2003 08:25
No it wasnt written in C. The latest version may have some kind of wrapper in C, but the libraries it uses are written in assembly or machine code. C by itself doesnt have enough low level capabilities to do something like this. Im just trying to figure out which is needed assembly or machine code.
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 2nd Nov 2003 01:21
asemmbly and machine code are the same thing.

the artist formally known as darkfluff
TKF15H
23
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 2nd Nov 2003 02:24
Quote: "asemmbly and machine code are the same thing."

not really... you have to compile asembly source to run it as machine code.
@Vandetta you could use either asembly or machine code. if you choose to use asembly, you'd have to make a program that writes the code to the hard disk to be compiled by another program to then be executed. If you wish to use machine code directly, you'll probably never finish.
Quote: "C by itself doesnt have enough low level capabilities to do something like this."

not even with the in-line assembler?

Morfy's Law - Enythink thet ken go rong willll.
Cole's Law - Thinly sliced cabbage.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 2nd Nov 2003 03:03
Doesnt an in-line assembler just allow you to write assembly into our C code? In that case you would be using assembly, and C by itself still wouldn't have the capabilities for this.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 2nd Nov 2003 03:04
Quote: "into our C Code"
should read: into your C code.
HZence
23
Years of Service
User Offline
Joined: 9th Mar 2003
Location:
Posted: 2nd Nov 2003 07:10
should use: the edit button

Team EOD :: Programmer/Storyboard Assistant
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 2nd Nov 2003 07:19
Sorry about that, didnt see it until just now.
adsta
23
Years of Service
User Offline
Joined: 5th Feb 2003
Location:
Posted: 2nd Nov 2003 09:17
Hmmm, this is a huge project. To my understanding, Tierra creates a Virtual computer that uses it's own machine code. when the program is running, it changes hex values in the machine code at run time. The virtual computer was created using C, and some other stuff was created using assembly code based on the virtual computer (not your normal assembly code like nasm or gas).
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 2nd Nov 2003 10:06
adsta: I believe you are referring to the Tierra that exists today and not the original tierra. The original was much more simplistic, which is what Im shooting for. At least I have the impression that the original tierra was pretty simple. Anyone want to add any more info?
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 2nd Nov 2003 10:37
Well, I've been reading up on it a little more and it does appear even the original used a virtual computer. But is this needed? Cant I let the little programs run free on a dedicated computer?
TKF15H
23
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 2nd Nov 2003 23:51
well, now that I think about it, these things are looking alot like viruses, except for the fact that they interact, and they don't spam
The main difference is that a virus makes an exact copy while you're looking for a way to make the program mutate. There is something much easier which would probably yeild similar results. The code doesn't change, but values in a big array would. These values would be used by the AI for making decisions. Just a thought...

Morfy's Law - Enythink thet ken go rong willll.
Cole's Law - Thinly sliced cabbage.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 3rd Nov 2003 00:03 Edited at: 3rd Nov 2003 00:04
I would rather have it mutate its actual code though... I want to let them run amuck on a dedicated computer (no connection to the outside world by the way) and see what they develop into. I dont want to have any preprogrammed AI, but rather let each program choose its best strategies by recoding itself through mutation and natural selection.
TKF15H
23
Years of Service
User Offline
Joined: 20th Jul 2003
Location: Rio de Janeiro
Posted: 3rd Nov 2003 00:37
the array method is similar to the way real living things work. They all have similarities (which corresponds to the actual code), and diferences in DNA (which equals the values in the array.) you could make the code create larger, more complex arrays. And preprogrammed AI is escencial. Let's imagine you are a robot. When you where fabricated, you needed a code that decided what information was relevant, thus what should be recorded or not. When a kid is born, he has information in his brain (HardDisk) that was given to it from his parents. Since you're working on the first which in turn will generate others, you will need to give it some information to act on as a base.

Morfy's Law - Enythink thet ken go rong willll.
Cole's Law - Thinly sliced cabbage.
Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 3rd Nov 2003 00:56
I dont think pre programmed AI is essential. Well at least in what is generally thought of as intelligence. The first initial program simply replicates itself and there is a chance that its code will be corrupted. So if that is AI, then I guess there is some preprogrammed AI. Perhaps it would work if I could allow the program to develop larger arrays, but how would that work since its "DNA" is stored in an array and not the actual code?
Algae Man
23
Years of Service
User Offline
Joined: 11th Nov 2002
Location: Canada
Posted: 3rd Nov 2003 19:24
I'll have to agree with Vandetta. Changing the actual code would be much better. If you just changed numbers in an array, you would not get very far. No matter what, you would still be limited by what the original code did, and you would not be able to change that. If you changed the code, then there would be limitless possibilities.

On the subject of 'virtual computers', I think that that's a necessity. If you just let the program run on your computer, it could easily corrupt/delete your operating system. If that happened, of course, you could no longer run the program! You would have to have the program run in a virtual environment so that it could not damage the system.
Inkybro
23
Years of Service
User Offline
Joined: 31st Dec 2002
Location: Where I live :)
Posted: 3rd Nov 2003 20:10
@TKF15H: Wow, your AI mutating thoguht is awesome. It gave me a wonderful idea:

If I ever wanted to make an RTS type game, the AI could mutate nd actually get better in it's "mind". Just an idea, do you think it'd work? If it did, their life length could mutate and their HP could mutate, going up or down.

Vandetta
23
Years of Service
User Offline
Joined: 17th Dec 2002
Location:
Posted: 3rd Nov 2003 22:33 Edited at: 3rd Nov 2003 22:36
Ya, evolutionary programming really fascinates me. In fact there has been experiments to evolve hardware designs. Basically those designs that come close to a goal (i.e. can get the most electricity through a certain point) are allowed to "breed" and creat new designs. Here's the exerpt from an article
Quote: "In one experiment, a chip was evolved that would digitally decode a binary signal sent over a telephone line, without using any of the external analog components found in devices such as modems. All digital circuits have "rough edges" where they don't quite behave exactly like perfect digital components; whereas human engineers try to filter out these irregularities, evolution exploited them. It came up with an almost perfect solution to the problem; it would have been almost impossible for a human electronics expert to build a similar circuit from the same components."
As for the virtual machine, what if instead the OS was loaded into a memory segment and it would check if any programs were trying to access the memory segment, that dont already reside there. In which case it would set each byte of memory trying to be accessed to 00h. This way the programs could still corrupt the memory segment, but they couldn't breed in it. In the memory segment there could be three "OS repairers" running. If these repair programs detect any corruption in the OS's code then its replaced with the original OS code. These repair programs could also check each other and make sure they havent been corruption. This would make it very difficult to corrupt the OS. I'm getting pretty far along with assembly too, and it doesnt really look like it would be too difficult to make a barebones OS. But at the moment I can't say for sure how feasible these repairer programs are. I'll keep learning assembly and see if I come up with anything. I feel some how that if I were to make a virtual machine I would be limiting and confining its potential.

Login to post a reply

Server time is: 2026-07-26 16:02:25
Your offset time is: 2026-07-26 16:02:25