Darwinbots Forum

Bots and Simulations => Bot Tavern => Topic started by: Testlund on August 22, 2012, 07:57:48 PM

Title: Simple NRG shooting bot problem!
Post 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.
Title: Re: Simple NRG shooting bot problem!
Post by: Numsgil on August 23, 2012, 12:09:26 AM
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.
Title: Re: Simple NRG shooting bot problem!
Post by: Testlund on August 23, 2012, 03:00:08 AM
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.
Title: Re: Simple NRG shooting bot problem!
Post by: Testlund on August 23, 2012, 03:10:21 AM
Here is a screenshot. As you can see I've set this one to shoot energy when it reaches 32000.
Title: Re: Simple NRG shooting bot problem!
Post by: Botsareus on August 23, 2012, 03:38:23 PM
Try this robot, see how it works for you:

Quote
start
*.nrg 1000 >
 314 rnd .aimright store
 -2 .shoot store

Quote
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?
Title: Re: Simple NRG shooting bot problem!
Post by: Testlund on August 23, 2012, 03:54:13 PM
Yes, that works! Thanks.
Title: Re: Simple NRG shooting bot problem!
Post by: Testlund on August 23, 2012, 04:08:55 PM
Quote
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.
Title: Re: Simple NRG shooting bot problem!
Post by: Botsareus on August 23, 2012, 04:47:16 PM
That's because darwinbots in currently case sensitive.  :P

Just try:

Quote
start
*.nrg 1000 >
 314 rnd .aimright store
 -2 .shoot store

This should work as well:

Quote
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
Title: Re: Simple NRG shooting bot problem!
Post by: Testlund on August 23, 2012, 05:04:43 PM
Quote
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.  :)
Title: Re: Simple NRG shooting bot problem!
Post by: Botsareus on August 24, 2012, 03:10:27 PM
I'll consider it again when I work on the chloroplast version.
Title: Re: Simple NRG shooting bot problem!
Post by: Tilthanseco on August 24, 2012, 07:26:15 PM
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.
Title: Re: Simple NRG shooting bot problem!
Post by: Botsareus on August 25, 2012, 05:52:02 PM
We are breaking old robots anyway when we add new memory locations for chloroplasts.