Bots and Simulations > Evolution and Internet Sharing Sims
Shvartz, can you help me out?
shvarz:
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):
--- Code: ---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
--- End code ---
4.2 bot (not shooting anymore):
--- Code: ---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
--- End code ---
Greven:
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!
Sprotiel:
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!
Greven:
LOL! NOW I should get my master in DB! ;)
Okay maybe I should just start out with a bachelor?
shvarz:
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.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version