Darwinbots Forum
Bots and Simulations => Evolution and Internet Sharing Sims => Topic started by: Botsareus on June 22, 2005, 10:04:45 PM
-
I want to see what my FirstBot Virsion2 will evolve, Can you make up the correct settings to evolve it and evolve it for me, If you dont have time then never mind.
-
http://s9.invisionfree.com/DarwinBots_Foru...p?showtopic=472 (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=472)
-
I'm planning to try, but I am not too hopeful. The evosims I ran before never required development of new features - it was mostly optimization projects. Yet I am curious and I'll see what I can do, though I am very busy at work right now.
I'm gonna go and thing for a while now :) Maybe I'll figure out what quare means..
:D :lol:
-
OK, this is an extremely dumb bot! It can't even turn away from its own child!
So, here is the first challenge: Find conditions in which even this bot can live. Right now I am trying the smallest size of the screen and I set the veggies to max out at 600. That seems to give these bots enough food to survive even though they are so dumb.
Let's see what happens...
I beginning to like this project :)
-
I tried running that thing for ages. It never did learn to turn :(
Perhaps I should try again.
-
thx guys , I am trying it out again also , I set the reproduction treshahold to 30000 and seeing what happens pure in F1 settings.
-
Try slowly lowering the max veg cap every 100K cycles or so (maybe every 500K cycles), until you get to a reasonable level. See if it can adapt.
See if it can even learn to turn :lol:
-
Damn thing crashes on me!
-
Is it one of thouse "Send an error report to microsoft" errors?
-
I ran it again for several hours yesterday. Nothing much happened for 100,000 cycles or so.
I left it running overnight and came in this morning to find another overflow error. I have no real proof of this but I suspect it to be the sexrepro command that caused it since I forgot to set the scripts to kill any robot that develops it. This one has caused me grief for ages.
The interesting thing is that the average mutations graph showed a very sharp increase right at the end. The average amount was 44 when it crashed. Maybe the mutation rates increased.
-
You guys are wimpy evolvionists (that's not a word, but what the hell!)!
180,000 cycles later I had this:
cond *.nrg 20000 > start 50 300 stop
cond start store stop
cond start -1 .shoot store 10 .up store stop
cond start -1 7 stop
cond start store 10 .up store stop
end
As you can see the first gene has been split in two and the second gene was duplicated. This gives me hope - I think I can evolve this baby!
And right now I am at 420,000 cycles and here is the most populous bot:
cond *.nrg 20000 > start 50 300 stop
cond start store stop
cond *.shareshell *180 !%= start 1168 -1 .shoot store 10 .up store 10 .up store stop
cond start -1 7 stop
cond start -1 7 stop
cond start store 10 dec 1 sub stop
end
This piece of code is already beyond me - I have no idea what genes 3-7 do together. By the way - bots learned to turn! They don't turn for any specific reason, but they do run in circles now! Yay!
-
And one more thing: that "average mutation" graph is seriosly messed up -it shows total crap! Well, it's not actually the graph, but the "counting number of mutations" routine - my bots have tons of mutation, yet their mutation counters are at 0.
-
You guys are wimpy evolvionists (that's not a word, but what the hell!)!
Sure it is a word.
You can find Wimpy shops all over the place. Their burgers aren't that bad either. Don't know what it has to do with evolution though. :D
-
Good work.
-
Just to keep you guys updated: I am at around 1.6 million cycles and I see tons of diversity in bots. Recent snapshot shows 78 different species of bots with the most abundant having just 10 organisms (total is 200 bots). I think I've relaxed conditions way too much. Another expalantion is that the ratio of junk DNA to good DNA is very high in these bots, so a lot of mutations are not affecting their fitness and are able to survive. That means I need to reduce the mutation frequency.
-
cond *.nrg 20000 > start 50 300 stop
cond start store stop
cond *.shareshell *180 !%= start 1168 -1 .shoot store 10 .up store 10 .up store stop
cond start -1 7 stop
cond start -1 7 stop
cond start store 10 dec 1 sub stop
end
The -1 7(second to last set?) is probably interacting with the 1 sub and the store at the top to make a -1 6 store, allowing the bots to turn(there's probably more to this, but I'll admit the rest hurts my head). :wacko:
Whenever you decode what is happening you have to take the stack into account. Imagine a sort of circular dna structure with several DNA's after each other, then add the effects of conditions and non-activating genes in there(don't ask me how much your brain will hurt after you manage it). :blink:
Nice job Shavarz. :)
-
I ran FirstBot last night for a laugh. Field size 4, veg repop 175, veg starting nrg 5000, mutation rate 1000. I have about 5 different varients running around each with a dozen or so bots per species.
Im suprised I havnt got any gene splits or duplicates at all. I did get an increase in nrg required for reproduction via *.nrg 20000 > being duplicated and the > changing to a !%=, effectively increasing the nrg needed to 22000.
Also 10 .up store changed to 10 rnd .up store, presumably reducing the nrg required to accelerate when tied to babies/bumping veg. Maybe once its built up some junk and a few surplus store commands it will start to do interesting stuff.
-
For all you brainiacs out there, here is a version from around 1.8 million cycles. Try to figure out what it does while I am away (going camping):
cond *.nrg 20536 > *.nrg 20536 !%= start inc sub rnd inc sub rnd 50 300 50 300 stop
cond store store inc store stop
cond *.shareshell *180 !%= start 1168 store mult 1168 store sub *735 *.genes dec *778 *.setaim *768 dec *.setaim *768 rnd -1 div -1294 *491 460 store 218 inc -1202 10 1 rnd div 10 .up store 10 441 mult 1342 stop
cond start -1161 -1 7 stop
cond start -1 7 stop
cond start store 10 dec 1 inc sub stop
end
-
Hey! There's no start in the second gene!
-
Well , It lost the ability to turn. And that Junk dna seems to be building up for some reason , hmmmm... Hehehe....
Anyone who can tell me why there is so mutch junk dna gets a cookie. (free energy?)
OR
Anyone that can prove all of this is not junk dna also gets a cookie.
The Problem is in my mutation sims it never stoped building up junk, and it never really did anything too special.
What I find good is that when I ran mutation sims It also had the rnd placed after the 20 to get the 20 rnd .up . Its a really common mutation.
-
Maybe there is so much junk DNA because it has no positive or negative effect on the bot at all. So it can keep accumulating and changing throught generations. But a bot who has a mutation to junk DNA which becomes negative will not live long enough or even be able to reproduce, so the negative gene is not passed on.
-
Why don't you just add to the console execution mode also the listing of all memory locations accessed (read and write) by a bot in a certain cycle? It's a 20 minutes work.
-
ooooh, yes! And real-time stack observation too!
-
I think the -1161 -1 7 sub store(not all right by each other) is causing the bot to turn more. I had kind of guessed that would eventually occur. The slight turn would be useful at the start to avoid feeding from offspring and have better chance at feeding. But a larger turn would increase chances and help the bot more.
Not really that difficult to read the DNA, you just have to take multiple cys into account.
Like the ideas about stack observation and sysvar activation reading.
-
I think the -1161 -1 7 sub store(not all right by each other) is causing the bot to turn more.
Nope! This does nothing (it means -1161 -8 store). Actually, the bot never ever turns.
-
My advice is not to let it go beyond recognition - save some intermediate bots and align those to each other.
I cant beleave Shvartz actualy sayed this. This goes agenst the consept of evolution that he himself designed. That the program should naturaly evolve bots without any help from the user.
Shvartz, Is that firstbot getting too much junk dna so you decided to interfere?
BTW: What is going on in general , are you still going at it?
-
This goes agenst the consept of evolution that he himself designed.
You probably did not understand me. What I mean is to let evolution go its way, but save the evolved DNA often somewhere. Then later you can trace how mutation happened and what gene evolved from what gene. If you just try to compare the starting bot to the one that's there 20 million cycles later, then they are going to be so different that it will be very hard to sort things out.
Yes, I am still going - there is tons of junk DNA, I think around 4/5 of all DNA is junk, but then I have not tried to figure out what that DNA is doing (maybe it's not junk). I am at 2.6 million cycles. But recently not a lot of progress has been going on, mostly because I relaxed conditions too much and there was no selection - run and shoot and you'll survive. I am tightening the belt now...
-
Have any of them learned to change direction yet?
-
Nope, in fact they recently lost the ability to turn that they developed before that. I'm at size 5 now with friction at maximum and with moving factor at .55 - but they still can cross the screen fairly quickly, which means that they don't have to turn to get to food - they'll stumble upon it anyway when they go through that spot again. Argh, this irritates me!
The good news is that they have accumulated huge amounts of DNA and a lot of it is still active - average genome is 360 comands organized in 9 genes. Last 7 genes are constantly executed.
-
What is your veggie cap?
-
It used to be around 280, now I brought it down to 210. I don't like to introduce changes rapidly as it often leads to crash in population.
Another thing that I noticed is that bots tend to all align with each other and run parallel to each other. This way they avoid bumping into each other. If one of them mutates and starts running in circles, then it is bound to run into other bots and gets killed quickly - another disdvantage of having fast-moving bots in small-size screen.
-
thx Shvartz, It all make sense now.
look here what I got:
I tryed my method again with purely F1 contest rules... Its slooowww but:
cond
*.nrg
30000
>
start
add
50
.repro
store
stop
cond
start
-1
7
stop
cond
start
store
20
rnd
.up
store
stop
end
'5,297,281,285,293,310,253,312,303,289,296,313,309,339,271
-
It used to be around 280, now I brought it down to 210. I don't like to introduce changes rapidly as it often leads to crash in population.
Another thing that I noticed is that bots tend to all align with each other and run parallel to each other. This way they avoid bumping into each other. If one of them mutates and starts running in circles, then it is bound to run into other bots and gets killed quickly - another disdvantage of having fast-moving bots in small-size screen.
Try introducing Zero Momentum to the sim. That should teach them :P
-
Zero momentum is too much. I'll wait till you release that new shiny version where "zero momentum=100% friction". Meanwhile I just increased the size of the sim to 6 and reduced veggies to 180. Seems to help - I see some bots are moving very slowly now. Here is an example:
cond
*.nrg 20536 >
*.nrg 20014 !%=
start
*.hitsx *.tielen3 inc
inc
*.daytime inc
inc
50 300 369 380
stop
'''''''''Gene 2: Last 'stop' at position 21'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
*.tielen3 inc
inc
*.daytime inc
inc
50 300 369 380
stop
'''''''''Gene 3: Last 'stop' at position 41'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300
stop
'''''''''Gene 4: Last 'stop' at position 57'''''''''
cond
*.out2 *490 !%=
cond
store
stop
'''''''''Gene 5: Last 'stop' at position 68'''''''''
cond
*.shareslime *180 !%=
start
1168 *.refvelsx store
*652 *.rdboy -12 rnd *553 -12 rnd sub rnd sub sub rnd *790 *387 *.rdboy rnd *387 *.rdboy rnd *.sharenrg sub *735 *916 *.mydn rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 dec
rnd *735 rnd -215 sub *.daytime dec
*615 -1 div -1292 *.pwaste inc
inc
*.pwaste inc
inc
*307 div 460 -565 644 .tieang3 store
*273 dec
-1179 dec
store
*948 218 -1203 inc
841 11 dec
841 -549 11 inc
*868 *.trefvelmydx -434 1 div div inc
9 1 354 store
10 add *.fdbody 1 *676 store
11 .up store
inc
1278 inc
1342
stop
'''''''''Gene 6: Last 'stop' at position 186'''''''''
cond
*.shareslime *.eye8 !%=
start
1168 *.refvelsx store
*652 *553 -12 dec
*.sx sub 401 rnd mult rnd sub 962 *.hitup *735 *.shdx dec
*735 *107 -1195 *772 *.trefypos div *772 *.trefypos div dec
rnd *735 rnd inc
*735 rnd inc
*735 rnd 669 inc
*735 rnd sub inc
*.daytime dec
1 store
div -1460 -1292 *.pwaste inc
inc
395 -909 add *307 div add *.eye1 div 460 -565 460 dec
-565 dec
store
store
*.tie 218 -1203 inc
10 *868 *381 inc
div *.trefvelmydn 1 div *.trefvelmydn 1 div 9 -8 1 -354 store
10 add 1 *676 store
11 .up store
store
1278 inc
1342
stop
'''''''''Gene 7: Last 'stop' at position 301'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 inc
sub -382 *816 -331 401 -376 -792 inc
-1163 -178 div -1 7 rnd
stop
'''''''''Gene 8: Last 'stop' at position 324'''''''''
cond
start
-1 7 -403 -1 7
stop
'''''''''Gene 9: Last 'stop' at position 334'''''''''
cond
start
store
sub 10 add sub 10 dec
add *650 *969 store
*650 *969 store
dec
div sub mult dec
sub sub store
dec
sub inc
dec
sub store
dec
sub store
dec
inc
div dec
inc
add dec
inc
add dec
div add 1 sub
stop
'''''''''Gene 10: Last 'stop' at position 383'''''''''
end
Genes 4-10 are active. What's all that duplication in gene 10 about? wtf? clearing out stack? Also look at gene 4 - it has 2 conditions and no start - but it still works. Weird. And how did it get this way?
Btw, the overall mutation says this bot got only 1 mutation - shows you how seriously messed up that routine is.
-
Curious, I nearly always get the same condition change that you get on repro genes. Changing > to !%= gives an automatic boost of several thousand energy, though presumably requires two seperate mutations, a duplicate and a straight up change > to !%=. Why that would be more benificial I dunno.
Oh yeah and the mutations are in seriously need of an overhaul. I get crashes if I open the mutation graphs. Bots always reports 0 mutations. The bot info panel reports mutations that havnt occured, mutations that are different from actual changes or mutations that make no sense (I get inserted instruction ,,, a lot). Gene syntax gets changed which is obviously bad. The mutation toggle button seems to turn on and off randomly. And the strangest of all, my sims seem to stop mutating after a while, dunno why or even if its just luck, but ive run sims for millions of cycles and ended up with the exact same bot, could be me, anyone else noticed this?
-
Now I see something interesting: Bots run very fast, but as soon as they stumble upon food - they slow down and crawl along! This increases their chances of feeding, because instead of ramming through a groop of veggies they now can eat a lot more. If anyone wants the DNA to figure out how they do this, let me know.
-
about speed changing bots: COOL
about stack:
I gess its indeed clearning out the stack in gene10, Its very interesting in what way the dna learns to program itself.
-
Now I see something interesting: Bots run very fast, but as soon as they stumble upon food - they slow down and crawl along! This increases their chances of feeding, because instead of ramming through a groop of veggies they now can eat a lot more. If anyone wants the DNA to figure out how they do this, let me know.
Can you post this bot Shvarz? I will give it a shot. Not my strong side, but I'll try.
-
OK, here is the example:
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
sub *.tielen3 inc
inc
*.daytime inc
*102 inc
rnd 50 *.myeye .repro store
369 380 *297
stop
'''''''''Gene 2: Last 'stop' at position 26'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300 add
stop
'''''''''Gene 3: Last 'stop' at position 43'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
53 300
stop
'''''''''Gene 4: Last 'stop' at position 59'''''''''
cond
*.out2 *490 !%=
cond
store
stop
'''''''''Gene 5: Last 'stop' at position 70'''''''''
cond
*.shareslime *180 <
start
1168 *.refvelsx store
*652 *.rdboy -12 rnd *.rdboy -12 rnd *553 *790 -12 rnd sub rnd sub rnd sub sub sub -522 rnd add *790 *387 *.veldx *.rdboy rnd *387 *.rdboy rnd *.sharenrg sub *43 *121 div *735 *916 *.mydn rnd *.shootval *.shdx mult *.bodloss *372 *768 rnd inc
446 -130 dec
rnd -130 dec
rnd *735 rnd -215 *.daytime dec
*.bodloss -1 div -1292 *.pwaste inc
inc
*.pwaste inc
inc
*.pwaste inc
mult *307 div 460 -565 644 -818 1180 store
*273 dec
*353 -1179 -1022 dec
store
*948 218 -1203 inc
841 11 dec
841 -549 11 inc
*868 *.trefvelmydx -434 1 div div inc
9 1 354 store
-813 10 add *.trefvelmydx 1 *676 store
11 342 store
store
1278 inc
1342
stop
'''''''''Gene 6: Last 'stop' at position 212'''''''''
cond
*.shareslime *.eye8 !%=
start
1168 *.refvelsx store
*652 *553 -12 dec
*.sx sub inc
rnd sub inc
rnd mult rnd dec
mult rnd 962 *.hitup *735 *.shdx dec
*.trefup *.fixang -1195 *772 *.trefypos div *772 *606 *.trefypos div dec
rnd *735 rnd *.fixpos inc
*735 rnd inc
div *735 rnd dec
627 div inc
*.tieloc rnd sub -952 inc
*.daytime dec
1 store
div -1460 -1291 *.pwaste inc
sub inc
395 -909 add -187 *307 div add rnd *307 div 460 -565 div 476 -565 460 -565 div store
div dec
store
*.tie 218 -1203 inc
9 dec
*363 *868 *381 inc
div *.trefvelmydn 3 -494 dec
9 -8 1 -354 store
10 add 1 *676 store
11 .up store
store
*415 store
*415 1278 inc
1342 *.shdn *40
stop
'''''''''Gene 7: Last 'stop' at position 353'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 rnd *.trefypos *591 rnd rnd -382 *816 128 -331 401 -376 dec
-792 inc
-1163 -178 div dec
-1 7 rnd -949
stop
'''''''''Gene 8: Last 'stop' at position 383'''''''''
cond
start
-1 7 -1 7
stop
'''''''''Gene 9: Last 'stop' at position 392'''''''''
cond
store
sub 10 add sub 10 rnd mult dec
rnd mult dec
*268 *650 *969 store
dec
dec
inc
inc
sub mult dec
sub div dec
sub sub store
div sub inc
div sub inc
dec
*50 div sub store
dec
inc
div dec
inc
dec
dec
inc
dec
dec
inc
add 1 sub
stop
'''''''''Gene 10: Last 'stop' at position 449'''''''''
end
You will have to look at it in its natural environment, which goes like this:
Alga minimalis as food, 7 nrg/cycle, cap veggies at 200, day/night enabled - 100 cycles each
Size 6 sim, wrapped around, friction=8, moving factor =.55
Look at what it does, compare to the original FirstBot. I tried checking .up and it always reads back 11, so it's not like bots learned to change their speed directly - they do it in some funky way.
Good luck!
-
How many cycles? and What about mutation rates? Not important just wanna know!
-
Forgot to say thx!
-
This is about 5 million cycles in. It was one continuous simulation, so mutation rates probably mutated a lot. Also, I turn them down every million cycles (now at 1/8).
Update: Opened "mutation rates" for one randomly chosen bot - they are all around 700. So multiply by 8 and get 1 in 5600 for each kind of mutation.
-
Shvarz how on earth does this bot survive? This bot is not able to get any food at all! Dont you think you have choosen the wrong bot?
-
:) Yeah, it sucks... Although it is possible that I picked an especially sucky variant...
Did you use the settings I gave you? Make sure veggies reach their limit in energy and in numbers - this bot needs tons of food. Reseed the bot manually if you have to at first. Have you tried the original FirstBot? Are you saying this bot is worse then the FirstBot?
-
Shvarz this bot is not even able to survive! It cant even shoot! And I tried the exact same settings you gave me, with the newest pure DB? No matter what, it dies in a few cycles, when it has no more energy!?? Or am I doing something wrong? The original bot outperforms this bot!
-
You know, this is VERY interesting! I remember distinctly that I picked a bot that was running happily along and it bumped into a patch of veggies and started eating. Do you think that maybe there is some funky stuff with epigenetic memory? This is quare and scroovy for sure... I thing
Anyway, maybe it was just a bad bot. Here is another one - give it a spin:
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
div *.tielen3 inc
inc
div *.daytime inc
*102 inc
rnd inc
50 743 *.myeye .repro store
369 380 *297
stop
'''''''''Gene 2: Last 'stop' at position 29'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300 add
stop
'''''''''Gene 3: Last 'stop' at position 46'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
53 300
stop
'''''''''Gene 4: Last 'stop' at position 62'''''''''
cond
*.out2 *490 !%=
cond
store
stop
'''''''''Gene 5: Last 'stop' at position 73'''''''''
cond
*.shareslime *180 <
start
1168 *.refvelsx store
*516 *.trefdn *.rdboy -12 rnd *.rdboy *395 sub -12 rnd *553 rnd -12 rnd sub rnd sub inc
*.trefvelyourdx sub sub sub rnd div *790 *387 *.veldx *.rdboy dec
*387 *.rdboy rnd *159 *.sharenrg sub *43 *121 *735 *916 *.mydn rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 dec
rnd -130 dec
rnd *735 rnd -215 *.daytime dec
*615 -1 div -1292 *.pwaste inc
inc
*.pwaste -245 inc
inc
*.pwaste inc
mult *307 div 460 -565 644 -818 1180 store
*273 store
*273 *.aimsx dec
*353 -1179 -1022 dec
store
*948 218 -1203 inc
841 11 dec
847 -549 11 inc
*868 *.trefvelmydx -434 1 div div inc
9 1 354 store
-813 10 add *.trefvelmydx 1 *676 store
*.trefaimsx 11 div 342 store
store
1278 inc
1342
stop
'''''''''Gene 6: Last 'stop' at position 227'''''''''
cond
*.shareslime *.eye8 !%=
start
53 1168 *.refvelsx rnd *652 *553 -12 dec
*.sx sub dec
*.sx sub inc
rnd mult rnd dec
mult 962 *177 *.hitup *735 *.shdx dec
*.trefup *107 -1195 *224 *772 *.trefypos div *772 *606 *.shdn div dec
rnd *735 add rnd *.fixpos inc
*735 rnd inc
div *.refaimdx rnd dec
627 div inc
*.tieloc rnd sub -952 inc
*.treffixed dec
1 store
div -1460 -1291 *.pwaste -505 inc
sub inc
395 -909 add -187 *307 -229 div add mult *.hitsx sub div 460 -565 460 -565 460 -565 div store
div div dec
store
*.backshot *.fixpos 218 -1203 inc
inc
9 dec
*363 *868 *381 inc
*868 *381 inc
div *955 *.trefvelmydn 2 -564 -494 dec
9 -8 1 -354 store
10 add 1 *676 store
11 .up store
store
*415 mult store
*415 1278 inc
1342 *.shdn *40
stop
'''''''''Gene 7: Last 'stop' at position 383'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 rnd *.trefypos *591 rnd rnd -382 *816 128 -331 401 -376 dec
1277 -792 inc
-1163 539 -178 div dec
-1 7 rnd -949
stop
'''''''''Gene 8: Last 'stop' at position 415'''''''''
cond
start
-1 7 -1 7
stop
'''''''''Gene 9: Last 'stop' at position 424'''''''''
cond
store
sub 10 add sub 10 rnd mult dec
*268 *650 *969 store
dec
dec
inc
inc
mult mult dec
sub div dec
sub sub store
div sub inc
div sub inc
dec
*50 div sub store
dec
inc
div dec
inc
dec
dec
inc
dec
div inc
add 1 sub
stop
'''''''''Gene 10: Last 'stop' at position 478'''''''''
end
-
:wacko: :wacko: :blink: Now I have tried on 3 different systems. And none of the bots work??????
ANYONE try it out and see if you do get the same: ie.: bots that just die, because they aint getting any food....
This is indeed extremely strange and interesting!
I am very puzzled! :wacko: :blink: :unsure: :ph43r:
-
Maybe we have found a bug or something. But first lets see if other people get the same results as I!
-
Send us a save game of it shvarz. That should help.
Be sure to zip it.
-
Yes that would help, but it doesnt help us that a bot which is supposed to work doesnt!
-
I just tried both of these out under the conditions listed and under others.
I agree with greven. These things cannot survive...They just don't shoot the veggies under any circumstances that I can find.
They have no .shoot commands or anything stored into location 6 which would do the same thing.
There could be some more obscure method to store a value in .shoot but I haven't been able to make them shoot at all. :(
-
Yes that would help, but it doesnt help us that a bot which is supposed to work doesnt!
Sure it does. It's easier to debug a bot that works than one that doesn't.
-
DARN IT!
My sim crashed and I had no saves - I only saved DNAs, not the whole simulation. Now I tried 4 different DNAs and they are all the same - they don't shoot!!!!
6 million cycles to waste! :(
OK, let's think logically... How a newly-born bot is different from a bot that was just inserted manually? Would it have a different amount of waste? Any memory locations would be different?
-
No, the array is erased entirely isnt it? There must be some explanation on this strange subject!??? Here it would be very nice if we had got the seed value to replay the run!
-
One word: scroovy
-
Aside from memory locations that are inherited through the birth tie, I'm not sure. Perhaps different levels of body.
-
We are all running the same virsion , and no one messed with the source code, the only explonation I see is the bot has some kind of hiddin dna that does not show up anywere on the saves, or that the bot is passing memory locations to its children unlike the bot that was inserted manualy has.
What about saving and loading entire organism , does that work? well nm , the simulation crashed no way to test that...
-
Do you have a snapshot of the sim?
That way at least you can reconstruct each DNA file and try them one by one.
I wonder if waste was building up and making something happen due to saving stuff to random memlocs.
-
Can I manually give a bot more body? Through console?
-
I think so. I never tried. I know it works with energy.
-
nope, does not work.
I guess I'm going to go back in time until I find a robot that works... sad... and curious at the same time. I'll use the autosave feature from now on.
-
Num what memory locations are passed to the offspring? All of them? Or only a few? ANSWER ME DB-GOD!
-
972 through 992 I believe. It was introduced before my time. Definately above 950, and there's ~20 of them.
It is not inconcievable that waste stored a value into one of them, and that value was passed on to children.
-
BTW, I distinctly remember that genes 1-3 were not active. So, don't bother looking at those...
-
Yes there would be if the energy level rises above 20000 or something.
-
OK, I tracked the mutation to somewhere around 4 million cycles. There are two bots, 3.8 and 4.2 and the 3.8 bot is still shooting fine, but the 4.2 does not shoot anymore. Here are the sequences:
3.8 bot (shooting):
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
*.tielen3 sub inc
inc
*.daytime inc
mult inc
50 300 369 380
stop
'''''''''Gene 2: Last 'stop' at position 21'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300
stop
'''''''''Gene 3: Last 'stop' at position 36'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300
stop
'''''''''Gene 4: Last 'stop' at position 51'''''''''
cond
*.out2 *490 0 store
stop
'''''''''Gene 5: Last 'stop' at position 57'''''''''
cond
*.shareslime *180 !=
start
1219 *.refvelsx store
*652 *.rdboy -12 rnd *553 -12 rnd sub rnd sub sub rnd *790 *387 -1173 *.rdboy rnd store
*387 *.rdboy store
*.sharenrg sub *735 *916 *.mydn rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 dec
rnd *735 rnd -215 *.mass dec
*615 -1 div -1292 *.pwaste inc
inc
*.pwaste inc
*595 inc
*307 div 460 -565 644 1180 store
*273 dec
*353 -1179 dec
store
*948 218 -1203 div add inc
841 11 dec
841 -549 11 inc
*868 *.trefvelmydx -434 1 div div inc
9 1 354 store
10 add *.fdbody 1 *676 store
11 .up store
store
1278 inc
1342
stop
'''''''''Gene 6: Last 'stop' at position 171'''''''''
cond
*.shareslime *.eye8 !%=
start
1168 sub *.refvelsx store
*652 *553 -12 dec
*.sx sub rnd mult rnd sub 962 *.hitup *735 *.shdx dec
*735 *107 -1195 *772 *.trefypos div *772 *.trefypos div dec
rnd *.kills rnd inc
*735 rnd inc
*735 rnd 669 inc
*735 rnd sub inc
*.daytime dec
.up store
div -1460 -1292 *.pwaste inc
inc
395 -909 add *803 *307 div add *307 div 460 -565 460 -565 *947 dec
store
*.tie 218 -1203 inc
10 *868 *381 inc
div *.trefvelmydn 1 div 9 -8 1 354 store
10 add 1 *676 store
11 .up store
store
*415 1278 inc
*102 1342
stop
'''''''''Gene 7: Last 'stop' at position 278'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 inc
sub -382 *.vel -331 inc
401 -376 -792 inc
-1163 -178 div 944 -1 7 rnd -949
stop
'''''''''Gene 8: Last 'stop' at position 304'''''''''
cond
start
-1 7 -1 7
stop
'''''''''Gene 9: Last 'stop' at position 311'''''''''
cond
start
store
sub 10 add sub 10 rnd add *650 *969 store
dec
div sub mult dec
sub sub store
div sub store
div sub inc
dec
sub store
dec
inc
div dec
inc
add dec
inc
add 1 sub
stop
'''''''''Gene 10: Last 'stop' at position 353'''''''''
end
4.2 bot (not shooting anymore):
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
*.tielen3 inc
inc
*.daytime inc
*102 inc
rnd 50 *.myeye 300 369 380 *297
stop
'''''''''Gene 2: Last 'stop' at position 23'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
51 300
stop
'''''''''Gene 3: Last 'stop' at position 38'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
53 300
stop
'''''''''Gene 4: Last 'stop' at position 53'''''''''
cond
*.out2 *490 0 store
stop
'''''''''Gene 5: Last 'stop' at position 59'''''''''
cond
*.shareslime *180 !%=
start
1168 *.refvelsx store
*652 *.rdboy -12 rnd *553 -12 rnd sub rnd sub sub rnd *790 *387 *.veldx *.rdboy rnd *387 *.rdboy rnd *.sharenrg sub *121 *735 *916 *.mydn rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 dec
rnd -130 dec
rnd *735 rnd -215 *.daytime dec
*615 -1 div -1292 *.pwaste inc
inc
*.pwaste inc
inc
*.pwaste inc
mult *307 div 460 -565 644 -818 1180 store
*273 dec
*353 -1179 dec
store
*948 218 -1203 inc
841 11 dec
841 -549 11 inc
*868 *.trefvelmydx -434 1 div div inc
9 1 354 store
10 add *.fdbody 1 *676 store
11 342 store
store
1278 inc
1342
stop
'''''''''Gene 6: Last 'stop' at position 177'''''''''
cond
*.shareslime *.eye8 !%=
start
1168 *.refvelsx store
*652 *553 -12 dec
*.sx sub inc
rnd mult rnd dec
mult 962 *.hitup *735 *.shdx dec
*735 *107 -1195 *772 *.trefypos div *772 *606 *.trefypos div dec
rnd *735 rnd *.fixpos inc
*735 rnd inc
div *735 rnd 669 div inc
*.tieloc rnd sub -952 inc
*.daytime dec
.up store
div -1460 -1292 *.pwaste inc
inc
395 -909 add -187 *307 div add *307 div 460 -565 460 -565 460 -565 div store
dec
store
*.tie 218 -1203 inc
10 *363 *868 *381 inc
div *.trefvelmydn 1 div 9 -8 1 354 store
10 add 1 *676 store
11 .up store
store
*415 1278 inc
1342 *.shdn
stop
'''''''''Gene 7: Last 'stop' at position 294'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 rnd rnd -382 *816 -331 401 -376 -792 inc
-1163 -178 div dec
-1 7 rnd -949
stop
'''''''''Gene 8: Last 'stop' at position 319'''''''''
cond
start
-1 7 -1 7
stop
'''''''''Gene 9: Last 'stop' at position 326'''''''''
cond
store
sub 10 add sub 10 rnd add dec
*268 *650 *969 store
dec
dec
inc
inc
sub mult dec
sub mult dec
sub sub store
div sub inc
dec
*50 div sub store
dec
inc
div dec
inc
add dec
inc
add 1 sub
stop
'''''''''Gene 10: Last 'stop' at position 373'''''''''
end
-
It is because bot 4.2 is missing its 'start' command in gene 9.
In both bots, gene 8 is -1 7 -1 7, which is -1 .shoot, by the gene 9, we have a store command, which stores -1 in the memory location 7 (.shoot), I think if the bots are allowed to run through this mutation (losing the start) it is okay for the program, but if you try running it again, it will malfunction.
I have just tested bot 4.2 with a start, and it confirms my theory, if you put a 'start' in gene 9, the bot works perfectly!
-
I think the problem comes from the lack of a "start" block in gene 9. My hypothesis: "start" was replaced by a shadow "start" block, which still functions but doesn't get saved or printed. Num or PY can probably figure out if and how such a thing is possible.
Edit: damn, Greven beat me by a minute!
-
LOL! NOW I should get my master in DB! ;)
Okay maybe I should just start out with a bachelor?
-
Good detective job, guys!
Well, we can go back to that bot I posted before and look at how it slows down after running into food.
-
Well it slowes down because its apperantly it has less mass (by mass I mean the stuff used in the collision forumla) then the vegs. Now we have to figure out how does it keep itself so skinny.
I also want to point out that this robot does not reproduce , it kills off all its babys , looks to me that it is giving no energy to its babys. (another bug in the dna source?)
-
Reproduces fine for me. 50/50
-
I also want to point out that this robot does not reproduce , it kills off all its babys , looks to me that it is giving no energy to its babys. (another bug in the dna source?)
Yes, there's another bug to correct: in gene 4 the superfluous 'cond' should be a 'start'. This way gene 4 is always activated (because 0 0 !%= is true) and it reproduces with 53 300 store. Otherwise, it reproduces with *.myeye .repro store...
-
K thx
-
Another update: I am at around 9 million cycles. The bots are at about 14 genes now. I just wanted to comment about a surprising amount of active genes in these bots. Out of 14 genes only one gene is permanently inactive. Nine genes are permanently active. Four genes are activated during reproduction (and one gene from the active nine is inactivated during reproduction).
Don't you think it is surprising? I mean, if genes are redundant (or junk) then they are very likely to become inactived and turn into complete junk. Yet they are still active, which to me suggests that they are doing something, they are increasing fitness of bots.
-
Try randomly removing some active genes and see if the behavior changes at all. Especially with the stak nature of the program, even a gene that just puts 50 on the stack can be useful.
-
Ahm, too much work :)
Maybe when I get tired of evolving this thing...
I can post it here though, if anyone is interested.
-
Yes, post it please!
-
Attached.
-
Are you sure it's the right file ? It has only 10 genes and two of them are syntactically invalid (4 and 5).
-
More weidness... The bots in the sim have 14-15 genes. The bots in the snapshot have 10-11 genes. Something's messed up for sure. I saved one of the bots as an organism, I'll attach it here. It had 15 genes in the sim, try it and let me know what it looks like.
-
An update: it turns out that even in the sim the bot has 10 genes, but when I click "show activations" - there are 15 genes in there. So probably something is messed up there.
Nums, PY, are you reading this? Another bug!
-
Looks like there is another bug too.
I can't load the organism file without it totally crashing DB.
How about just posting the DNA.
-
Good thing I did not try that. Here is another random-picked bot from the sim:
cond
*.nrg 20536 >
*.nrg 20536 !%=
start
div *.tielen3 inc
inc
div *.daytime inc
*102 inc
inc
*133 rnd inc
50 743 *.myeye .repro store
369 380 *297
stop
'''''''''Gene 2: Last 'stop' at position 30'''''''''
cond
*.nrg 20536 >
*.nrg 20012 !%=
*.nrg 19616 !%=
start
inc
51 300 add
stop
'''''''''Gene 3: Last 'stop' at position 46'''''''''
cond
*.nrg 20536 >
*.nrg 20536 !%=
*.nrg 20536 !%=
*.nrg 19616 !%=
start
inc
53 300
stop
'''''''''Gene 4: Last 'stop' at position 64'''''''''
cond
*.out2 *490 !%=
cond
store
!%=
cond
store
stop
'''''''''Gene 5: Last 'stop' at position 74'''''''''
cond
*.out2 *490 !%=
cond
store
!%=
cond
store
stop
'''''''''Gene 6: Last 'stop' at position 84'''''''''
cond
*649 *.hitsx <=
*.shareslime *180 <
start
1168 *.refvelsx add *516 *.refpoison *.rdboy -12 rnd *.rdboy *395 sub -12 rnd *553 rnd -12 mult sub rnd sub inc
*.trefvelyourdx sub sub sub rnd div *.refdn *640 *387 *.veldx *.rdboy dec
*387 *.rdboy store
rnd *387 *.rdboy rnd *387 *.rdboy rnd *.robage *159 *.sharenrg sub *43 *121 *735 *916 *.mydn sub rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 div rnd -130 sub rnd -130 sub rnd *735 rnd -215 214 775 *.daytime dec
*615 -1 div -1292 *.pwaste inc
inc
*.pwaste -245 inc
inc
*.pwaste inc
mult *307 div 460 -565 644 -818 1180 store
*273 store
*273 *.aimsx rnd dec
*353 -1179 -1022 dec
*872 store
*948 218 -1203 444 inc
841 *781 11 dec
847 -549 11 *.sharewaste inc
*868 *.trefvelmydx -434 0 div div inc
9 mult 1 354 store
-813 10 add mult *.trefvelmydx 1 698 *676 rnd *.trefaimsx 11 div 342 store
store
1278 inc
1342
stop
'''''''''Gene 7: Last 'stop' at position 254'''''''''
cond
*.shareslime *.eye8 !%=
start
*.tieval 53 1168 *.refvelsx rnd *652 *553 -12 dec
*.sx sub dec
*.sx sub inc
rnd mult rnd dec
88 mult 962 *177 *.mysx *617 *735 *.shdx add *.trefup *107 -1195 *224 *676 *772 *.trefypos div *772 *606 *.shdn div inc
dec
rnd *735 add rnd *.fixpos inc
rnd *.fixpos inc
rnd *735 rnd rnd *44 div rnd rnd div mult *.refaimdx rnd dec
sub *.refaimdx rnd dec
630 add div add dec
627 div inc
*.tieloc rnd sub -952 inc
*435 *.treffixed inc
.up store
div add -1460 -1291 *.bodloss *.pwaste -505 inc
sub store
396 -909 add -187 *307 -229 div add *.veldx mult *.hitsx sub div 460 -565 460 -565 460 -565 div store
div div store
*.backshot *.daytime store
218 -1203 inc
inc
9 div dec
*363 *868 *381 inc
*868 *381 add div *955 *288 *.trefvelmydn 2 -564 -494 dec
9 -8 1 354 store
10 add 1 *676 store
11 .up store
store
*415 mult 1581 store
*415 1278 inc
1342 *.shdn *40
stop
'''''''''Gene 8: Last 'stop' at position 431'''''''''
cond
start
*.tieang2 *591 inc
*.trefypos *591 sub *.trefypos *591 rnd *175 rnd *162 rnd *.shdx rnd -382 *816 128 -331 401 -376 div dec
401 -376 dec
1277 -220 -794 inc
1163 store
539 -178 div 1465 dec
1 store
7 rnd rnd -949
stop
'''''''''Gene 9: Last 'stop' at position 477'''''''''
cond
start
-1 7 -1 7
stop
'''''''''Gene 10: Last 'stop' at position 484'''''''''
cond
start
store
sub store
sub sub 10 add sub dec
10 rnd mult dec
*268 *650 sub *969 store
dec
dec
inc
inc
mult mult dec
inc
div dec
inc
div dec
sub sub store
div sub inc
div sub -300 inc
dec
mult *50 div sub rnd dec
inc
div dec
rnd inc
dec
mult dec
inc
-464 dec
div inc
add 1 sub
stop
'''''''''Gene 11: Last 'stop' at position 551'''''''''
cond
start
store
sub sub 10 add sub dec
10 rnd mult dec
*268 *650 sub *969 store
dec
dec
inc
inc
mult mult dec
inc
div dec
sub sub store
div sub inc
div sub -300 inc
dec
mult *50 div sub rnd dec
inc
div dec
rnd inc
dec
mult dec
inc
-464 dec
div inc
add 1 sub
stop
'''''''''Gene 12: Last 'stop' at position 613'''''''''
end
It shows up in my sim as having 15 genes.
-
So I am gessing nothing interesting is happening because Shvartz is getting tierd.
The Bot just moves arround junk , and still just moves in straight lines and shoots...
Were is the evolution? <_<
And by the way the most resently posted robot (in the quote) runs backwords and does not feed at all :unsure: :blink: (I am sure it does not do that in shvartz simulation)
-
You cant beat reading somthing like this:
cond
*.out2 *490 !%=
cond
store
!%=
cond
store
stop
What am I supposed to do with that?
:sleep:
-
I'm guessing this stuff (multiple conds in same gene) is what makes the program beleive that there are 18 genes instead of the actual 12.
Yeah, the bot learned to slow down whenever it hits something (usually food) and does not evolve any further. The fact that the program's mutation routine is messed up does not help either... The good news is that it has tons of DNA now and most of the genes are not junk, but are active genes. I think the current bot is good enough to survive in the current sim and that's why it is stuck in evolutionary pathway. So I am going to try and create some more selective pressure for it. After all, right now the bot's population does not follow the "up and down" curve that is indicative of a good selective pressure.
So, yes, I am getting tired, but I am still far away from giving up!
-
The problem that I found was that any robot not travelling parralel to all the others just gets trashed the moment it steps out of line and crosses the strafing path of the others. Maybe we shouldn't have started with a bot that shoots all the time.
-
PY, my point for this whole thing was to start from as simple as possible.
I think shoot all the time was as simple as possible.
Atleast now you can see why I was going crazy saying that we need a better mutations code and stuff, its just so mutch stuff this robot needs to learn to do and the dna is going through a lot of chance to find it. This 916 *.mydn sub rnd *.shootval *.shdx mult *735 *372 *768 rnd inc
446 -130 div rnd -130 sub rnd -130 sub rnd *735 rnd -215 214 775 *.
is what the currant mutation system gives you.
And beleave me to write somthing better without hurting the math; (just basic conditions and basic instructions) is difficult.
-
I actually think this part of mutation routine is working fine - we are getting all sorts of mutations. What needs to be fixed is the abnormal syntax.
As for PY's point - I am now increasing the size of the sim and leaving the same amount of veggies, so food and bots will be more dispersed. I am at size 9 now and I am already seing bots running in many more than a single direction.
-
Atleast now you can see why I was going crazy saying that we need a better mutations code and stuff
I would agree that it needs to be refined some and possibly improved a little but I still say that essentially it all works fine.
With your start bots, it isn't that they never develop turning abilities. I have seen several do so. The problem is that these mutations are very quickly killed by the other bots in the sim. They have a very distinct evolutionary disadvantage. based on the parameters of the sim
I set up the program using scripts to pause the game and highlight the bot whenever one of them developed an aimsx or aimdx command.
Quite a lot did but they all died within seconds when they started crossing the lines of fire of all the other parallel bots.
The problem with DB is not the mutation code.
The problem is with the complete and utter lack of any kind of variability in the DB universe. In a universe where a bot can cross the whole screen in a matter of seconds and settings where straight liners can survive, (ie loads of veg) they very quickly become parallel as one directional strain becomes dominant. Did you notice that at first they are going in all directions? At this point evolution strongly favors conformity. Any deviants are quickly destroyed.
Again NOT a problem with mutation but actually a very good demonstration of a bot adapting perfectly to an environment and then sticking to it. Evolution at its best.
-
Good Points PY,
Yea well, shvartz has not givin up yet so lets whst happens.
[Post from a T1 line, library 16million , $$ :P]
-
Actually, the reason why straight liners have an advantage, even when they aren't all going in the same direction, is that they're able to push veggies in front of them.
That's a bug of the physics model that should be corrected (perhaps, it's done already?)
-
It was fixed once and not so long ago either. It seems to have got screwed up again :(
-
What do you mean "push veggies in front of them"? Are they not supposed to push a veggie if they run into it?
-
Only if the veggie is directly in front.
If it is even slightly off center then the difference between the direction of movement and the vector angle from robot to veggie should quickly result in the veggie being pushed to the side.
Right now that doesn't happen. The veggie just stays in front and moves on the same vector as the robot after a collision. This even happens when the veggie is quite visibly off center and the shots are missing it entirely.
-
An update and some ideas:
I've decided to give up on evolving firstbot. I pushed the bot too far and the current population died out. The bots that were saved in "snapshots" are not usable, they have these weird mutations with incorrect syntax of DNA. I tried to fix them, but I can't. I am just going to wait for the new version and maybe restart the evolution from scratch.
Here is what I think about the experiment so far: aside from incorrect syntax the mutation routine works nicely. The biggest problem is that the environment is too small -next time I'll start with size 12 right away. Should we consider making even larger environments possible? Maybe.
I also think there is a potential problem (I am not sure if this is a problem) with the way bots mutate and evolve. Consider this: when we program bots we write "a b store". Bots never evolve things like this. They go through complicated scenarios often involving several genes. Numbers are placed on stack, manipulated in many different ways and finally they are stored into memlocs. As a result the code becomes quite unmutable - even a slight modification in such a long and complicated sequence of events results in a totally messed up code. This puts bots into evolutionary dead-ends, don't you think?
-
How could this problem be corrected though?
Could you sort of have mutations of patterns rather than individual commands? So instead of just inserting one command it would insert a pattern from a whole collection, like 'a b store' where a and b are random variables or values. That would make sure the sequence for storing a value would be contained in one gene, and would mean that it would be more tolerant of other mutations.
-
As I said, I'm not even sure if this is a problem, so I don't know if we should try to correct it. Your approach would help, but it goes against the evolutionary principles. And it reduces the chances of seing something new emerge.
Maybe not allowing genes to communicate through a stack?
-
So every time a gene terminated the stack would be cleared? Wouldn't that just make it even harder for bots to evolve any new sequences? The 'problem' doesn't seem to lie in the fact that genes can use values on the stack from other genes but that it always goes that way. I suppose with all the random alterations that right value will get to the right memory address at some point but as you said any further errors are catastrophic as they mess up the whole chain.
What exactly are the evolutionary principles that DB is modelled after anyway?
-
Good things come to those who wait
-
As I said - I am not even sure if this is a problem. Maybe it's not. I just want to hear what other people think about that before we start inventing ways to "fix" it.
Just to repeat:
we write code:
10 .up store
quite succeptible to optimization/evolution. It can slowly change to 11, 12, 13 and so on if evolution favors it.
evolution writes code:
sqrt(38x278^2-100)/171 .up store
and all these operations can happen in different genes, involve numbers moving up and down the stack certain number of steps and so on. As a result, any small change along the way results in a huge change in what is being stored into .up. And the robot with such mutation dies. So this piece of code is "unmutable". Moreover, all the code that is in between (and which does not really relate to storing anything in .up) is also in many ways unmutable, because addition/removal of any new commands would affect the stack and mess up the ability of a bot to move.
Is this a problem, or I am not making any sense?
-
I would say it is a problem for the robot but not for the program.
If a robot has evolved such a complex bit of DNA that any (major) change to its sequence will result in the death of the robot then we simply have an evolutionary dead end.
We may feel sorry for the afflicted robot but in the grand scheme of things it's just tough luck.
-
I agree with [PY] in that it is a problem for the bot but in program terms it isn't anything that shouldn't happen. I remember reading that genes in DNA can activate or deactivate other genes but this is not the same thing I guess.
But isn't it 8 or 9 times out of 10 that bots will get this kind of complex sequence? Would it be 'interfering with evolution' to get a bot's DNA after a certain time, simplify it and then put it back in the sim?
-
What troubles me for a while already is why are robots evolving this complex nonsence instead of evolving normal code. Is'nt it an evolutionary disadvantage? causing robots to go to an evolutionary dead end? But yet robots evolve it anyway... They have a chance to evolve normal code but they don't...
-
I mean , have we not gave it enough time? , because: DNA is mostly random junk too, But some specfic mutations can make dromatic changes.
-
Robots evolve code that works. That's all evolution cares about. It does not matter how much junk you have and how many steps you have to go through to get something done as long as you get it done.
-
I think the trouble is that DB DNA is a mathematical language so we are mutating different routes by which we can reach a usable mathematical function.
For example sqrt(sqrt(16^2)) is 4 but change any one of the parts and it changes dramatically. Sqrt(sqrt(16^3)) is now equal to 8
Sqrt(sqrt(16^4)) is now equal to 16
Sqrt(sqrt(16^5)) is now equal to 32
Changing this one number has an exponential effect on the final result.
With real DNA you shouldn't get the same level of compounded difference when you change a single small part.
Another point is that real DNA has a very small number of possible values for each point. The complexity is made up by using longer strings of these values. This allows for a massive number of small gradiations that can do more or less the same thing. (correct me if I'm wrong here. I am no Biologist)
In DB we have macro commands which are simply swapped out in their entirety. One single command such as .up is probably the equivalent of a few hundred (or even thousand) base pairs.
Changes in DB are often catastrophic rather than gradual so it is easier to get up a dead end with no way out. The only way out is often to precisely retrace the steps that got you in there in the first place.
In short any kind of mutation that has no direct effect on the way a bot lives, will not be selected against but in later generations it can become largely imutable (as Shvarz said earlier) as any change to it just ...
a.) increases complexity still further but without improving the general fitness.
b.) increases complexity while decreasing general fitness.
I think one possible problem with DB is that the genome always tends to get longer, very quickly. ie. there aren't enough possibilities to delete data points in the evolution code.
-
Whenever I start a sim I set the delete and change mutations to have a higher probability than the others because I think they lead to more useful muations.
I still think pattern mutations are a solution as in DNA bases are read in patterns, I.e. groups of 3.
-
That is pretty much what we do most of the time. "Insert a new condition" will add a 3 part condition and so on.
Of course we can still add or delete single points too.
-
Yea how about insert a new command with complete numbers with the proper range, the label itself and the store command. ex:
-1 .shoot store 'inserted as a whole
25 .aimdx store 'inserted as a whole
I agree with PY on:
Of course we can still add or delete single points too.
And it can change it to out of range if it wants to.
And If you really start to talk about complete numbers with proper range , then insert a new instruction should do range checking as well.
But, If you REALLY want numbers to (almost) always be in range, then good luck , its one bloody long select case to write for each bloody sysvar, I am not doing it :P
-
Yea how about insert a new command with complete numbers with the proper range, the label itself and the store command. ex:
-1 .shoot store 'inserted as a whole
25 .aimdx store 'inserted as a whole
It does exactly that now. I wrote the code myself and tested it. Originally it did this but not very efficiently. Now it inserts the entire condition or command with values in the right ballpark for them to work.
Of course we can still add or delete single points too.
And it can change it to out of range if it wants to.
Yes to a degree it can go out of range, however it is designed to keep the value being mutated, somewhere close to the original value
And If you really start to talk about complete numbers with proper range , then insert a new instruction should do range checking as well.
It does, to a dgree. You can't expect it to be in exactly the right range to work perfectly. For example, the value stored into .aimsx can be in pretty much any range as long is its magniude is less than 32000. However .fixpos (and some others) can only take zero and non-zero as inputs. so if the line...
187 .aimsx store
should mutate to
187 .fixpos store
You can't expect the code to also change the 187 to something meaningful by searching a massive database of suitable ranges.
If the robot evolves such a crappy line of code then it is just going to fix itself to the spot and die. Tough! That's evolution for you.
But, If you REALLY want numbers to (almost) always be in range, then good luck , its one bloody long select case to write for each bloody sysvar, I am not doing it
You certainly have that right!
But then again I am still waiting to get my hands on a working version of the new code that Num is working on. The stuff he has already given me is so radically different from V2.36.7 that I don't know where to start with debugging it until it is at least mostly working. I would estimate that he is totally re-writing about 10% of the entire code.
-
Good Work, Lets release that version and see what happens. Personally I can’t wait to try it out myself:
I came up with an ultra new ultra hyper way to evolve first bot, but guess what? in the current version this ultra new method crashes the simulation. And the error is so deep in the source code, good luck finding it. (its something to do with not finding some kind of dna term and searching beyond the ubound of the dna stack)
Anyway here is exactly what I was doing and plan to try again (hopefully that error will be fixed, if Num or PY care enough to experiment with the following them selves):
I set plants with no mutations, and First bot with mutations about "200!" <--don’t get scared I gave them a good chance to survive because:
After checking and unchecking F1 mode, I set the number of plants to be displayed on the screen at start up to be "400!". The idea is the robot will mutate and reproduce like crazy, then the plants will stabilize back to F1 conditions, and only the best robots from the ~300 on the screen will stabilize to ~60. (If natural selection indeed exists, and there got to be some mutations that ended up better, not worse, then we should get a better resulting robot.)
The problem is when the robot population goes over ~100 the simulation crashes, I also see robots with birth ties / ties, when moved from one side of the screen to the other (on the borders) , the ties stretch out for a second all the way across the screen. I mean just by looking on this entire picture you know something’s gunna crash any second now...
-
Good Work, Lets release that version and see what happens. Personally I can’t wait to try it out myself:
:blink:
Already did. Ages ago. It was called V2.36.7. I actually modded the mutations code back in 2.36.2 though. <_<
Num may have changed things a little for .7 but I don't think he got that far into it.
The source code is even up there on both servers. Check it for yourself.
-
Then why is Shvartz having trouble with my little first bot? :/
Shvartz:
Consider this: when we program bots we write "a b store". Bots never evolve things like this. They go through complicated scenarios often involving several genes. Numbers are placed on stack, manipulated in many different ways and finally they are stored into memlocs.
-
Then why is Shvartz having trouble with my little first bot? :/
Shvartz:
Consider this: when we program bots we write "a b store". Bots never evolve things like this. They go through complicated scenarios often involving several genes. Numbers are placed on stack, manipulated in many different ways and finally they are stored into memlocs.
This is complete bollox! :angry:
The robots can and do evolve stuff like a b store.
They evolve it in a single step too.
The "insert command" function makes a space of 3 positions in the DNA array, then it randomizes a value and a sysvar and sticks a store on the end and shoves it all into the space it created
Result = a b store
If the robots are not doing this then somebody has fucked up the code in the last release because I spent a lot of time making sure that this is exactly what would happen!
-
Went on vacation for a few days, now I'm ready to come back and face the new problems.
Bots will sometimes evolve a b store, I've seen it in the more recent versions, but you must remember that it's rather rare for any kind of massive run (3 whole commands!) to be useful at all since they're just picked at random.
Here's the way I see it. Yeah, a bot that evolves a complex function to just get 4 seems odd. But remember that the store statement takes the top two values in the stack, and doesn't care how it gets them.
So suppose we call our 500 command function f(x). we have f(x) b store. A new mutation may insert an "a" after f(x), making it f(x) a b store, which entirely overrides the whole 500 command f(x). If the "a" is doing what f(x) used to, f(x) will slowly degrade into something else, maybe junk, maybe useful. If a single command like that can't replace the whole f(x) thing, then f(x) is obviously doing something that's important.
So I definately don't see this as a problem, since a single mutation can replace large sections of code. The easiest way to "fix" it so that larger DNAs are selected against is to incurr some built in costs on DNA replication. Not incredibly difficult to set up and be user definable.
About genes communicating via the stack: assuming you view this as undesirable (depends on what you're trying to do of course) we could implement a clearst command that erases the stack. Bots can evolve them or no depending on their usefulness.
Also, the chromosome idea I proposed would allow for seperate stack threads so you can evolve several different DNA threads that can't communicate through the stack except within the same chromosome.
As to the evolution of Bot's bot, I would try running a sim with Zero Momentum mode and largest sim size. Just decrease costs until the bots can survive (they can definately survive if nothing costs any energy, so there must be some cost level they can survive on), and then instead of increasing physics constants, increase the costs. That would select for efficiency.
I'll implement an optional cost-per-DNA-unit (either per reproduction or per cycle) so we can play with downward selective pressure on DNA length.
-
Num, I cant figure this errors out. Can you try the stuff I am talking about: http://s9.invisionfree.com/DarwinBots_Foru...ndpost&p=850925 (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=589&view=findpost&p=850925)
in that post.
I did not mess with the source code before I got it. But I did debug it, its somthing about searching then dna beiond the ubounds.
As for everything Num and PY have sayed. I totaly agree.
-
Num, I cant figure this errors out. Can you try the stuff I am talking about: http://s9.invisionfree.com/DarwinBots_Foru...ndpost&p=850925 (http://s9.invisionfree.com/DarwinBots_Forum/index.php?showtopic=589&view=findpost&p=850925)
in that post.
I did not mess with the source code before I got it. But I did debug it, its somthing about searching then dna beiond the ubounds.
I have no idea. I've totally rewritten alot of the DNA parsing routines (consolidating alot of functions inthe process) so I'm not even sure it's relavent anymore.
Does it happen with the latest official release? If you can reproduce a bug in that, then I can see if it's real or not. Otherwise I'm at sort of a loss.
-
omg , I toled you what I did in the latest release to get this bug.
All you have to do is follow my instructions and reproduce it for yourself.
Is it so hard?
...
yea lol , dont forget to reproduce it from visual basic and not from the compiled virsion, other wise there is no way to debug it. :)
...
Edit: Bots is in a sarcastic mood tuday , do not ask.
Edit: I cant really call it sarcasm bc all my directions are lagit, unlike my spelling...
-
I may have fixed whatever the problem was, I'm not sure. It's been a while. I don't have access to the source code or VB until Wednesday to check it.
-
ok , it worked this time for some reason (is this twihlight zone?)
anyway this ultra new method is yet another one out the window:
The survivors of the prosses were a bunch of fat basterds that did not reproduce at all. :wacko:
-
What you need is some phazon infused funguses.
:D
Been playing some Metroid Prime...
-
OMG lol total change of original topic but have you played Metroid Prime 2?
-
Not yet, I only have access to the first.
-
OK back to the TOPIC:
I am currently running a simulation the way shvartz is running them exsept I use F1 settings, and I finaly got some resolts. Ofcorse I got a robot with too mutch junk dna. But this robot does somthing special. When the robots spawn at random angles at the biggining of the simulation , this one learns to turn in the most productive direction , and keeps that direction for all the future robots it produces. Basicaly it turns.
-
ok had to restart that one , after a while they all just died. The program saved the simulation as the ecosystem was dieing, and the next run we had unreproducteble robots so that was the end of that.
Then I was saving the robot only if its truly the "goodest" robot ever to exsisit.
During robot life every second it gets fittests top means:
(good = good + totrobs + totchilderen) for that robot
And I stombled on a really freaky problem of the auto save just frezzing over after about 30 minutes.
Thats when this anti Mueller's Ratchet radiation idea came to mind. Then I was getting autosaves that died out after a longer time then usual, so I went ahead and maid a chart to see whats going on: Looks like the stockmarket mixed with a plot of rnd mixed with somthing like: 1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 3 0 1 0 2... know there is a math name for this kind of progression but I don't know the name. So Its a really freaky looking graph because you have a feeling that there is a relationship in the progression , but you cant really figure out what it is.
Generaly the more evolved the robot , the more time it takes to evolve further, atleast thats true so far. Scarry thing is, if you look back on the1 0 2 0 1 0 3 0 1 0 2 0 1 0 4 0 1 0 2 0 1 0 3 0 1 0 2
replace all the 1 with n and all the 4 with b
n creaps slowly to zero over time while b slowly increases (now at 600)(maxed lest run on 1421)
so that means that n can hit zero in this system as well therefor all my robots will die.
there is more to this , for example: what happens when b is too high and n is too low compared to the general relationship of n to b, then the graph looks like its balancing itself out progressing as a stockmarket mixed with saw look, with each saw peace lower then the one before or higher based on what kind of prgression curve it is. <-- this curve has nothing to do with the curve of n droping or b rising btw.
So if you can imagine a fine mix of all that (the mix might also be following some kind of hiddin rules of mixing) you might get a pritty good idea how confusing this graph looks. Its right at the point were it is prodictable but its not , can make a skitzo out of anyone just by explaning this to them.
:P
(http://img220.imageshack.us/img220/638/gg5qb.th.gif) (http://img220.imageshack.us/my.php?image=gg5qb.gif)
-
Try lowering the resolution on the graph so it doesn't go up and down as much. Like average the y values for an interval over x. Should make it easier to see a general pattern.