Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: Ark on March 14, 2006, 03:17:53 AM
-
Hi again everyone. I'm working on yet another multibot and I've become stumped. My robot is currently supposed to just run around and feed until 31000 energy, move away from whatever it was eating, stop, and make 3 new connected robots, each approximately 120 degrees away from each new robot, all connected to the original middle bot. It used to be working fine but now it works only up until the point where it forms the multibot, then one of the ties from a baby bot to the parent bot just deletes. I have no idea why. If any of you can tell me what I'm missing it would be much appreciated.
Code:
def lifestage 52
cond
*.robage 2 =
*.numties 0 =
start
1 .lifestage store
stop
cond
*.robage 0 =
*.eye5 70 >
*.nrg 8000 <
*.nrg 7000 >
*.numties 0 =
start
3 .lifestage store
1 .tie store
stop
cond
*.robage 0 =
*.eye5 70 >
*.nrg 5000 <
*.nrg 4500 >
*.numties 0 =
start
3 .lifestage store
2 .tie store
stop
cond
*.robage 0 =
*.eye5 70 >
*.nrg 4500 <
*.nrg 4000 >
*.numties 0 =
start
3 .lifestage store
3 .tie store
stop
cond
*.robage 1000 <
*.numties 1 =
start
628 .fixang store
130 .fixlen store
0 .fixpos store
stop
cond
*.numties 3 =
start
4 .lifestage store
0 .fixpos store
40 .stifftie store
stop
cond
*.eye5 0 >
*.refeye *.myeye !=
*.lifestage 1 =
start
*.refveldx .dx store
*.refvelup 30 add .up store
stop
cond
*.eye5 50 >
*.refeye *.myeye !=
*.lifestage 1 =
start
-1 .shoot store
*.refvelup .up store
stop
cond
*.eye5 50 <
*.velscalar 0 =
*.lifestage 1 =
start
50 .up store
stop
cond
*.eye5 0 =
*.refeye *.myeye = or
*.lifestage 1 =
start
75 .aimdx store
stop
cond
*.lifestage 1 =
*.nrg 31000 >
start
2 .lifestage store
15 .dn store
stop
cond
*.lifestage 2 =
*.robage 1000 >
*.eye5 40 <
*.numties 0 =
start
1 .fixpos store
25 .repro store
418 .aimsx store
1 .id store
stop
cond
*.lifestage 2 =
*.robage 1000 >
*.numties 1 =
start
25 .repro store
418 .aimsx store
stop
cond
*.lifestage 2 =
*.robage 1000 >
*.numties 2 =
start
25 .repro store
418 .aimsx store
stop
cond
*.waste 200 >
start
-4 .shoot store
*.waste .shootval store
stop
end
-
I think you may have the wrong *.nrg conditions in Gene 3. Shouldn't it be:
*.nrg 6000 <
*.nrg 5500 >
Also, the Disable ties check box in 2.4A is wired up backwards I think. Disabling ties actual enables them although there are some other issues there I think as well.
-E
-
If the tie is disappearing it sounds like a permanent tie is never being fired. I haven't look at your code, but that would be a good place to double check. This could happen if a bot is misalligned or tries to fire at the wrong time.
-
This is what I get for trying to code at 4 in the morning. You guys got it, the gene was supposed to be
6000 <
4500 >
and because it wasn't the gene wasn't firing, no tie formed. Now I've got that fixed and I'm working on the real difficult part of the bot, figuring out how to send information from tie to tie. I'm pretty sure I understand how to send info over ties for the baby bots who have only 1 tie to worry about. But what commands do I use to tell the middle "Brain" bot to send information across only 1 of his 3 ties?
-
You'll need to use .tienum to set which tie you're talking to.