Welcome To Darwinbots > Newbie

Don't understand the DNA

(1/2) > >>

Blowfishy:
Hi,

I'm new to DB and I'm trying to understand Animalis Minimalis' DNA so that I can create a simple bot myself. The problem is, I don't understand anything of it. Can someone help me with the DNA explanation, I think the wiki explains it a bit vague.

I understand the meaning of genes. But I dont understand this:

' Gene 1 Food Finder
cond
 *.eye5 0 >
 *.refeye *.myeye !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

What does *.eye5 0 > mean, and what does the .refeye and refveldx and refvelup mean??? That's the part I dont understand..

Any help is appreciated,

Blowfishy

shvarz:
Welcome to the board!
I'm not DB code guru, but I can tell you what *.eye5 0 > means - it merely asks whether eye 5 sees anything at all.  

All variable that start with "ref" allow the bot to gather information on another bot - the one that sits in front of it. So that if there is a bot in front of your bot, then  *.refeye tells you how many eye commands that bot has in its genome. Bots can use it to identify their own species (they would have exactly the same number of eye commands).  

Hope this helps.  Are you sure you found the right tutorial? The one I read in my time was very helpful and explained all these things.

EricL:
Hi Blowfishy.  Welcome.

The DNA uses RPN - Reverse Polish Notation.  Might want to look this up if your not familiar with this kind of thing.   So

*.eye5 0 >

is really just a way of saying

*.eye5 > 0

Or in words:

"Is the value of the .eye5 memory location greater than zero?"  The result will be True if it is, False if it is not.

The line:

*.refeye *.myeye !=

works the same way.  It's saying "Is the value of the .refeye memory location not equal to the value of the .myeye memory location?"

The two results get ANDed together and the gene fires if they are both True.

The simulator fills in the values of .eye5, refeye and myeye.  .eye5 will be a non zero number if the bot can see something in front of it's center eye.   The value will represnet how close it is.  Refeye will represent the number of eye statements the bot being looked at has in it's DNA.   It will be 0 if there is nothing in view.  .myeye will be the number of eye statements in this bot's DNA.   It's a poor man's way of testign whether the thing the bot is looking at has the same DNA it has.

Cheers.

Gobo:
You might also want to check this out.

Peter:
You could look at these tutorialsbot-tutorials, some of the tutorials are explaining 'Animalis Minimalis' dna.

Well, it looks hard now, it is going to be easier I've been trough that fase. My topic full of questions is 3 pages long, try to beat that.  

The explainationof the gene, step by step.


--- Quote ---cond
--- End quote ---
start gene


--- Quote ---*.eye5 0 >
--- End quote ---
Like Eric explained, if eye5 is higher then 0(if it sees something) there will be a true returned.


--- Quote ---*.refeye *.myeye !=
--- End quote ---
Looks at the number of eye statemens of the other bot and compares then with his own, much used as a conspec-recocnition.
ref =other
my=myself


--- Quote ---start
--- End quote ---
If all the values between cond and start are true this will be executed.


--- Quote ---*.refveldx .dx store
--- End quote ---
Looks at the turning of the other bot and put the other way of turning into his own.(to follow the other bot)
ref=other
.dx=self


--- Quote ---*.refvelup 30 add .up store
--- End quote ---
Same as refveldx exept refelup is the other one speed instead of direction. And here is 30 being added to his own up to get a higher speed then the one before him. So coming closer.


--- Quote ---stop
--- End quote ---
You may figure this one out.

Hope this helps.

Navigation

[0] Message Index

[#] Next page

Go to full version