Author Topic: reading problem  (Read 4821 times)

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
reading problem
« on: November 17, 2013, 09:56:39 AM »
i was making a multi bot and as i tested the first stage the genes wouldn't delete. so i tried to figour out the problem. i found several bugs.

first was some of the sysvars were not put in right, in the text was .shoot but said 7 in the program so no issue but strange

the second and the problem was that body in text is nothing in program but 311 in text is body in program and works fine
body != 311 but 311 = body yet says body regardless

i used 2.45.03 and the newer version and still the bug persists

it only seems to be bugged with this bot too. any other bot *.body works fine

i moved it to a different file same bug type but text body is 0 in program

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: reading problem
« Reply #1 on: November 17, 2013, 01:32:30 PM »
Well what is happening here is the DNA is converting your commands into there literal values. Believe it or not ".shoot" is the same thing as "7"

So, actually
Code: [Select]
-1 7 store
 will work exactly the same as
Code: [Select]
-1 .shoot store
 :P



Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: reading problem
« Reply #2 on: November 17, 2013, 01:35:15 PM »
Quote
it only seems to be bugged with this bot too.

Can you just give me the bot's DNA and give me the aprox. word count at where in the DNA the bug occurs. thx.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #3 on: November 17, 2013, 11:56:16 PM »
i know it will work the same when it converted .shoot to 7 which is why i said no problems it's just strange is all
i've been at this on and off for about a year now

it's in the text just in the 3rd gene which i made to find the problem. just switch body with 311.

cond
 *.body 31000 >
start
 1 .delgene store
 0 .begin store
stop

109 in but it doesn't mater where it is, i've tried, even *.nrg doesn't work right in this bot. i don't get it

also, why was this moved to newbie?
« Last Edit: November 18, 2013, 12:11:23 AM by Shadowgod2 »

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: reading problem
« Reply #4 on: November 18, 2013, 10:43:42 AM »
Try

Quote
cond
 *311 31000 >
start
 1 .delgene store
 0 .begin store
stop

Wait a minute, are you saying that:

.body = 311 works but

311 = .body does not?


(don't forget, you must always put a "." in the beginning)


Also,

Quote
cond
 311 * 31000 >
start
 1 .delgene store
 0 .begin store
stop

Should work too.

Even try:

Quote
cond
.body *  31000 >
start
 1 .delgene store
 0 .begin store
stop



Btw, Awesome Avatar.
« Last Edit: November 18, 2013, 10:57:42 AM by Botsareus »

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #5 on: November 18, 2013, 11:44:37 AM »
311 works but body doesn't

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #6 on: November 18, 2013, 12:13:50 PM »
i've even put animal minimal with *.body 1000 > and it works but doesn't work in this bot

i had to shrink the pic considerably though, thanks

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: reading problem
« Reply #7 on: November 18, 2013, 12:32:57 PM »
ok, so the problem is not with the code, it is with the bot itself.

Try doing something like:

Code: [Select]
cond
start
*.body debugint
stop

And see what kinds of a values you get back.

Also, if the robot just dies on you, there is a good chance that you set the value too low in global settings.

I am guessing you are talking about the bot " multi1.txt " from your original post.



I moved the post to newbie bc I did not see an actual bug here. I am beginning to regret this decision. However, I can always move it back.  :P
« Last Edit: November 18, 2013, 12:35:22 PM by Botsareus »

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #8 on: November 18, 2013, 04:29:56 PM »
i got 0

how ever did ? .body and got 51 --> 0

then it hit me :thinkey:
i have def body 51

i'm an idiot
thanks for the help, i wouldn't have figured out what it was without you anytime soon

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Re: reading problem
« Reply #9 on: November 19, 2013, 11:26:45 AM »
Lol, actually, you figured it out entirely on your own.
I did not even see that (until you mentioned it) myself.

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #10 on: November 19, 2013, 11:48:48 PM »
their needs to be something on that though so this kind of thing doesn't happen again


another thing...

the last gene i have won't work and it's for reproduction of the mb because i can't use decimals and i can't go any higher than 32000. any thoughts on how to get around this.

cond
 *.begin 0 =
 *.head 1 =
 *.numties 2 <
start
 500000 *.body div .repro store or 5000 *.body div 100 mult .repro store
stop

this gene is suppose to repro with the offspring having ~ 5000 body but the most i can get is 320 body.  (32000 *.body div .repro store)
« Last Edit: November 19, 2013, 11:59:59 PM by Shadowgod2 »

Offline Shadowgod2

  • Bot Destroyer
  • ***
  • Posts: 387
    • View Profile
Re: reading problem
« Reply #11 on: November 20, 2013, 12:24:42 AM »
never mind i've got it

cond
 *.begin 0 =
 *.head 1 =
 *.numties 2 <
start
 25000 *.body 20 div div .repro store
stop

it was a pain to find a good number to divide with (~ 7 tries and decided to go a little over board and came out perfect) :D