![]() |
|
Mutating Programs |
CGamesPlay
Member #2,559
July 2002
![]() |
I can't believe you guys are running those. I hope at least you have everything backed up. I mean, even if they don't kill your whole HD, they might just casually overwrite a few files or something... BUt, if you want to continue to be reckless: You guys are only modifying the data section. You can't touch the code. When it changed the path, it was changing something in the data section. If you want to do really kewl and stupid (as in dangerous) stuff, look up the header of PE executables, and set the flag to make the code section writeable. That way you really change what the program is doing. Whenever you got pointer errors (access violations), it was probably because the code was trying to write to it's own code section and couldn't. You might have wanted to code these in ASM also, much less bloat. Or wait, you were changing the file on disk, not in memeory, weren't you? Ok, disregard all that -- Ryan Patterson - <http://cgamesplay.com/> |
Irrelevant
Member #2,382
May 2002
![]() |
Following the idea of making a specialised enviroment, I have some questions for the masses:
I might have a shot at an enviroment, but I'll wait for our ideas to settle a bit. I don't want to write something noone wants. <code>//----------------//</code>Here be l33tsp33x0rz. |
X-G
Member #856
December 2000
![]() |
For level: I say machine opcodes. Shared memory is likely a bad idea, though, if you want multi-tasking. Have the stack be as large as you feel is necessary. Registers? Depends on what you need. You're going to need things like an IP, an accumulator and data register, etc. -- |
Irrelevant
Member #2,382
May 2002
![]() |
Right, so, progranisms shouldn't be allowed to mess with each other while they run, right? Just with each other's files? In that case, is there any point in multitasking, or would just running progranisms sequentially off a buffer do just as well? That is, taking the progranism from the top of the buffer, running it, and adding any new progranisms to the bottom of the buffer. Actually, that would remove the point of having delays. OK, I just answered my own question. But would multitasking still be worth it if they can't mess with each other? If you wanted to reduce the havoc they could wreak on each other, but still allow some sabotage, you could kill any access violating progranism, but leave the change changed. [edit] 65536 byte RAM (2 byte memory bus) Registers: Accumulator (1(?) byte) The memory address register, memory data register, instruction register and so on can be automated if it's working at Assembly level, but if it's right down at machine code then they'd be needed as well. <code>//----------------//</code>Here be l33tsp33x0rz. |
Billybob
Member #3,136
January 2003
|
As I recall correctly, stacks are low level, not high level. Built directly into the processor. Anywho, I feel that all of us should make our own VM Here's my idea for a processor design: Why so many registers? When I did my first custom VM(processor emulator) I did that whole Xh, Xl, thing, which basically gives you extra registers without the CPU having to store more registers....well that idea blows, this is a VM and the number of registers doesn't matter in a VM, so I went all out and put 7 32-bit registers >8) Why so much stack? cause...I like stack. Operations include: MOV, ADD, SUB, MUL, DIV, AND, OR(EOR), XOR, BSL(<<), BSR(>>), LJP(local jump), GJP(global jump), INC, DEC, MMV(Memory Move), IF operations, PUSH, POP, INT I think that's it.... The whole local/global jump idea is this: local jump will jump in reference to the program's memory, global jump will jump in reference to the WHOLE memory. Now, I haven't given direct support for function calls, because I believe I shouldn't, I'll give support for it in the Assembler which will convert it to the pure machine version(PUSH registers, LJP), this'll give progranisms more control...although maybe I don't want them to have that much controll...hmm...maybe I'll give support for it...ya. The VM will be multitasking, no access violations to allow for hacking. I think that's about it, so far I've written up the MOV portion of the OPCode document, I'm dumb!, all those registers take a long time write(81 different combinations, excluding a constant...which would make it 90).
|
LSd016
Member #3,561
May 2003
|
Quote: As I recall correctly, stacks are low level, not high level. Built directly into the processor. No, the stack is in ram, and the cpu has a pointer to its current position(ESP). ____________________________________________ |
Billybob
Member #3,136
January 2003
|
Still, the point stands, the feature is built into the processor, your program doesn't have to handle pushing, poping, and keeping an ESP pointer. But yea, I thought it was in the CPU...guess it wouldn't make too much sense in the CPU....anywho, thanks for pointing that out.
|
Carrus85
Member #2,633
August 2002
![]() |
Um, I was wondering, does anyone know of any good tutorials on VM Development? I've googled like mad and I get all sorts of JavaVM crap, that doesn't really help...
|
LSd016
Member #3,561
May 2003
|
Obviously you could find processors with built-in stack(like 256 bytes), in simple electronic devices. But not in PC. ____________________________________________ |
Billybob
Member #3,136
January 2003
|
Carrus85, there isn't much too it. Just build your interpreter and then add stuff like multitasking to it. If you really want some help though, search for info on emulating things like the nintendo, that'll help with writing the interpreter.
|
Carrus85
Member #2,633
August 2002
![]() |
Besides, what the heck is the point of having the stack in the processor? Just write a class that encapsulates the stack, or just use the STL class, and BINGO! Stacks Made Easy... BTW... PLEASE Someone tell me where a tutorial on designing VMs is located. EDIT Personally, I was thinking about customizing the VM commands so they are designed around the our "evolution" concept. True, it would be quite high level, but that isn't an issue. I just need to figure out how to implement logic of some form.
|
X-G
Member #856
December 2000
![]() |
Quote: Besides, what the heck is the point of having the stack in the processor? Speed. -- |
Carrus85
Member #2,633
August 2002
![]() |
X-G said: Speed. True, but with todays processors, stacks in the processor or stacks in the CPU don't make a lot of difference. I mean, the TI89 has a processor stack, but that only helps to a certain extent.
|
Billybob
Member #3,136
January 2003
|
yea, RAM is fast, but seeing as how it's getting faster, it isn't fast enough
|
psundlin
Member #175
April 2000
|
And the difference between processor and CPU is? |
X-G
Member #856
December 2000
![]() |
Heatley: That's why you don't see CPU stacks on normal x86 CPU's, but more usually in embedded systems. -- |
Billybob
Member #3,136
January 2003
|
Quote: But yea, I thought it was in the CPU...guess it wouldn't make too much sense in the CPU yea, I figured that out...re-organized my logic and junk. Umm, CPU is a dangerous word. Originally I think it meant processor(Centeral Processing Unit), but now adays it can also be used to describe the computer as a whole...anywho, I was just using it as a synonym for processor.
|
CGamesPlay
Member #2,559
July 2002
![]() |
Well, nowadays, people call the monitor the computer, and the case the CPu -- Ryan Patterson - <http://cgamesplay.com/> |
Billybob
Member #3,136
January 2003
|
That's probably cause of the Mac and how some of their comps are just a monitor with a computer crammed into the base of the monitor...anywho, I'm on OPCode 01BC after documenting MOV, ADD, SUB, MUL, DIV, AND, and EOR...my hand hurts.
|
Johan Halmén
Member #1,550
September 2001
|
Is this the longest thread in GD&C ever? I have an old idea of making a life simulation where I would let bugs (beetles) evolve and mutate. They would contain a set of genes, one determinig the sex (xx and xy) and lots of others determining outlook, behaviour, fertility etc. Compared to your mutating progranisms this might not be as exciting, but it wouldn't harm my computer. A good prologue or trailer for Terminator 4: "Back in the early 21st century, some geeks on an Internet site discussed what would happen, if a computer program were given a possibility to mutate. Little did they know what their..." Feel free to continue. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Years of thorough research have revealed that what people find beautiful about the Mandelbrot set is not the set itself, but all the rest. |
Richard Phipps
Member #1,632
November 2001
![]() |
Johan, I actually saw someone who made a program that simulated evolution and breeding for beetles shapes over 15 years ago on the spectrum. Pretty impressive for the time. |
Stefan Hendriks
Member #1,957
March 2005
|
Is 'copying and changing randomly some bytes' really ai? I would say no. In fact, true ai can never really exist into a machine. Machines always need instructions from a user(input) so the machine will always act based uppon its given knowledge. An evolutionary type of program would be for instance: - a program that continiously scan's its own source. the problem remains-> programs will never learn this if they don't know they CAN learn this. I have been working almost 3 years on a Counter-Strike BOT AI. And some dude just came in smashing the entire Bot concept idea because all counter-strike bots are NOT REAL ai. They are purely 100% given instructions, acting they way they do because the programmer tells them to act like this. Even when using statistics and arrays with low/high scores using trial/error systems and such, it is still hard coded. Because-> the bot never will try another aproaches but the given one by the user. I have made a little, 'ai document', here it is: Quote:
ProblemResult(int problem) return() Example: when all true, the function returns true and executes - able to move? (false) if no more attributes left, the program knows the PROBLEM: How to identify attributes or problems? POSSIBLE SOLLUTION: Given by the coder... when the situation is unknown the coder should ------------ exploring the map ---------------- .... to be continued? AI is nothing but 'problem solving' as for every human actually. A simple example would be 'pick up a glass'. For us, we see the glass, reach, grab, take it and perhaps drink. For an AI its different, whats a glass? (AI needs user input, it is not able to 'learn' that itself), how to reach? do i have instruments for that? (arms? hand? , etc) when reached, what to do? grab? whats that? etc... if the user will insert the commands for the computer: function: grab() ... AI is a tough thing, gets ya dizzy (certainly at this time. :S) |
psundlin
Member #175
April 2000
|
Quote: In fact, true ai can never really exist into a machine. Machines always need instructions from a user(input) so the machine will always act based uppon its given knowledge.
I disagree. I know we don't have the knowledge to create a real AI, but there is also so much we don't know about this whole idea. We don't even fully understand how our brains work. |
CGamesPlay
Member #2,559
July 2002
![]() |
Umm... perhaps you should substitute "AI" with just plain "I"? What we have is exactly that: artifical intelligence. This is a simulated behavior, however gotten. If you think we can't truly teach computers to learn, then you are right, but only because you're being stubborn. Be a creationist: God put humans on this Earth, already we had the knowledge to learn and breed and change. Why not the same for computer programs? -- Ryan Patterson - <http://cgamesplay.com/> |
Billybob
Member #3,136
January 2003
|
Acording to my crazy logical theories: There are currently two levels of learning known. The first is what I call brute force learning. This is what the Progranisms mimic. They try random approaches to "life" finding the best ones. This is just like when you hack a password "brute force" you try EVERY combination until one works. Now, this is not what you would call intelegent, but it is learning. The second level is what we call intelegence. This is where, instead of randomly trying things, the entity trying to learn with use past experiences to influcence the "randomness". It is still random in a sense, but it reorginizes what random ideas it picks first. I'm not sure whether the second level is possible or not in machines, since machines, like was basically said, are static, they follow only instructions, the instructions may change, but they are still restricted. There is a way to find out if it is possible though, and I think it is through the first level. Maybe the Progranisms can evolve to the second level? I'm not sure. I have way too many theological questions that need answers before I can decide if this is truely possible. It seems logical, I mean we are all made of the first level of learning anyway(cells), so it would make sense that it would be possible, but we are still limited in knowledge, we don't know all that goes into "life" and thinking...so...whatever. Let's leave it at that, PLEASE, cause this is a flame war waiting to go off, so let's be civil, please. Oh, and Johan, your idea is known as Genetic Algorithims I think...not sure, but I think. BTW, [url http://alifegames.sourceforge.net/] Check that out! Cool stuff, genetic algorithims. The first game kinda blows, cause it is poorly designed you can't turn(eeeee), but it's a nice idea.
|
|
|