Darwinbots Forum
Bots and Simulations => Bestiary => F3 bots => Topic started by: d-EVO on October 24, 2008, 10:27:51 PM
-
this bot brings BotBot to its knees.
use this instead of V 1.1.1
'My DNA code for an F3 Bot
'name : Alpha 1.1.3
'created by : d-EV0
'class : F3
' TARGETTING ENEMY
cond
*.eye1 *.eye2 >=
*.eye1 *.eye3 >=
*.eye1 *.eye4 >=
*.eye1 *.eye5 >=
*.eye1 *.eye6 >=
*.eye1 *.eye7 >=
*.eye1 *.eye8 >=
*.eye1 *.eye9 >=
*.eye1 0 >
start
140
.aimsx
store
stop
cond
*.eye2 *.eye1 >=
*.eye2 *.eye3 >=
*.eye2 *.eye4 >=
*.eye2 *.eye5 >=
*.eye2 *.eye6 >=
*.eye2 *.eye7 >=
*.eye2 *.eye8 >=
*.eye2 *.eye9 >=
*.eye2 0 >
start
105
.aimsx
store
stop
cond
*.eye3 *.eye2 >=
*.eye3 *.eye1 >=
*.eye3 *.eye4 >=
*.eye3 *.eye5 >=
*.eye3 *.eye6 >=
*.eye3 *.eye7 >=
*.eye3 *.eye8 >=
*.eye3 *.eye9 >=
*.eye3 0 >
start
70
.aimsx
store
stop
cond
*.eye4 *.eye2 >=
*.eye4 *.eye3 >=
*.eye4 *.eye1 >=
*.eye4 *.eye5 >=
*.eye4 *.eye6 >=
*.eye4 *.eye7 >=
*.eye4 *.eye8 >=
*.eye4 *.eye9 >=
*.eye4 0 >
start
35
.aimsx
store
stop
cond
*.eye5 *.eye2 >=
*.eye5 *.eye3 >=
*.eye5 *.eye4 >=
*.eye5 *.eye5 >=
*.eye5 *.eye6 >=
*.eye5 *.eye7 >=
*.eye5 *.eye8 >=
*.eye5 *.eye9 >=
*.eye5 0 >
*.refeye *.myeye !=
start
*.refveldx .dx store
*.refvelup 10 add .up store
stop
cond
*.eye6 *.eye2 >=
*.eye6 *.eye3 >=
*.eye6 *.eye4 >=
*.eye6 *.eye5 >=
*.eye6 *.eye1 >=
*.eye6 *.eye7 >=
*.eye6 *.eye8 >=
*.eye6 *.eye9 >=
*.eye6 0 >
start
35
.aimdx
store
stop
cond
*.eye7 *.eye2 >=
*.eye7 *.eye3 >=
*.eye7 *.eye4 >=
*.eye7 *.eye5 >=
*.eye7 *.eye6 >=
*.eye7 *.eye1 >=
*.eye7 *.eye8 >=
*.eye7 *.eye9 >=
*.eye7 0 >
start
70
.aimdx
store
stop
cond
*.eye8 *.eye2 >=
*.eye8 *.eye3 >=
*.eye8 *.eye4 >=
*.eye8 *.eye5 >=
*.eye8 *.eye6 >=
*.eye8 *.eye7 >=
*.eye8 *.eye1 >=
*.eye8 *.eye9 >=
*.eye8 0 >
start
105
.aimdx
store
stop
cond
*.eye9 *.eye2 >=
*.eye9 *.eye3 >=
*.eye9 *.eye4 >=
*.eye9 *.eye5 >=
*.eye9 *.eye6 >=
*.eye9 *.eye7 >=
*.eye9 *.eye8 >=
*.eye9 *.eye1 >=
*.eye9 0 >
start
140
.aimdx
store
cond
*.eye5 50 >
*.refeye *.myeye !=
start
-6 .shoot store
*.refvelup 10 add .up
store
stop
cond
*.eye5 0 =
*.refeye *.myeye = or
start
10
.up
store
314 rnd 140 add
.aimdx
store
stop
cond
*.nrg 1000 >
start
20
.repro
store
stop
end
-
Remember that reproducing based on nrg will slowly reduce the size of your bots, esspecialy if you don't increase the body size at any point.
And small bots have weaker shots with a shorter range, so eventualy they'll barely be able to gain enough energy to make up for the cost of the shots.
So for instance this last gene :
cond
*.nrg 1000 >
start
20 .repro store
stop
Would probably be better off with something like this :
cond
*.nrg 1500 >
start
100 .strbody store
*.body 500 >
20 .repro store
stop
With this you increase body when you have enough energy, then inside the gene you have a second condition, so if you're big enough to grow, but your body is also bigger than 500 you'll reproduce aswell. (If your body is below 500 you will only grow)
Inline conditions can be a litle confusing till you know how they work, but they can actualy often make it a lot easyer to get the behavior you want without having many genes with more conditions for each one. (I'll consider writing a guide for inline conditions for the Wiki when I have 2 syndays in a week, or maybe someone else will do it)
-
hey moonfisher
thanks a lot. was getting anoid with the hundreds of midget bots doing nothing. will put this in my code ond see how it works out