Bots and Simulations > F2 bots

Animal_Simplisis (F2) (Tj3) (21-03-2010)

(1/2) > >>

Tj3:
My first league bot, Animal Simplisis:
 
[div class=\'codetop\']CODE[div class=\'codemain\' style=\'height:200px;white-space:pre;overflow:auto\']
--- Code: ---'Animal_Simplisis

' Gene 1 Species ID and set up
cond
*.robage 0 =
start
99 .out7 store
.shoot .ploc store
.shootval .vloc store
-32000 .venval store
.paralyzed .memloc store
stop

' Gene 2 Follow food
cond
 *.eye5 0 >
*.in7 *.out7 !=
start
*.refxpos *.refypos angle .setaim store
 *.refvelup .up store
stop

' Gene 3 Find food
cond
*.eye5 0 =
*.in7 *.out7 =
or
start
157 314 rnd sub .aimdx store
10 .up store
stop

' Gene 4 Eat food
cond
 *.eye5 0 >
*.in7 *.out7 !=
start
*.refpoison 0 = *.refshell 0 > and
-1 .shoot store
not
-6 .shoot store
true
-32 .shootval store
stop

' Gene 5 Eliminate waste
cond
*.waste 50 >
start
1 .backshot store
-4 .shoot store
*.waste .shootval store
stop

' Gene 6 Reproduction
cond
*.nrg 10000 >
*.body 4000 >
*.eye5 0 =
start
25 .repro store
stop

' Gene 7 Store poison
cond
*.poison 500 <
*.nrg 500 *.poison sub 2 mult 2500 add >=
start
500 *.poison sub .strpoison store
stop

' Gene 8 Make slime
cond
*.slime 500 <
*.nrg 500 *.slime sub 2500 add >=
start
500 *.slime sub .mkslime store
stop

' Gene 9 Make shell
cond
*.shell 500 <
*.nrg 500 *.shell sub 2500 add >=
start
500 *.shell sub .mkshell store
stop

' Gene 10 Store venom
cond
*.venom 500 <
*.nrg 500 *.venom sub 2 mult 2500 add >=
start
500 *.venom sub .strvenom store
stop

' Gene 11 Shoot venom
cond
*.eye5 0 >
*.in7 *.out7 !=
*.venom 1 >=
*.robage 10 mod 0 =
start
-3 .shoot store
stop


end
--- End code ---

bacillus:
Hint-using mrepro in leagues is really bad-usually, mutations move you either up or down the fitness curve, but with hand-authored bots, the only way to go is down.
On the other hand, putting 99 .mrepro into a venom shot could be fun...
 

Do you know about info shots? if you do this for example:

99 .shootval store
.mrepro .shoot store

you can override their .mrepro value for one cycle.

Houshalter:
would it be a good idea to do something like this:

--- Code: ---cond
*.robage 100 >
*.nrg 200 <
start
99 .mrepro store
stop
--- End code ---

Just like real bacteria, this bot mutates itself when its not doing good. It will usually result in a failed bot but a chance at a beneficial mutation is better then waiting to go into extinction.

Tj3:
Oh crap, I used .mrepro? That was a typo lol. Just changed it.

fulizer:
.Mrepro is great, evolution always makes bots JUST good enough to survive. by using .Mrepro, you can help a dieing species survive.
also when using memory shots to modify the .Mrepro value, why 99? 100 should work even better.

Navigation

[0] Message Index

[#] Next page

Go to full version