Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Testlund on April 06, 2008, 01:43:44 AM
-
Can somebody tell me why this bot refuses to multiply? It has worked before so I take it something changed in later drops so the DNA isn't compatible. Everything else seems to work.
'Gene 1. Reproduction
Cond
*.nrg 10000 >
Start
50 .repro store
100 .aimdx store
'Gene 2. Attach to parent
start
*.robage 0 =
.tie inc
.shoot .ploc store
stop
'Gene 3. Delete a tie if more than 2
Cond
*.numties 2 >
Start
.deltie inc
stop
'Gene 4. Simple search pattern 1
start
*.eye3 *.eye5 >
-25 .aimdx store
stop
'Gene 5. Simple search pattern 2
start
*eye7 *eye5 >
25 .aimdx store
stop'Gene 6. Feeding
Cond
*.eye5 40 >
*.nrg 3000 <
Start
*.refeye *.myeye !=
-1 .shoot store
stop
'Gene 7. Avoid conspecifics
start
*eye5 0 >
*.refeye 6 =
100 .aimdx store
stop
'Gene 8. Delete ties to Spread out better
Cond
*.nrg 1000 <
Start
.deltie inc
stop
'Gene 9. Store slime
cond
*.nrg 2000 >
*.slime 50 <
start
1 .mkslime store
stop
'Gene 10. Store poison
cond
*.nrg 7000 >
*.poison 50 <
start
1 .strpoison store
stop
'Gene 11. Fixes some forgotten error
*.eye5
stop
-
I found that the program changes the DNA after I start a sim! It puts 0's in front of some genes. This is what the dna looks like in the program:
0 *.nrg 10000 >
0 50 .repro store
100 .aimright store
'''''''''''''''''''''''' Gene: 1 Begins at position 12 '''''''''''''''''''''''
start
*.robage 0 =
.tie inc
7 .ploc store
stop
'''''''''''''''''''''''' Gene: 1 Ends at position 21 '''''''''''''''''''''''
0 *.numties 2 >
0 .deltie inc
stop
'''''''''''''''''''''''' Gene: 2 Begins at position 30 '''''''''''''''''''''''
start
*.eye3 *.eye5 >
-25 .aimright store
stop
'''''''''''''''''''''''' Gene: 2 Ends at position 37 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 3 Begins at position 38 '''''''''''''''''''''''
start
*0 *0 >
25 .aimright store
stop
'''''''''''''''''''''''' Gene: 3 Ends at position 45 '''''''''''''''''''''''
0 *.eye5 40 >
*.nrg 3000 <
0 *.refeye *.myeye !=
-1 .shoot store
stop
'''''''''''''''''''''''' Gene: 4 Begins at position 61 '''''''''''''''''''''''
start
*0 0 >
*.refeye 6 =
100 .aimright store
stop
'''''''''''''''''''''''' Gene: 4 Ends at position 71 '''''''''''''''''''''''
0 *.nrg 1000 <
0 .deltie inc
stop
'''''''''''''''''''''''' Gene: 5 Begins at position 80 '''''''''''''''''''''''
cond
*.nrg 2000 >
*.slime 50 <
start
1 .mkslime store
stop
'''''''''''''''''''''''' Gene: 5 Ends at position 91 '''''''''''''''''''''''
'''''''''''''''''''''''' Gene: 6 Begins at position 92 '''''''''''''''''''''''
cond
*.nrg 7000 >
*.poison 50 <
start
1 .mkpoison store
stop
'''''''''''''''''''''''' Gene: 6 Ends at position 103 '''''''''''''''''''''''
-
0s means the program had no idea what command you were trying to use. It's the program's way of saying "no comprende". If you write a bot, always look at its DNA in the program and search for 0s, because they're usually typos on your part.
In your case, your cond's were capitalized. It needs to be cond, not Cond. Likewise Start isn't a valid command.
-
In your case, your cond's were capitalized. It needs to be cond, not Cond. Likewise Start isn't a valid command.
I've added code a while back so that sysvars are case insensitive, but I never did it for flow and other commands. I'll add that the next drop to avoid this kind of thing in the future...
-
I would never have guessed, but now that you mensioned it I think I remember you posted about it some time ago.