Darwinbots Forum
Bots and Simulations => Bot Tavern => Topic started by: Testlund on August 22, 2012, 07:57:48 PM
-
Can someone tell me why this bot doesn't shoot when it's NRG reach above 1000?
*.nrg 1000 >
314 rnd .aimright store
-2 .shoot store
It just sits there.
-
Is that the only DNA in the bot?
I don't remember exactly, but it might need a start command at the beginning to enable stores. We had a debate over whether it should be necessary, and I don't remember what was decided.
-
Yeah, it's the only DNA. I thought it was a long shot, but I DID try to add cond and start commands but that only turned up as zeros in the dna in the sim. I know you got rid of the need for those a long time ago. I've tried two different bots with different numbers. Same result.
-
Here is a screenshot. As you can see I've set this one to shoot energy when it reaches 32000.
-
Try this robot, see how it works for you:
start
*.nrg 1000 >
314 rnd .aimright store
-2 .shoot store
I DID try to add cond and start commands but that only turned up as zeros in the dna in the sim.
weird, that's not supposed to happen, I just downloaded a copy and tried myself, the start command was fine, did you miss-spell something?
-
Yes, that works! Thanks.
-
I DID try to add cond and start commands but that only turned up as zeros in the dna in the sim.
weird, that's not supposed to happen, I just downloaded a copy and tried myself, the start command was fine, did you miss-spell something?
I tried this code:
Cond
*.nrg 1000 >
start
314 rnd .aimdx store
-2 .shoot store
stop
end
...and it turned into this code in the sim:
0 *.nrg 1000 >
'''''''''''''''''''''''' Gene: 1 Begins at position 5 '''''''''''''''''''''''
start
314 rnd .aimright store
-2 .shoot store
stop
'''''''''''''''''''''''' Gene: 1 Ends at position 13 '''''''''''''''''''''''
...and the bot immediately started shooting.
I remember now that Eric removed the need for these so when you added old bots with "Cond" they would turn to 0.
"Start" works though.
-
That's because darwinbots in currently case sensitive. :P
Just try:
start
*.nrg 1000 >
314 rnd .aimright store
-2 .shoot store
This should work as well:
cond
*.nrg 1000 >
start
314 rnd .aimdx store
-2 .shoot store
stop
end
I will make DB case insensitive with the next release if you like
-
I will make DB case insensitive with the next release if you like
No need for that now when I know, unless someone else think it is needed. :)
-
I'll consider it again when I work on the chloroplast version.
-
Messing with case-sensitivities might break old robots that used different cases for user definitions.
I vote to not change; looking at the dna in the program will show case errors easily enough like in the post above.
-
We are breaking old robots anyway when we add new memory locations for chloroplasts.