Darwinbots Forum
Welcome To Darwinbots => Newbie => Topic started by: Shadowgod2 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
-
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
-1 7 store
will work exactly the same as
-1 .shoot store
:P
-
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.
-
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?
-
Try
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,
cond
311 * 31000 >
start
1 .delgene store
0 .begin store
stop
Should work too.
Even try:
cond
.body * 31000 >
start
1 .delgene store
0 .begin store
stop
Btw, Awesome Avatar.
-
311 works but body doesn't
-
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
-
ok, so the problem is not with the code, it is with the bot itself.
Try doing something like:
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
-
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
-
Lol, actually, you figured it out entirely on your own.
I did not even see that (until you mentioned it) myself.
-
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)
-
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