1
DNA - General / Re: Dna reading question
« on: November 06, 2013, 08:42:18 AM »
The only reason I see for not achieving 40 is due to the nature of how DNA works:
1) first it reads Gene 1, giving the "order" to increase the speed up to 10 IF the speed is not 40; so, the speed will increase, but just a little; it wont have the time to increase further because, in the next moment/second the DNA will read the second gene.
2) the bot rotates, but now is not accelerating, just rotating, and because of that speed will naturally decrease a little bit;
3) DNA reads again gene 1, and so on.
This means that the bot will have an erratic movement, not reaching the desired behavior: move straight forward, them turn 90?, move forward again and so on.
This is my explanation.
The only way I found to turn that problem around (in fact is not a problem, just me checking how things work on Darwinbots) was the insertion of a condition on gene 2: *.velup 40 >; it will rotate only if the speed is forty or more. Then I checked and it seems more like the expected behavior. Even so,
I think that the rotation will not happen exactly at 40, sometimes 43, and sometimes even 50. Maybe thats something related to the surface. I dont know.
1) first it reads Gene 1, giving the "order" to increase the speed up to 10 IF the speed is not 40; so, the speed will increase, but just a little; it wont have the time to increase further because, in the next moment/second the DNA will read the second gene.
2) the bot rotates, but now is not accelerating, just rotating, and because of that speed will naturally decrease a little bit;
3) DNA reads again gene 1, and so on.
This means that the bot will have an erratic movement, not reaching the desired behavior: move straight forward, them turn 90?, move forward again and so on.
This is my explanation.
The only way I found to turn that problem around (in fact is not a problem, just me checking how things work on Darwinbots) was the insertion of a condition on gene 2: *.velup 40 >; it will rotate only if the speed is forty or more. Then I checked and it seems more like the expected behavior. Even so,
I think that the rotation will not happen exactly at 40, sometimes 43, and sometimes even 50. Maybe thats something related to the surface. I dont know.