Bots and Simulations > Evolution and Internet Sharing Sims
Zerobot Evolution - Where to now?
googlyeyesultra:
Okay, I'm working on the whole conditional logic zerobot thing. As it stands, I've got a bot that every so often (not very often at all) will randomly decide to reproduce, tie for 1-2 cycles, virus shoot, or shoot. The children won't reproduce, however (They've got 10 body, so it's not that. It's either some wacky epigenetics, a really fragile genome, or some sort of condition on reproduction (or I'm brain-dead). No clue which.
Anyways, my questions:
Can anyone decipher the wacky code that causes whatever the hell this thing is to work?
Can anyone verify my results?
Can anyone offer advice as to where to go from here on evolving this thing?
In exchange, I'll put up my limited knowledge, and the code of the evolved zerobot.
Tips:
Select a bot, ctrl-r, reproduce. This'll make it reproduce if you like something in its genome.
Early on, don't expect much. Any bot that has one more "store", even if it doesn't do anything, is really, really good.
Once you have something decent, find the best one (just look at the DNA/behaviors manually). Then, take this one and evolve it in a sim all by itself.
Until you've got a decent amount of code, disable deletions. Also disable delta mutations.
Consider using either zero costs or perhaps negative costs to feed your bots or at least prevent them from dieing off.
If you can keep your bots from dieing, you don't need to run around with 600 of 'em. All the times I managed to get reproduction were from having about 5-10 bots, and then being able to get around 1-3 thousand cycles a second.
It'll take quite a while.
Movement tends to evolve quickly, as it's not a huge step from 0 to 1 or 2.
If you don't have anything good, set point mutations to around 100 (or lower, if you want).
Once you get something, assuming it can reproduce, start it up in a sim, with point mutations disabled, but the others (aside from delta and major deletion) enabled. That means that even if deletrious mutations occur, the original will remain unmutated and continue to reproduce hopefully healthy children.
Erm, yes. So, please, add your own tips in your posts, please! Now here comes the scary technical part. I'll leave you to scratch out your eyeballs as you attempt to decipher whatever the hell this evolved code is.
--- Code: --- << >
-4 ceil 47 2 ^ floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor xor
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor xor
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 dist 47 2 ^ 436 floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 start
<< floor or
store
start
add pyth inc
19 ~ pow -- stop
0 << >
-4 ceil 47 0 << >
-4 ceil 47 start
<< floor or
store
dup *.maxvel pyth ~ 19 ~ pow -- else
angle 47 inc
>=
%=
not
sub store
and
store
xor
-14 ~=
dec
| 41 .dx store
1 pyth else
& pyth rnd -5 -6 =
or
or
floor stop
start
store
inc
*.timer -- ~ inc
22 %=
!~=
add << >
-4 ceil 47 2 ^ floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor xor
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor xor
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 2 ^ floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 dist 47 2 ^ 436 floor or
store
dup *.maxvel pyth or
19 ~ pow -- stop
0 << >
-4 ceil 47 start
<< floor or
store
start
add pyth inc
19 ~ pow -- stop
0 << >
-4 ceil 47 0 << >
-4 ceil 47 start
<< floor or
store
dup *.maxvel pyth ~ 19 ~ pow -- else
angle 47 inc
>=
%=
not
sub store
and
store
xor
-14 ~=
dec
| 41 .dx store
1 pyth else
& pyth rnd -5 -6 =
or
or
floor stop
start
store
inc
*.timer -- ~ inc
22 %=
!~=
add
--- End code ---
Numsgil:
Sprotiel was about the only one that was any good at working through evolved DNA. It takes alot of work. Basically, the first step is to remove junk DNA that doesn't do anything to end behavior. Work backwards from store commands.
It's pretty easy to trim the first stuff down since a robot needs to start a gene with cond, or start, or else, or something. Random DNA before a gene is junk. (I think, been a while since I toyed with the DNA's virtual machine, so feel free to double check that.)
For your bot... congratulations, it's a bouncing baby zombie. It's been "infected" Here's your viral culprit:
--- Code: ---0 << >
-4 ceil 47 2 ^ floor xor
store
dup *.maxvel pyth or
19 ~ pow -- stop
--- End code ---
There's several different strains in that genome, so your virus is evolving as well (or maybe just mutating). This seems to be a common occurrence in evolved DNA. I tried destructing your virus to see how it works, but my math must be screwed up because it looks to me like it's storing 0s at location 0.
Actually, on closer inspection I think you have a larger virus in there too.
The last bit of the genome mirrors a bit earlier on.
googlyeyesultra:
Trimming isn't as easy as it sounds. I'm pretty sure that a condition, even outside of the cond section, is added to the cond stack. It'll then get called next time cond comes up, although it might be overwritten by other conditions there, I'm not sure. You might also be able to put values on the stack outside of genes, but I'm really not sure. And ya, I noticed the virus thing, but it seemed to work, so I didn't want to bother to try to select against it.
Also, in terms of virus evolution, it says next to copy mutations that viruses mutate that way. Can someone that knows how the code works check that? Do viruses actually copy mutate?
Lemme see if I can figure out what the hell that's doing.
0, a couple of probably useless cond markers, -4 ceil. I guess that means -4 on the stack. Erm, what does the program do when the floor is set to be higher than the ceil? I'm betting that store is just taking a value off of the stack from somewhere else and storing it into 47 squared, with a wrap-around at 1000 (Is that 209, then?). Then dup'd take another value off the stack and do some wacky pythagorean equation involving powers and 19. I guess it just puts that on the stack for something else to use.
Looking further at its behavior, it also sometimes rotates. I don't know how the hell it works, though. Maybe it is being mind-controlled by extra-terrestrials? I seriously don't understand how it has such a wide behavior of somewhat decent abilities in a wacky little illegible thingamabobber.
Well, studying closer, the little ones do repro. It's just that the children are given so little energy they die in one cycle, making it appear as though the small children never reproduced, as if it were conditional. Interesting. I still have to figure out what logic it uses to decide when to virus, turn, etc.
I'm theorizing that it may be syncing everything with its virus production, so that when .vtimer is within a certain range of values, it does stuff.
Numsgil:
--- Quote from: googlyeyesultra ---Trimming isn't as easy as it sounds. I'm pretty sure that a condition, even outside of the cond section, is added to the cond stack. It'll then get called next time cond comes up, although it might be overwritten by other conditions there, I'm not sure. You might also be able to put values on the stack outside of genes, but I'm really not sure. And ya, I noticed the virus thing, but it seemed to work, so I didn't want to bother to try to select against it.
--- End quote ---
I can't seem to reproduce what you're talking about here, but I may need to go in and look at the program's code to say one way or another. And by all means, select for the viruses. It's not a bad thing. They tend to produce the best results.
--- Quote ---Also, in terms of virus evolution, it says next to copy mutations that viruses mutate that way. Can someone that knows how the code works check that? Do viruses actually copy mutate?
--- End quote ---
Copy and point mutations work on all DNA, so any viruses that stick around inside a genome will get mutated when the bot reproduces or just over time. Mutations don't respect code structure at all. They just muck with things pretty blindly.
Your bot's code is also a good example of why simple DNA instructions are important. Bitwise operators are hard to decipher when you try to figure out what an evolved bot is doing.
googlyeyesultra:
Meh, nevermind, I just went back and tested it. Stuff outside of genes doesn't influence stuff inside of genes, at least not in the way I thought it did.
In terms of simple instructions, you could always leave the complex ones in the code for the occasional human use and then make it so they can't be mutated (or perhaps leave it as an option somewhere). Then again, that's not for this thread.
Even if I wanted to kill off the viruses, I'm not sure how. I don't know what is specifically producing them, and I think quite a bit of my other stuff is tied to it as well.
So far, I actually haven't gotten to any form of natural selection. They're still being rather babied through it. I use negative costs to feed them energy for things I like, like stores, edit their mutation rates repeatedly, and make arbitrary judgements on which one (yes, I only save one), should be saved and brought to the next sim. Unfortunately, evolution kindof dies out, since the children don't easily get big enough to reproduce, thus ending the mutation line quite quickly. I'll have to expirement with some crazy huge negative costs, like -10 per store or something.
So far, the only evolved code I could understand was a bot that took advantage of my negative costs. It still couldn't repro or feed, but I was tossing negative costs for movement, so it stored some crazy huge value (I think it was some random value on the stack 1 dist) into .dn. Oddly enough, that thing evolved into this. Once I moved the bonus back to 0, drifting bots sprang up a lot faster (still without any reproing, hunting, and minimal deaths).
Navigation
[0] Message Index
[#] Next page
Go to full version