Darwinbots Forum
Bots and Simulations => DNA - General => Topic started by: triclops200 on October 24, 2009, 05:25:00 AM
-
I can't get this to work... they still run from each other.
' Alga minimalis
'
' Vegetable
'
' This robot has a single gene,
' necessary for it to reproduce.
' Energy is given to it by the program,
' by checking the "autotroph" box.
'reproduction
cond
*.robage 0 =
start
471 .eye1dir store
54 .out1 store
stop
cond
*.eye5 0 >
*.in1 *.out1 !=
start
*.refvelup 30 add .dn store
stop
cond
*.nrg 2000 >
*.eye5 0 =
*.refeye *.myeye = or
start
10 .repro store
140 rnd 140 add .aimsx store
stop
cond
*.eye1 0 >
*.in1 *.out1 !=
start
*.refvelup 30 add .up store
stop
-
What is it you're trying to accomplish?
-
I am trying to make an algea that packs together then breaks apart and runs when anyone of them are attacked, heres what I've got so far.
' Alga packus
cond
*.robage 2 <
start
471 .eye1dir store
stop
cond
*.robage 0 >
start
57 .out1 store
stop
cond
*.eye5 0 >
*.refshoot *.myshoot !=
start
*.refvelup 30 add .dn store
3 .out1 store
stop
cond
*.nrg 2000 >
*.eye5 0 =
*.refeye *.myeye = or
start
10 .repro store
140 rnd 140 add .aimsx store
stop
cond
*.eye1 0 >
*.refshoot *.myshoot !=
start
*.refvelup 30 add .up store
3 .out1 store
stop
cond
*.eye5 0 >
*.refshoot *.myshoot =
*.out1 3 !=
start
*.refveldx .dx store
*.refvelup 1 add .up store
stop
cond
*.eye5 0 =
*.eye1 0 =
start
0 .out1 store
0 .in1 store
stop
cond
*.in1 3 =
*.eye5 0 =
*.refshoot *.myshoot = or
start
3 .out1 store
30 .up store
stop
cond
*.eye1 0 >
*.refshoot *.myshoot =
*.out1 3 !=
start
*.refveldx .dx store
*.refvelup 1 add .dn store
stop
-
In your first bot you posted, the last gene was duplicated from a previous gene, but with eye1 instead of eye5. Since the in/out are populated from whatever is in eye5, this might cause some weird behavior. Remember that later genes overwrite earlier genes.