Author Topic: Simple NRG shooting bot problem!  (Read 4957 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Simple NRG shooting bot problem!
« 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.
The internet is corrupt and controlled by criminally minded people.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #1 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.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #2 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.
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #3 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.
The internet is corrupt and controlled by criminally minded people.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #4 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?
« Last Edit: August 23, 2012, 03:48:04 PM by Botsareus »

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #5 on: August 23, 2012, 03:54:13 PM »
Yes, that works! Thanks.
The internet is corrupt and controlled by criminally minded people.

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #6 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.
« Last Edit: August 23, 2012, 04:25:07 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #7 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

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #8 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.  :)
The internet is corrupt and controlled by criminally minded people.

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #9 on: August 24, 2012, 03:10:27 PM »
I'll consider it again when I work on the chloroplast version.

Offline Tilthanseco

  • Bot Builder
  • **
  • Posts: 60
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #10 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.
Undisputed creator of bot Sonar!

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Moderator
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: Simple NRG shooting bot problem!
« Reply #11 on: August 25, 2012, 05:52:02 PM »
We are breaking old robots anyway when we add new memory locations for chloroplasts.