Darwinbots Forum

Bots and Simulations => DNA - General => Topic started by: spike43884 on October 18, 2014, 05:51:15 AM

Title: My first custombot's code
Post by: spike43884 on October 18, 2014, 05:51:15 AM
Code: [Select]
' Gene 1 Food Finder
cond
 *.eye5 0 >
 *.refeye *.myeye !=
start
 *.refveldx .dx store
 *.refvelup 30 add .up store
stop

' Gene 2 Eat Food
cond
 *.eye5 50 >
 *.refeye *.myeye !=
start
-1 .shoot store
 *.refvelup .up store
stop


' Gene 3 Steal Food
cond
 *.eye5 100 < and *.eye5 50 >
 *.refeye *.myeye !=
start
 *.tiepres .tienum store
 -20 .tieval store
 -1 .tieloc store
stop

' Gene 4 Avoiding Family
cond
 *.eye5 0 =
 *.refeye *.myeye = or
start
 314 rnd .aimdx store
stop

' Gene 5 Reproduce
cond
 *.robage 25 >
 *.nrg 21000 >
start
 10 .repro store
stop

end
Minorly editted version of the Animal_Mimalis...Is there any errors in it...Especially within Gene 2 & 3 as im trying to get it to be able to do both ties & shoot... Any suggestions for improvements..? Also Id love to have a pointer on how to edit the reproduce so it will perform mitosis when it has a higher NRG if it cant perform .sexrepro when the conditions are true for both circumstances but it isnt fertilised, Because it'd be more desirable for it to do .sexrepro but for it to survive I want a mitosis backup :D
EDIT:...If that made sence :D