Bots and Simulations > DNA - General

Dna reading question

<< < (2/2)

Testlund:

--- Quote from: Nosta on November 05, 2013, 06:29:55 PM --- in a metal surface the bot will just rotate;

--- End quote ---

That's odd. It means the program is not checking if the bot has actually achieved 40 velocity.  :huh:

I prefer to have Viscosity and Density set to 1. It gives the most realistic movement imo. I imagine the DB environment is a square shaped dish seen from above with a thin layer of water.  :)

Nosta:
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.

Navigation

[0] Message Index

[*] Previous page

Go to full version