Code center > Darwinbots3

Bot DNA

<< < (6/13) > >>

googlyeyesultra:
I fail to see how doubling the number of commands a mutated bot needs to successfully nest conditions would actually reduce problems. Seriously, if it's gotta put pushbool in the right place, and popbool in the right place, wouldn't it be easier just to put one closing-brace esque command in the right place? I mean, the code would work, but it seems like an awfully complicated system. I thought we were trying to make it simpler so that mutations could actually have a chance?

In short (kindof), it's a neat solution, but I don't see how it would improve from the more basic option. I'd think that it'd be less intuitive for humans and harder for evo-bots to develop.

Trafalgar:

--- Quote from: Numsgil ---Not sure if we'd need a new command to clear the top value in the bool stack or if we could do it using AND, OR, NOT and XOR.
--- End quote ---

I don't think you could really pop something with just those.

The way I pop something on the regular stack is 'dup xor inc', or if I need to pop several things at once, I put adds (though ands, ors, or whatever would work too) before that statement. To pop 3 things: add add dup xor inc

(dup xor zeroes whatever's on the top of the stack, so that the inc will be working on no memory location)

Numsgil:

--- Quote from: googlyeyesultra ---I fail to see how doubling the number of commands a mutated bot needs to successfully nest conditions would actually reduce problems. Seriously, if it's gotta put pushbool in the right place, and popbool in the right place, wouldn't it be easier just to put one closing-brace esque command in the right place? I mean, the code would work, but it seems like an awfully complicated system. I thought we were trying to make it simpler so that mutations could actually have a chance?

In short (kindof), it's a neat solution, but I don't see how it would improve from the more basic option. I'd think that it'd be less intuitive for humans and harder for evo-bots to develop.
--- End quote ---

It's actually not that different from a closing brace type system.  The pushbool and popbool are like opening and closing braces.  Primarily the difference is a matter of control.  In a more conventional system, condition A is commanding condition B on wether it can execute or not.  In this system, condition A is suggesting to condition B wether it should execute or not.  It's the job of condition B to follow that suggestion or not.

If we wanted multiple conditions in a single block, you would still need an opening brace to show that you're starting the body of the condition.  And if yoo lose a closing brace, then the entire genome beneath you becomes part of your condition.

I'm not so much trying to find the easiest method for nested conditions.  I'm trying to find a method for nesting conditions that is robust to mutations.  Take the current system.  If you had:


--- Code: ---cond
start

cond
start

cond
start
--- End code ---

And you lost the second cond, it just means that the second gene gets controlled by the condition right above it.  Mutations don't end up effecting global changes in the flow the DNA.

googlyeyesultra:
I've just been thinking. . . Does it matter so much how we implement nested conditions? After all, mutations will almost never evolve conditions, much less complex/nested ones, and conditionals are often the first things to break. That is, unless you are planning a major overhaul in that respect, bots will break conditions, no matter how you nest 'em.

Endy:
They don't really break every single condition, some conditions are just too dangerous for them to break. The reproduction and turning conditions usually last forever. Other stuff like shooting constantly makes sense if there's enough food around. Breaking things like defense storage makes since they're surrounded by "friendlies" most of the time.

I do think "equals" might be highly susceptable to mutations. Basically it's less likely two random numbers are going to be equal than it is that one is going to be greater or less than the other. Either the condition will be broken or the "equals" will be changed.  Think alot of our problems stem from a disconnect between human and evolutionary logic. Evolution is based on likely/unlikely probabilities, human logic is based on certainity.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version