Darwinbots Forum
Welcome To Darwinbots => Newbie => Topic started by: Blowfishy on November 19, 2007, 03:46:08 PM
-
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
-
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.
-
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.
-
You might also want to check this (http://www.darwinbots.com/WikiManual/index.php?title=Sysvars) out.
-
You could look at these tutorialsbot-tutorials (http://www.darwinbots.com/WikiManual/index.php?title=Robot_Tutorial), 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.
cond
start gene
*.eye5 0 >
Like Eric explained, if eye5 is higher then 0(if it sees something) there will be a true returned.
*.refeye *.myeye !=
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
start
If all the values between cond and start are true this will be executed.
*.refveldx .dx store
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
*.refvelup 30 add .up store
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.
stop
You may figure this one out.
Hope this helps.
-
it is smarter to edit existing genes than to make your own. unless you need to
-
it is smarter to edit existing genes than to make your own. unless you need to
Even if you want to do that, a smart move is to know how they work, else you could edit and look if it performs better, but a trial and error method is taking more time then actual learning the dna.
-
it is smarter to edit existing genes than to make your own. unless you need to
Even if you want to do that, a smart move is to know how they work, else you could edit and look if it performs better, but a trial and error method is taking more time then actual learning the dna.
true
lol quote in a quote