General > Off Topic

A weird, cool idea

<< < (3/4) > >>

Ta-183:
I'm not sure, but wasn't that program a game?


Unrelated; Did you see just a few minutes ago when we had 25 guests?  

bacillus:
Quite an interesting one as well.
Anyway, I just saw 17 guests.

Numsgil:

--- Quote from: jknilinux ---Oh- OK. I understand.
Then, out of curiosity, do you know how CoreWars-8086 can run more than one organism on a simulated x86 computer?

http://en.wikipedia.org/wiki/Core_wars
--- End quote ---

It had an OS.  Or more accurately a virtual machine.  It was called MARS (Memory Array Redcode Simulator).

Again, I think this is a very possible experiment, you'd just need to define some basic rules about how programs can interact (assuming your programs can interact.  But if they can't, what's the point?)  For instance, in Windows a program will cause an illegal operation exception if it tries to access memory it doesn't own (such as memory Windows is using to run).  In something like this maybe you want to allow one program to access the memory of another, but make it a costly action in some way.  Or even just nakedly allow any program to write to any memory.

Such an experiment is closer in spirit to Avida than Darwinbots, incedently.  Darwinbots is about simulating a simplified version of biology, with bots moving through a 2D world and eating each other, etc.  Something like Avida is closer to raw programs competing in terms that make sense in the computing world.

edit: if you're really curious, multithreading in Core wars.

jknilinux:
Well, if I had, say, 8 cores, then I could run a maximum of 8 organisms without an OS, right? That might allow evolution to occur.
Because, as it turns out, I do have an 8-core processor over here that I could put to the task. So, maybe I don't need an OS after all.

The second problem is overclocking and overheating- is there any other way to randomly alter code without killing the processor? I'm thinking I shouldn't really be randomly altering the processor anyway, since the "DNA" will be stored in memory. So, I'll need to randomly alter the RAM instead... Maybe using a random number generator to insert random bits into random places in memory is a better idea... In fact, since it's a microcontroller, interfacing a random number generator with the RAM should be easy.

Anyway, my real goal here was to eliminate the OS to let all of the computer's processing power go directly into simulating bots. Is it possible?

Numsgil:
I don't know how 8 cores works on the assembly level, but down that path lies madness.  Also, you would need more than 8 "organisms" to achieve any sort of meaningful competition and evolution.  As a bare minimum a population needs to number in the dozens, probably hundreds, or you'll get random drift overpowering natural selection.

Don't underestimate how much an OS actually does.  It isn't trivial.  An OS vs naked assembly on the CPU is like the Earth vs. Mars.  The OS you use doesn't have to be windows.  You could find a lean version of linux and use that.  But again I don't think it'd be a very hospitable environment.  You're much better off constructing a virtual machine and having evolution proceed inside that machine.  That way you can control the sort of damage your ecosystem can cause, and provide a uniform environment across different hardware configurations.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version