Author Topic: Trying to understand something about DNA reading and actions  (Read 579 times)

Offline RickDan

  • Bot Neophyte
  • *
  • Posts: 6
    • View Profile
Trying to understand something about DNA reading and actions
« on: November 19, 2014, 11:49:12 AM »
I've been reading the wiki manual about stacking and also the order of actions. According to the order of actions link (http://wiki.darwinbots.com/w/Order_of_actions) the bot will rotate first only then it will move and only then will reproduce. Now lets imagine a simple bot like this [i will not use functions, only plain english to explain my point):
BOT 1:
Gene1:
Rotate the bot 90?

Gene2:
Move 10 steps

Gene3:
Reproduce a bot.

Now imagine the BOT2:
Gene 1:
Move 10 steps
G2:
Reproduce a bot
G3:
Rotate 90?

My question: how to they react in the simulation? Will they react exactly in the same way? I mean, will they rotate, move and only then reproduce? If thats the case, that means that the order of Genes is not important?

Thanks

Sorry if I wasnt clear, but my english is not very good.

Offline Peter

  • Bot God
  • *****
  • Posts: 1177
    • View Profile
Re: Trying to understand something about DNA reading and actions
« Reply #1 on: November 19, 2014, 04:30:07 PM »
For the order of actions the order of the genes is not important. You can however overwrite values from earlier genes, so the order does matter. If you tell the bot in gene 1 to rotate 90 degrees and in gene 2 to rotate 100 degrees, it'll rotate 100 degrees.

Not until all the genes have executed the simulation will look at the values stored in the memory locations. At that point it'll execute the orders in the order of action.

Short, Bot1 and Bot2 will react the same.
Oh my god, who the hell cares.

Offline spike43884

  • Bot Overlord
  • ****
  • Posts: 656
    • View Profile
    • OurIllogicalWorld Blog
Re: Trying to understand something about DNA reading and actions
« Reply #2 on: November 20, 2014, 11:46:09 AM »
apart from the complex post by peter, when you get to complex bots especially, order of genes is possibly more key than order of actions....
I made a bot which the first genes for reproduction had a high criteria, then would reproduce by .repro (mitosis) then the next gene would do .sexrepro (2 parents reproduction...If it was selected as girl, if boy it shot sperm instead)
the second gene had a much lower NRG criteria, but if it hit the high criteria, I didn't want it to only do mitosis because thats a worse system, so I put the mitosis first, then it would only do mitosis is it WASN'T fertlised and had that high NRG....

GENE 1: LOWEST PRIORITY
GENE 2: MIDDLE PRIORITY
GENE 3 (FINAL GENE): HIGHEST PRIORITY
Autism can allow so much joy, and at the same time sadness to be seen. Our world is weird, and full of contradiction everywhere, yet somehow at moments seems to come together, and make near perfect sense.